Don't break parsing on missing resources
This commit is contained in:
parent
ef090ee6ea
commit
0765908868
2 changed files with 5 additions and 4 deletions
|
@ -1283,7 +1283,7 @@ Error VariantParser::_parse_dictionary(Dictionary &object, Stream *p_stream, int
|
||||||
|
|
||||||
Variant v;
|
Variant v;
|
||||||
err = parse_value(token, v, p_stream, line, r_err_str, p_res_parser);
|
err = parse_value(token, v, p_stream, line, r_err_str, p_res_parser);
|
||||||
if (err) {
|
if (err && err != ERR_FILE_MISSING_DEPENDENCIES) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
object[key] = v;
|
object[key] = v;
|
||||||
|
|
|
@ -144,6 +144,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R
|
||||||
}
|
}
|
||||||
|
|
||||||
String id = token.value;
|
String id = token.value;
|
||||||
|
Error err = OK;
|
||||||
|
|
||||||
if (!ignore_resource_parsing) {
|
if (!ignore_resource_parsing) {
|
||||||
if (!ext_resources.has(id)) {
|
if (!ext_resources.has(id)) {
|
||||||
|
@ -163,7 +164,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R
|
||||||
error = ERR_FILE_MISSING_DEPENDENCIES;
|
error = ERR_FILE_MISSING_DEPENDENCIES;
|
||||||
error_text = "[ext_resource] referenced nonexistent resource at: " + path;
|
error_text = "[ext_resource] referenced nonexistent resource at: " + path;
|
||||||
_printerr();
|
_printerr();
|
||||||
return error;
|
err = error;
|
||||||
} else {
|
} else {
|
||||||
ResourceLoader::notify_dependency_error(local_path, path, type);
|
ResourceLoader::notify_dependency_error(local_path, path, type);
|
||||||
}
|
}
|
||||||
|
@ -175,7 +176,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R
|
||||||
error = ERR_FILE_MISSING_DEPENDENCIES;
|
error = ERR_FILE_MISSING_DEPENDENCIES;
|
||||||
error_text = "[ext_resource] referenced non-loaded resource at: " + path;
|
error_text = "[ext_resource] referenced non-loaded resource at: " + path;
|
||||||
_printerr();
|
_printerr();
|
||||||
return error;
|
err = error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
r_res = Ref<Resource>();
|
r_res = Ref<Resource>();
|
||||||
|
@ -187,7 +188,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourceParser &parser) {
|
Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourceParser &parser) {
|
||||||
|
|
Loading…
Reference in a new issue