diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-08-09 08:18:07 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-08-09 08:19:53 -0300 |
commit | df5d01f2599d557e568936d389d46a5393c7e9a4 (patch) | |
tree | 50aee10a45bc72081e1349eeb98bb3e155698f62 /scene/3d | |
parent | 1536cc438128fe4036fa7da5ec305513a781d3c8 (diff) |
Gizmos properly follow the edited object, closes #7837
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/spatial.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 6106b0904a..2f2dd12a18 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -72,8 +72,12 @@ SpatialGizmo::SpatialGizmo() { void Spatial::_notify_dirty() { +#ifdef TOOLS_ENABLED + if ((data.gizmo.is_valid() || data.notify_transform) && !data.ignore_notification && !xform_change.in_list()) { +#else if (data.notify_transform && !data.ignore_notification && !xform_change.in_list()) { +#endif get_tree()->xform_change_list.add(&xform_change); } } @@ -104,9 +108,11 @@ void Spatial::_propagate_transform_changed(Spatial *p_origin) { continue; //don't propagate to a toplevel E->get()->_propagate_transform_changed(p_origin); } - +#ifdef TOOLS_ENABLED + if ((data.gizmo.is_valid() || data.notify_transform) && !data.ignore_notification && !xform_change.in_list()) { +#else if (data.notify_transform && !data.ignore_notification && !xform_change.in_list()) { - +#endif get_tree()->xform_change_list.add(&xform_change); } data.dirty |= DIRTY_GLOBAL; |