Allow change import type without restarting editor

This commit is contained in:
kobewi
2023-07-01 01:29:46 +02:00
parent 46424488ed
commit 244968c8d1
4 changed files with 87 additions and 16 deletions

View File

@@ -1828,6 +1828,10 @@ String ResourceFormatSaverTextInstance::_write_resources(void *ud, const Ref<Res
}
String ResourceFormatSaverTextInstance::_write_resource(const Ref<Resource> &res) {
if (res->get_meta(SNAME("_skip_save_"), false)) {
return "null";
}
if (external_resources.has(res)) {
return "ExtResource(\"" + external_resources[res] + "\")";
} else {
@@ -1852,7 +1856,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
case Variant::OBJECT: {
Ref<Resource> res = p_variant;
if (res.is_null() || external_resources.has(res)) {
if (res.is_null() || external_resources.has(res) || res->get_meta(SNAME("_skip_save_"), false)) {
return;
}