summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd16
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference.out1
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd2
-rw-r--r--modules/gltf/editor/editor_scene_importer_fbx.cpp2
4 files changed, 20 insertions, 1 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd
new file mode 100644
index 0000000000..c7553769da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd
@@ -0,0 +1,16 @@
+# https://github.com/godotengine/godot/issues/61636
+
+const External := preload("const_class_reference_external.notest.gd")
+
+class Class1:
+ class Class2:
+ pass
+
+const Class1Alias = Class1
+const Class1Class2Alias = Class1.Class2
+
+const ExternalAlias = External
+const ExternalClassAlias = External.Class
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd b/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd
new file mode 100644
index 0000000000..050e8a0960
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd
@@ -0,0 +1,2 @@
+class Class:
+ pass
diff --git a/modules/gltf/editor/editor_scene_importer_fbx.cpp b/modules/gltf/editor/editor_scene_importer_fbx.cpp
index f8f458fcc7..5e7a8f4e69 100644
--- a/modules/gltf/editor/editor_scene_importer_fbx.cpp
+++ b/modules/gltf/editor/editor_scene_importer_fbx.cpp
@@ -93,7 +93,7 @@ Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t
Ref<GLTFState> state;
state.instantiate();
print_verbose(vformat("glTF path: %s", sink));
- Error err = gltf->append_from_file(sink, state, p_flags);
+ Error err = gltf->append_from_file(sink, state, p_flags, p_path.get_base_dir());
if (err != OK) {
if (r_err) {
*r_err = FAILED;