From 6f51eca1e3045571ccc68414a922e8b0229111f0 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 10 Mar 2022 08:17:38 +0100 Subject: Discern between virtual and abstract class bindings * Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved. --- editor/plugins/multimesh_editor_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/plugins/multimesh_editor_plugin.cpp') 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(ss_node); + MeshInstance3D *ss_instance = Object::cast_to(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 geometry = ss_instance->get_faces(VisualInstance3D::FACES_SOLID); + Vector geometry = ss_instance->get_mesh()->get_faces(); if (geometry.size() == 0) { err_dialog->set_text(TTR("Surface source is invalid (no faces).")); -- cgit v1.2.3