From e3e39a1b2ac4981bfd73ccba097eaeaf53462351 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 11 Aug 2022 01:30:54 +0200 Subject: [PATCH] Now EditorNode3DGizmo::add_mesh accepts a Mesh instead of an ArrayMesh. --- editor/spatial_editor_gizmos.cpp | 2 +- editor/spatial_editor_gizmos.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index f57268674..2ca784533 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -288,7 +288,7 @@ void EditorSpatialGizmo::Instance::create_instance(Spatial *p_base, bool p_hidde VS::get_singleton()->instance_set_layer_mask(instance, layer); //gizmos are 26 } -void EditorSpatialGizmo::add_mesh(const Ref &p_mesh, const Ref &p_material, const Transform &p_xform, const Ref &p_skin_reference) { +void EditorSpatialGizmo::add_mesh(const Ref &p_mesh, const Ref &p_material, const Transform &p_xform, const Ref &p_skin_reference) { ERR_FAIL_COND(!spatial_node); ERR_FAIL_COND_MSG(!p_mesh.is_valid(), "EditorSpatialGizmo.add_mesh() requires a valid Mesh resource."); diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h index 8d9cd076a..f38631667 100644 --- a/editor/spatial_editor_gizmos.h +++ b/editor/spatial_editor_gizmos.h @@ -100,7 +100,7 @@ protected: public: void add_lines(const Vector &p_lines, const Ref &p_material, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1)); void add_vertices(const Vector &p_vertices, const Ref &p_material, Mesh::PrimitiveType p_primitive_type, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1)); - void add_mesh(const Ref &p_mesh, const Ref &p_material = Ref(), const Transform &p_xform = Transform(), const Ref &p_skin_reference = Ref()); + void add_mesh(const Ref &p_mesh, const Ref &p_material = Ref(), const Transform &p_xform = Transform(), const Ref &p_skin_reference = Ref()); void add_collision_segments(const Vector &p_lines); void add_collision_triangles(const Ref &p_tmesh); void add_unscaled_billboard(const Ref &p_material, float p_scale = 1, const Color &p_modulate = Color(1, 1, 1));