glTF importer: Show specific error when buffer resource is missing

This commit is contained in:
Julien Duroure 2020-12-13 18:09:33 +01:00
parent 1a3f127714
commit 285deaf22c
2 changed files with 5 additions and 3 deletions

View File

@ -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',

View File

@ -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