From c6a16b176e065c72df97041453bf388d777f44cb Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 14 Nov 2023 16:09:35 +0100 Subject: [PATCH] Only allow MeshInstance3D-based nodes in particles emission shape node selector This applies to both GPUParticles3D and CPUParticles3D, as CPUParticles3DEditor inherits from GPUParticles3DEditorBase. --- editor/plugins/gpu_particles_3d_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index e47af62b5b63..88c9df7103e9 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/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 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)); }