Merge pull request #24506 from JFonS/expose_gizmos
Expose the new gizmo plugin system to scripting
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -400,6 +401,8 @@ void Spatial::update_gizmo() {
|
||||
#ifdef TOOLS_ENABLED
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user