mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
-Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
This commit is contained in:
@@ -306,7 +306,7 @@ void Collada::_parse_image(XMLParser &parser) {
|
||||
String path = parser.get_attribute_value("source").strip_edges();
|
||||
if (path.find("://") == -1 && path.is_rel_path()) {
|
||||
// path is relative to file being loaded, so convert to a resource path
|
||||
image.path = GlobalConfig::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path.percent_decode());
|
||||
image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path.percent_decode());
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -323,11 +323,11 @@ void Collada::_parse_image(XMLParser &parser) {
|
||||
|
||||
if (path.find("://") == -1 && path.is_rel_path()) {
|
||||
// path is relative to file being loaded, so convert to a resource path
|
||||
path = GlobalConfig::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path);
|
||||
path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path);
|
||||
|
||||
} else if (path.find("file:///") == 0) {
|
||||
path = path.replace_first("file:///", "");
|
||||
path = GlobalConfig::get_singleton()->localize_path(path);
|
||||
path = ProjectSettings::get_singleton()->localize_path(path);
|
||||
}
|
||||
|
||||
image.path = path;
|
||||
@@ -2556,7 +2556,7 @@ Error Collada::load(const String &p_path, int p_flags) {
|
||||
Error err = parser.open(p_path);
|
||||
ERR_FAIL_COND_V(err, err);
|
||||
|
||||
state.local_path = GlobalConfig::get_singleton()->localize_path(p_path);
|
||||
state.local_path = ProjectSettings::get_singleton()->localize_path(p_path);
|
||||
state.import_flags = p_flags;
|
||||
/* Skip headers */
|
||||
err = OK;
|
||||
|
||||
Reference in New Issue
Block a user