Fix bug in 3d navigation scheme selection; Add modo navigation scheme
This commit is contained in:
parent
eb294bb6ea
commit
35bf23859a
|
@ -404,7 +404,7 @@ void EditorSettings::_load_defaults() {
|
|||
set("3d_editor/default_z_far",500.0);
|
||||
|
||||
set("3d_editor/navigation_scheme",0);
|
||||
hints["3d_editor/navigation_scheme"]=PropertyInfo(Variant::INT,"3d_editor/navigation_scheme",PROPERTY_HINT_ENUM,"Godot,Maya");
|
||||
hints["3d_editor/navigation_scheme"]=PropertyInfo(Variant::INT,"3d_editor/navigation_scheme",PROPERTY_HINT_ENUM,"Godot,Maya,Modo");
|
||||
set("3d_editor/orbit_modifier",0);
|
||||
hints["3d_editor/orbit_modifier"]=PropertyInfo(Variant::INT,"3d_editor/orbit_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
|
||||
set("3d_editor/pan_modifier",1);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -120,7 +120,8 @@ class SpatialEditorViewport : public Control {
|
|||
|
||||
enum NavigationScheme {
|
||||
NAVIGATION_GODOT,
|
||||
NAVIGATION_MAYA
|
||||
NAVIGATION_MAYA,
|
||||
NAVIGATION_MODO,
|
||||
};
|
||||
NavigationScheme _get_navigation_schema(const String& p_property);
|
||||
|
||||
|
|
Loading…
Reference in New Issue