You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
-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
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user