Browse Source

Only allow MeshInstance3D-based nodes in particles emission shape node selector

This applies to both GPUParticles3D and CPUParticles3D, as
CPUParticles3DEditor inherits from GPUParticles3DEditorBase.
Hugo Locurcio 1 năm trước cách đây
mục cha
commit
c6a16b176e
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      editor/plugins/gpu_particles_3d_editor_plugin.cpp

+ 3 - 0
editor/plugins/gpu_particles_3d_editor_plugin.cpp

@@ -223,6 +223,9 @@ GPUParticles3DEditorBase::GPUParticles3DEditorBase() {
 	emission_dialog->connect("confirmed", callable_mp(this, &GPUParticles3DEditorBase::_generate_emission_points));
 
 	emission_tree_dialog = memnew(SceneTreeDialog);
+	Vector<StringName> valid_types;
+	valid_types.push_back("MeshInstance3D");
+	emission_tree_dialog->set_valid_types(valid_types);
 	add_child(emission_tree_dialog);
 	emission_tree_dialog->connect("selected", callable_mp(this, &GPUParticles3DEditorBase::_node_selected));
 }