Skip to content

Commit

Permalink
Only allow MeshInstance3D-based nodes in particles emission shape nod…
Browse files Browse the repository at this point in the history
…e selector

This applies to both GPUParticles3D and CPUParticles3D, as
CPUParticles3DEditor inherits from GPUParticles3DEditorBase.
  • Loading branch information
Calinou committed Nov 19, 2023
1 parent baf6b46 commit c6a16b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor/plugins/gpu_particles_3d_editor_plugin.cpp
Expand Up @@ -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));
}
Expand Down

0 comments on commit c6a16b1

Please sign in to comment.