From e2160afcd8bc36400ca9640c35516acf35a8a809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Go=C5=82=C4=85b=20=28n-pigeon=29?= Date: Mon, 13 Nov 2017 09:15:41 +0100 Subject: [PATCH] Fixed View plane local rotation. Plus some cleanups. --- editor/plugins/spatial_editor_plugin.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index cc144344a69..75c69615217 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1300,7 +1300,7 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { List &selection = editor_selection->get_selected_node_list(); - bool local_coords = (spatial_editor->are_local_coords_enabled() && motion_mask != Vector3()); // Disable local transformation for TRANSFORM_VIEW + bool local_coords = (spatial_editor->are_local_coords_enabled() && _edit.plane != TRANSFORM_VIEW); // Disable local transformation for TRANSFORM_VIEW float snap = 0; if (_edit.snap || spatial_editor->is_snap_enabled()) { @@ -1309,10 +1309,10 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { Vector3 motion_snapped = motion; motion_snapped.snap(Vector3(snap, snap, snap)); - set_message(TTR("Scaling XYZ: ") + motion_snapped); + set_message(TTR("Scaling: ") + motion_snapped); } else { - set_message(TTR("Scaling XYZ: ") + motion); + set_message(TTR("Scaling: ") + motion); } for (List::Element *E = selection.front(); E; E = E->next()) { @@ -1426,7 +1426,7 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { List &selection = editor_selection->get_selected_node_list(); - bool local_coords = (spatial_editor->are_local_coords_enabled() && motion_mask != Vector3()); // Disable local transformation for TRANSFORM_VIEW + bool local_coords = (spatial_editor->are_local_coords_enabled() && _edit.plane != TRANSFORM_VIEW); // Disable local transformation for TRANSFORM_VIEW float snap = 0; if (_edit.snap || spatial_editor->is_snap_enabled()) { @@ -1536,7 +1536,7 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { List &selection = editor_selection->get_selected_node_list(); - bool local_coords = spatial_editor->are_local_coords_enabled(); + bool local_coords = (spatial_editor->are_local_coords_enabled() && _edit.plane != TRANSFORM_VIEW); // Disable local transformation for TRANSFORM_VIEW for (List::Element *E = selection.front(); E; E = E->next()) {