Ver Fonte

Merge pull request #42298 from gvekan/stop-multimeshinstance-populate-reset

Stop reset of MultiMesh properties on populate
Rémi Verschelde há 3 anos atrás
pai
commit
7774cbd8f2
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      editor/plugins/multimesh_editor_plugin.cpp

+ 2 - 1
editor/plugins/multimesh_editor_plugin.cpp

@@ -160,7 +160,8 @@ void MultiMeshEditor::_populate() {
 	int instance_count = populate_amount->get_value();
 	int instance_count = populate_amount->get_value();
 
 
 	multimesh->set_transform_format(MultiMesh::TRANSFORM_3D);
 	multimesh->set_transform_format(MultiMesh::TRANSFORM_3D);
-	multimesh->set_color_format(MultiMesh::COLOR_NONE);
+	multimesh->set_color_format(node->get_multimesh()->get_color_format());
+	multimesh->set_custom_data_format(node->get_multimesh()->get_custom_data_format());
 	multimesh->set_instance_count(instance_count);
 	multimesh->set_instance_count(instance_count);
 
 
 	float _tilt_random = populate_tilt_random->get_value();
 	float _tilt_random = populate_tilt_random->get_value();