summaryrefslogtreecommitdiffstats
path: root/core/io/resource_format_xml.cpp
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 /core/io/resource_format_xml.cpp
parent9e477babb3bf0ce5179395c2a5155a3f3cd36798 (diff)
downloadredot-engine-0f7af4ea51744cda23c4d3c7481f9c332973d1d4.tar.gz
-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 'core/io/resource_format_xml.cpp')
-rw-r--r--core/io/resource_format_xml.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index 7bb9e2efb7..d4808d4741 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -467,7 +467,7 @@ Error ResourceInteractiveLoaderXML::parse_property(Variant& r_v, String &r_name)
path=path.replace("local://",local_path+"::");
else if (path.find("://")==-1 && path.is_rel_path()) {
// path is relative to file being loaded, so convert to a resource path
- path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
+ path=GlobalConfig::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}
@@ -1425,7 +1425,7 @@ Error ResourceInteractiveLoaderXML::poll() {
if (path.find("://")==-1 && path.is_rel_path()) {
// path is relative to file being loaded, so convert to a resource path
- path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
+ path=GlobalConfig::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}
if (remaps.has(path)) {
@@ -1622,7 +1622,7 @@ void ResourceInteractiveLoaderXML::get_dependencies(FileAccess *f,List<String> *
if (path.find("://")==-1 && path.is_rel_path()) {
// path is relative to file being loaded, so convert to a resource path
- path=Globals::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
+ path=GlobalConfig::get_singleton()->localize_path(local_path.get_base_dir().plus_file(path));
}
if (path.ends_with("*")) {
@@ -1760,7 +1760,7 @@ Error ResourceInteractiveLoaderXML::rename_dependencies(FileAccess *p_f, const S
}
Ref<ResourceInteractiveLoaderXML> ria = memnew( ResourceInteractiveLoaderXML );
- ria->local_path=Globals::get_singleton()->localize_path(p_path);
+ ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
ria->remaps=p_map;
// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
@@ -1924,7 +1924,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderXML::load_interactive(const S
}
Ref<ResourceInteractiveLoaderXML> ria = memnew( ResourceInteractiveLoaderXML );
- ria->local_path=Globals::get_singleton()->localize_path(p_path);
+ ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->open(f);
@@ -1989,7 +1989,7 @@ String ResourceFormatLoaderXML::get_resource_type(const String &p_path) const{
}
Ref<ResourceInteractiveLoaderXML> ria = memnew( ResourceInteractiveLoaderXML );
- ria->local_path=Globals::get_singleton()->localize_path(p_path);
+ ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
String r = ria->recognize(f);
@@ -2006,7 +2006,7 @@ void ResourceFormatLoaderXML::get_dependencies(const String& p_path,List<String>
}
Ref<ResourceInteractiveLoaderXML> ria = memnew( ResourceInteractiveLoaderXML );
- ria->local_path=Globals::get_singleton()->localize_path(p_path);
+ ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->get_dependencies(f,p_dependencies,p_add_types);
@@ -2023,7 +2023,7 @@ Error ResourceFormatLoaderXML::rename_dependencies(const String &p_path,const Ma
}
Ref<ResourceInteractiveLoaderXML> ria = memnew( ResourceInteractiveLoaderXML );
- ria->local_path=Globals::get_singleton()->localize_path(p_path);
+ ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path);
ria->res_path=ria->local_path;
// ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
return ria->rename_dependencies(f,p_path,p_map);
@@ -2716,7 +2716,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
ERR_FAIL_COND_V( err, ERR_CANT_OPEN );
FileAccessRef _fref(f);
- local_path = Globals::get_singleton()->localize_path(p_path);
+ local_path = GlobalConfig::get_singleton()->localize_path(p_path);
relative_paths=p_flags&ResourceSaver::FLAG_RELATIVE_PATHS;
skip_editor=p_flags&ResourceSaver::FLAG_OMIT_EDITOR_PROPERTIES;