mirror of
https://github.com/godotengine/godot.git
synced 2024-11-14 16:13:08 +00:00
2D and 3D viewport are working again :D
This commit is contained in:
parent
5e13a762ec
commit
a7854d3ae6
@ -127,7 +127,7 @@ bool EditorSettings::_get(const StringName& p_name,Variant &r_ret) const {
|
||||
|
||||
const VariantContainer *v=props.getptr(p_name);
|
||||
if (!v) {
|
||||
//print_line("WARNING NOT FOUND: "+String(p_name));
|
||||
print_line("EditorSettings::_get - Warning, not found: "+String(p_name));
|
||||
return false;
|
||||
}
|
||||
r_ret = v->variant;
|
||||
|
@ -1319,7 +1319,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
|
||||
{
|
||||
bone_ik_list.clear();
|
||||
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()) {
|
||||
|
||||
if (E->get().from == E->get().to)
|
||||
@ -2113,11 +2113,11 @@ void CanvasItemEditor::_viewport_draw() {
|
||||
}
|
||||
|
||||
if (skeleton_show_bones) {
|
||||
int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width");
|
||||
Color bone_color1 = EditorSettings::get_singleton()->get("editors/2dbone_color1");
|
||||
Color bone_color2 = EditorSettings::get_singleton()->get("editors/2dbone_color2");
|
||||
Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2dbone_ik_color");
|
||||
Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2dbone_selected_color");
|
||||
int bone_width = EditorSettings::get_singleton()->get("editors/2d/bone_width");
|
||||
Color bone_color1 = EditorSettings::get_singleton()->get("editors/2d/bone_color1");
|
||||
Color bone_color2 = EditorSettings::get_singleton()->get("editors/2d/bone_color2");
|
||||
Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2d/bone_ik_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()) {
|
||||
|
||||
|
@ -1527,11 +1527,11 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
|
||||
if (m.mod.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;
|
||||
else if (mod == _get_key_modifier("3d_editor/zoom_modifier"))
|
||||
else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
|
||||
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;
|
||||
|
||||
} else if (nav_scheme == NAVIGATION_MAYA) {
|
||||
@ -1552,11 +1552,11 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
|
||||
mod=KEY_META;
|
||||
|
||||
if(mod){
|
||||
if (mod == _get_key_modifier("3d_editor/pan_modifier"))
|
||||
if (mod == _get_key_modifier("editors/3d/pan_modifier"))
|
||||
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;
|
||||
else if (mod == _get_key_modifier("3d_editor/orbit_modifier"))
|
||||
else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
|
||||
nav_mode = NAVIGATION_ORBIT;
|
||||
}
|
||||
}
|
||||
@ -1587,7 +1587,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
|
||||
if (nav_scheme==NAVIGATION_MAYA && m.mod.shift)
|
||||
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 ( m.relative_x > 0)
|
||||
cursor.distance*=1-m.relative_x*zoom_speed;
|
||||
@ -4095,7 +4095,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
|
||||
add_to_group("_spatial_editor_group");
|
||||
|
||||
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);
|
||||
|
||||
over_gizmo_handle=-1;
|
||||
|
Loading…
Reference in New Issue
Block a user