diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-12-13 20:09:33 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-12-13 20:09:33 +0300 |
commit | 285deaf22c279a607867158b529c0ddec01f9202 (patch) | |
tree | 5cefe4ad0d125fc67f18c75ca261cb0dbab224f6 | |
parent | 1a3f127714e8da9f0af12d9a174dae9793ae63c1 (diff) |
glTF importer: Show specific error when buffer resource is missing
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/io/imp/gltf2_io_gltf.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 31bef8b7..d8bee58c 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (1, 5, 8), + "version": (1, 5, 9), 'blender': (2, 91, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/io/imp/gltf2_io_gltf.py b/io_scene_gltf2/io/imp/gltf2_io_gltf.py index 83969d94..5bbab579 100755 --- a/io_scene_gltf2/io/imp/gltf2_io_gltf.py +++ b/io_scene_gltf2/io/imp/gltf2_io_gltf.py @@ -161,8 +161,10 @@ class glTFImporter(): if buffer.uri: data = self.load_uri(buffer.uri) - if data is not None: - self.buffers[buffer_idx] = data + if data is None: + raise ImportError("Missing resource, '" + buffer.uri + "'.") + self.buffers[buffer_idx] = data + else: # GLB-stored buffer |