summaryrefslogtreecommitdiffstats
path: root/editor/plugins/multimesh_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/multimesh_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/multimesh_editor_plugin.cpp')
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 72f3b6a06e..850c673c12 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -105,9 +105,9 @@ void MultiMeshEditor::_populate() {
return;
}
- GeometryInstance3D *ss_instance = Object::cast_to<MeshInstance3D>(ss_node);
+ MeshInstance3D *ss_instance = Object::cast_to<MeshInstance3D>(ss_node);
- if (!ss_instance) {
+ if (!ss_instance || !ss_instance->get_mesh().is_valid()) {
err_dialog->set_text(TTR("Surface source is invalid (no geometry)."));
err_dialog->popup_centered();
return;
@@ -115,7 +115,7 @@ void MultiMeshEditor::_populate() {
Transform3D geom_xform = node->get_global_transform().affine_inverse() * ss_instance->get_global_transform();
- Vector<Face3> geometry = ss_instance->get_faces(VisualInstance3D::FACES_SOLID);
+ Vector<Face3> geometry = ss_instance->get_mesh()->get_faces();
if (geometry.size() == 0) {
err_dialog->set_text(TTR("Surface source is invalid (no faces)."));