summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-05 09:16:00 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-05 09:16:00 -0300
commit0f7af4ea51744cda23c4d3c7481f9c332973d1d4 (patch)
tree27b8914062558b5648655ccf3db13251d217af98 /tools/editor/plugins
parent9e477babb3bf0ce5179395c2a5155a3f3cd36798 (diff)
-Changed most project settings in the engine, so they have major and minor categories.
-Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp16
5 files changed, 14 insertions, 14 deletions
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index 17ed3842b2..23e2f2e712 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -380,7 +380,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
// flg |= ResourceSaver::FLAG_RELATIVE_PATHS;
- String path = Globals::get_singleton()->localize_path(p_path);
+ String path = GlobalConfig::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err != OK) {
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp
index d1933d3286..27976a6f16 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp
@@ -1464,7 +1464,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
file_dialog = memnew( EditorFileDialog );
file_dialog->set_enable_multiple_selection(true);
- file_dialog->set_current_dir(Globals::get_singleton()->get_resource_path());
+ file_dialog->set_current_dir(GlobalConfig::get_singleton()->get_resource_path());
add_child(file_dialog);
file_dialog->connect("file_selected", this, "_file_dialog_selected");
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index ef43992c3a..04b8f7ce65 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2074,7 +2074,7 @@ void CanvasItemEditor::_viewport_draw() {
VisualServer::get_singleton()->canvas_item_add_line(ci,transform.xform(display_rotate_from), transform.xform(display_rotate_to),rotate_color);
}
- Size2 screen_size = Size2( Globals::get_singleton()->get("display/width"), Globals::get_singleton()->get("display/height") );
+ Size2 screen_size = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
Vector2 screen_endpoints[4]= {
transform.xform(Vector2(0,0)),
@@ -2409,7 +2409,7 @@ void CanvasItemEditor::_update_scrollbars() {
h_scroll->set_end( Point2(size.width-vmin.width, size.height) );
- Size2 screen_rect = Size2( Globals::get_singleton()->get("display/width"), Globals::get_singleton()->get("display/height") );
+ Size2 screen_rect = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
Rect2 local_rect = Rect2(Point2(),viewport->get_size()-Size2(vmin.width,hmin.height));
@@ -3810,7 +3810,7 @@ bool CanvasItemEditorViewport::_create_instance(Node* parent, String& path, cons
}
}
- instanced_scene->set_filename( Globals::get_singleton()->localize_path(path) );
+ instanced_scene->set_filename( GlobalConfig::get_singleton()->localize_path(path) );
editor_data->get_undo_redo().add_do_method(parent,"add_child",instanced_scene);
editor_data->get_undo_redo().add_do_method(instanced_scene,"set_owner",editor->get_edited_scene());
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index c25f8191fe..d441fa7a11 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1495,7 +1495,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script, bool p_grab_focus) {
args.push_back(flagss[i]);
}
- args.push_back(Globals::get_singleton()->globalize_path(p_script->get_path()));
+ args.push_back(GlobalConfig::get_singleton()->globalize_path(p_script->get_path()));
Error err = OS::get_singleton()->execute(path,args,false);
if (err==OK)
return;
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index a577e97843..79ce7a44c3 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -1825,11 +1825,11 @@ void SpatialEditorViewport::_notification(int p_what) {
//update shadow atlas if changed
- int shadowmap_size = Globals::get_singleton()->get("rendering/shadow_atlas/size");
- int atlas_q0 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_0_subdiv");
- int atlas_q1 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_1_subdiv");
- int atlas_q2 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_2_subdiv");
- int atlas_q3 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_3_subdiv");
+ int shadowmap_size = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/size");
+ int atlas_q0 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_0_subdiv");
+ int atlas_q1 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_1_subdiv");
+ int atlas_q2 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_2_subdiv");
+ int atlas_q3 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_3_subdiv");
viewport->set_shadow_atlas_size(shadowmap_size);
@@ -1840,10 +1840,10 @@ void SpatialEditorViewport::_notification(int p_what) {
//update msaa if changed
- int msaa_mode = Globals::get_singleton()->get("rendering/antialias/msaa");
+ int msaa_mode = GlobalConfig::get_singleton()->get("rendering/antialias/msaa");
viewport->set_msaa(Viewport::MSAA(msaa_mode));
- bool hdr = Globals::get_singleton()->get("rendering/dynamic_range/hdr");
+ bool hdr = GlobalConfig::get_singleton()->get("rendering/dynamic_range/hdr");
viewport->set_hdr(hdr);
@@ -1914,7 +1914,7 @@ void SpatialEditorViewport::_draw() {
if (previewing) {
- Size2 ss = Size2( Globals::get_singleton()->get("display/width"), Globals::get_singleton()->get("display/height") );
+ Size2 ss = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
float aspect = ss.get_aspect();
Size2 s = get_size();