summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_data.cpp5
-rw-r--r--editor/import/resource_importer_texture.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index bd6ce797b5..5942348999 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -857,11 +857,16 @@ bool EditorData::script_class_is_parent(const String &p_class, const String &p_i
if (!ScriptServer::is_global_class(p_class))
return false;
String base = script_class_get_base(p_class);
+ Ref<Script> script = ResourceLoader::load(ScriptServer::get_global_class_path(p_class), "Script");
+ Ref<Script> base_script = script->get_base_script();
+
while (p_inherits != base) {
if (ClassDB::class_exists(base)) {
return ClassDB::is_parent_class(base, p_inherits);
} else if (ScriptServer::is_global_class(base)) {
base = script_class_get_base(base);
+ } else if (base_script.is_valid()) {
+ return ClassDB::is_parent_class(base_script->get_instance_base_type(), p_inherits);
} else {
return false;
}
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index b38f4c4f14..724203831c 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -415,7 +415,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
image->resize(new_width, new_height, Image::INTERPOLATE_CUBIC);
}
- if (normal) {
+ if (normal == 1) {
image->normalize();
}
}