mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Allow change import type without restarting editor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user