summaryrefslogtreecommitdiffstats
path: root/editor/plugins/gpu_particles_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-03-10 14:09:17 +0100
committerGitHub <noreply@github.com>2022-03-10 14:09:17 +0100
commit9b597364737cbc04ccb5ee8e5c18bccb4dd31362 (patch)
tree5e2cc8006e77d01596e323ad9bac586920fc080a /editor/plugins/gpu_particles_3d_editor_plugin.cpp
parent90faf04f293fcdf636f641bfe3d88c5857695d9b (diff)
parent6f51eca1e3045571ccc68414a922e8b0229111f0 (diff)
downloadredot-engine-9b597364737cbc04ccb5ee8e5c18bccb4dd31362.tar.gz
Merge pull request #58972 from reduz/expose-more-gdextension
Diffstat (limited to 'editor/plugins/gpu_particles_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 293d1c3913..35cbff53f4 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -166,20 +166,20 @@ void GPUParticles3DEditorBase::_node_selected(const NodePath &p_path) {
return;
}
- VisualInstance3D *vi = Object::cast_to<VisualInstance3D>(sel);
- if (!vi) {
+ MeshInstance3D *mi = Object::cast_to<MeshInstance3D>(sel);
+ if (!mi || mi->get_mesh().is_null()) {
EditorNode::get_singleton()->show_warning(vformat(TTR("\"%s\" doesn't contain geometry."), sel->get_name()));
return;
}
- geometry = vi->get_faces(VisualInstance3D::FACES_SOLID);
+ geometry = mi->get_mesh()->get_faces();
if (geometry.size() == 0) {
EditorNode::get_singleton()->show_warning(vformat(TTR("\"%s\" doesn't contain face geometry."), sel->get_name()));
return;
}
- Transform3D geom_xform = base_node->get_global_transform().affine_inverse() * vi->get_global_transform();
+ Transform3D geom_xform = base_node->get_global_transform().affine_inverse() * mi->get_global_transform();
int gc = geometry.size();
Face3 *w = geometry.ptrw();