summaryrefslogtreecommitdiff
path: root/tools/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authormarynate <mary.w.nate@gmail.com>2014-03-31 15:52:27 +0800
committermarynate <mary.w.nate@gmail.com>2014-04-01 00:50:15 +0800
commit35bf23859a145989ef79c8cfac20d8c8eefe371c (patch)
tree2d0c6dbec39dbfdac7c3e4cc824828ad77a6bd6c /tools/editor/plugins/spatial_editor_plugin.cpp
parenteb294bb6eadc3dcb4e7c91459d5261ce10885c5d (diff)
Fix bug in 3d navigation scheme selection; Add modo navigation scheme
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 600d4f5103..5c019d9f20 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -528,11 +528,11 @@ static int _get_key_modifier(const String& p_property) {
SpatialEditorViewport::NavigationScheme SpatialEditorViewport::_get_navigation_schema(const String& p_property) {
switch(EditorSettings::get_singleton()->get(p_property).operator int()) {
+ case 0: return NAVIGATION_GODOT;
case 1: return NAVIGATION_MAYA;
- case 0:
- default:
- return NAVIGATION_GODOT;
+ case 2: return NAVIGATION_MODO;
}
+ return NAVIGATION_GODOT;
}
bool SpatialEditorViewport::_gizmo_select(const Vector2& p_screenpos,bool p_hilite_only) {
@@ -1013,7 +1013,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
}
- NavigationScheme nav_scheme = _get_navigation_schema("3d_editor/navigation_schema");
+ NavigationScheme nav_scheme = _get_navigation_schema("3d_editor/navigation_scheme");
NavigationMode nav_mode = NAVIGATION_NONE;
if (_edit.gizmo.is_valid()) {
@@ -1036,6 +1036,12 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
} else if (m.button_mask&1) {
if (nav_scheme == NAVIGATION_MAYA && m.mod.alt) {
+ nav_mode = NAVIGATION_ORBIT;
+ } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt && m.mod.shift) {
+ nav_mode = NAVIGATION_PAN;
+ } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt && m.mod.control) {
+ nav_mode = NAVIGATION_ZOOM;
+ } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt) {
nav_mode = NAVIGATION_ORBIT;
} else {
if (clicked) {