diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/mesh_instance.cpp | 2 | ||||
-rw-r--r-- | scene/3d/spatial.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index cf0317cd58..02fab8c50b 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -138,6 +138,8 @@ void MeshInstance::set_mesh(const Ref<Mesh> &p_mesh) { set_base(RID()); } + update_gizmo(); + _change_notify(); } Ref<Mesh> MeshInstance::get_mesh() const { diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index fcc908cdc6..82ad62014b 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -32,6 +32,7 @@ #include "core/engine.h" #include "core/message_queue.h" +#include "scene/main/scene_tree.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" @@ -401,6 +402,8 @@ void Spatial::update_gizmo() { if (!is_inside_world()) return; if (!data.gizmo.is_valid()) + get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this); + if (!data.gizmo.is_valid()) return; if (data.gizmo_dirty) return; |