summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-10-04 08:58:28 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-10-04 09:47:34 -0700
commitfc1634806a7edd3f0e1d84538b8e876f68f2b94a (patch)
tree49a2f0810ef3f59948b8c64d6e49c7d460dd127c
parent865b62b1cddbb7989bc520eed2d8428c6923fee9 (diff)
Enable GLTFDocumentExtensionConvertImporterMesh only in games.
-rw-r--r--modules/gltf/doc_classes/GLTFDocument.xml2
-rw-r--r--modules/gltf/gltf_document.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/gltf/doc_classes/GLTFDocument.xml b/modules/gltf/doc_classes/GLTFDocument.xml
index 77c45da34d..8d8e25e8b3 100644
--- a/modules/gltf/doc_classes/GLTFDocument.xml
+++ b/modules/gltf/doc_classes/GLTFDocument.xml
@@ -31,7 +31,7 @@
</method>
</methods>
<members>
- <member name="extensions" type="GLTFDocumentExtension[]" setter="set_extensions" getter="get_extensions" default="[Object(GLTFDocumentExtensionConvertImporterMesh,&quot;resource_local_to_scene&quot;:false,&quot;resource_name&quot;:&quot;&quot;,&quot;script&quot;:null)]">
+ <member name="extensions" type="GLTFDocumentExtension[]" setter="set_extensions" getter="get_extensions" default="[]">
</member>
</members>
</class>
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index c7818e7e86..ba98592600 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -6887,7 +6887,8 @@ TypedArray<GLTFDocumentExtension> GLTFDocument::get_extensions() const {
}
GLTFDocument::GLTFDocument() {
- if (!::Engine::get_singleton()->is_editor_hint()) {
+ bool is_editor = ::Engine::get_singleton()->is_editor_hint();
+ if (is_editor) {
return;
}
Ref<GLTFDocumentExtensionConvertImporterMesh> extension_editor;