2D and 3D viewport are working again :D

This commit is contained in:
Juan Linietsky 2017-01-14 22:20:05 -03:00
parent 5e13a762ec
commit a7854d3ae6
3 changed files with 15 additions and 15 deletions

View file

@ -127,7 +127,7 @@ bool EditorSettings::_get(const StringName& p_name,Variant &r_ret) const {
const VariantContainer *v=props.getptr(p_name); const VariantContainer *v=props.getptr(p_name);
if (!v) { if (!v) {
//print_line("WARNING NOT FOUND: "+String(p_name)); print_line("EditorSettings::_get - Warning, not found: "+String(p_name));
return false; return false;
} }
r_ret = v->variant; r_ret = v->variant;

View file

@ -1319,7 +1319,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
{ {
bone_ik_list.clear(); bone_ik_list.clear();
float closest_dist=1e20; float closest_dist=1e20;
int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width"); int bone_width = EditorSettings::get_singleton()->get("editors/2d/bone_width");
for(Map<ObjectID,BoneList>::Element *E=bone_list.front();E;E=E->next()) { for(Map<ObjectID,BoneList>::Element *E=bone_list.front();E;E=E->next()) {
if (E->get().from == E->get().to) if (E->get().from == E->get().to)
@ -2113,11 +2113,11 @@ void CanvasItemEditor::_viewport_draw() {
} }
if (skeleton_show_bones) { if (skeleton_show_bones) {
int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width"); int bone_width = EditorSettings::get_singleton()->get("editors/2d/bone_width");
Color bone_color1 = EditorSettings::get_singleton()->get("editors/2dbone_color1"); Color bone_color1 = EditorSettings::get_singleton()->get("editors/2d/bone_color1");
Color bone_color2 = EditorSettings::get_singleton()->get("editors/2dbone_color2"); Color bone_color2 = EditorSettings::get_singleton()->get("editors/2d/bone_color2");
Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2dbone_ik_color"); Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2d/bone_ik_color");
Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2dbone_selected_color"); Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2d/bone_selected_color");
for(Map<ObjectID,BoneList>::Element*E=bone_list.front();E;E=E->next()) { for(Map<ObjectID,BoneList>::Element*E=bone_list.front();E;E=E->next()) {

View file

@ -1527,11 +1527,11 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (m.mod.meta) if (m.mod.meta)
mod=KEY_META; mod=KEY_META;
if (mod == _get_key_modifier("3d_editor/pan_modifier")) if (mod == _get_key_modifier("editors/3d/pan_modifier"))
nav_mode = NAVIGATION_PAN; nav_mode = NAVIGATION_PAN;
else if (mod == _get_key_modifier("3d_editor/zoom_modifier")) else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
nav_mode = NAVIGATION_ZOOM; nav_mode = NAVIGATION_ZOOM;
else if (mod == _get_key_modifier("3d_editor/orbit_modifier")) else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
nav_mode = NAVIGATION_ORBIT; nav_mode = NAVIGATION_ORBIT;
} else if (nav_scheme == NAVIGATION_MAYA) { } else if (nav_scheme == NAVIGATION_MAYA) {
@ -1552,11 +1552,11 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
mod=KEY_META; mod=KEY_META;
if(mod){ if(mod){
if (mod == _get_key_modifier("3d_editor/pan_modifier")) if (mod == _get_key_modifier("editors/3d/pan_modifier"))
nav_mode = NAVIGATION_PAN; nav_mode = NAVIGATION_PAN;
else if (mod == _get_key_modifier("3d_editor/zoom_modifier")) else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
nav_mode = NAVIGATION_ZOOM; nav_mode = NAVIGATION_ZOOM;
else if (mod == _get_key_modifier("3d_editor/orbit_modifier")) else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
nav_mode = NAVIGATION_ORBIT; nav_mode = NAVIGATION_ORBIT;
} }
} }
@ -1587,7 +1587,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (nav_scheme==NAVIGATION_MAYA && m.mod.shift) if (nav_scheme==NAVIGATION_MAYA && m.mod.shift)
zoom_speed *= zoom_speed_modifier; zoom_speed *= zoom_speed_modifier;
NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("3d_editor/zoom_style").operator int(); NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("editors/3d/zoom_style").operator int();
if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) { if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) {
if ( m.relative_x > 0) if ( m.relative_x > 0)
cursor.distance*=1-m.relative_x*zoom_speed; cursor.distance*=1-m.relative_x*zoom_speed;
@ -4095,7 +4095,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
add_to_group("_spatial_editor_group"); add_to_group("_spatial_editor_group");
EDITOR_DEF("editors/3d/manipulator_gizmo_size",80); EDITOR_DEF("editors/3d/manipulator_gizmo_size",80);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT,"3d_editor/manipulator_gizmo_size",PROPERTY_HINT_RANGE,"16,1024,1")); EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT,"editors/3d/manipulator_gizmo_size",PROPERTY_HINT_RANGE,"16,1024,1"));
EDITOR_DEF("editors/3d/manipulator_gizmo_opacity",0.2); EDITOR_DEF("editors/3d/manipulator_gizmo_opacity",0.2);
over_gizmo_handle=-1; over_gizmo_handle=-1;