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

This applies to both GPUParticles3D and CPUParticles3D, as
CPUParticles3DEditor inherits from GPUParticles3DEditorBase.

(cherry picked from commit c6a16b176e)
This commit is contained in:
Hugo Locurcio 2023-11-14 16:09:35 +01:00 committed by Rémi Verschelde
parent 1d82ae22c0
commit f84ee53a9a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 0 deletions

View File

@ -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));
}