summaryrefslogtreecommitdiffstats
path: root/modules/gltf/editor_scene_importer_gltf.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2021-03-19 09:57:52 -0300
committerJuan Linietsky <juan@godotengine.org>2021-03-22 12:16:40 -0300
commit97a3a662205d598dad195fa72d2dcb2f19c21088 (patch)
tree7d35031e64f59f1a6d4a66aaac9492cdffbefe47 /modules/gltf/editor_scene_importer_gltf.cpp
parent07f076fa4f2896415993bb8e3fb42128423de0d2 (diff)
downloadredot-engine-97a3a662205d598dad195fa72d2dcb2f19c21088.tar.gz
Improved 3D Scene Importer
* Added option for importers to show an Advanced settings dialog * Created advanced settings dialog for Scene Importer * Cleaned up importers (remove many old/unused options) * Added the ability to customize every node, material, mesh and animation individually * Saving to animations and meshes to files is now a manual process, making it more predictable * Added the ability for materials to be replaced by external files (or to be made external, up to you). * When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it. WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
Diffstat (limited to 'modules/gltf/editor_scene_importer_gltf.cpp')
-rw-r--r--modules/gltf/editor_scene_importer_gltf.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gltf/editor_scene_importer_gltf.cpp b/modules/gltf/editor_scene_importer_gltf.cpp
index 6ea722a216..35f44ca122 100644
--- a/modules/gltf/editor_scene_importer_gltf.cpp
+++ b/modules/gltf/editor_scene_importer_gltf.cpp
@@ -99,7 +99,9 @@ Node *PackedSceneGLTF::import_scene(const String &p_path, uint32_t p_flags,
Ref<GLTFDocument> gltf_document;
gltf_document.instance();
Error err = gltf_document->parse(r_state, p_path);
- *r_err = err;
+ if (r_err) {
+ *r_err = err;
+ }
ERR_FAIL_COND_V(err != Error::OK, nullptr);
Node3D *root = memnew(Node3D);