glTF importer: Add missing image name

This commit is contained in:
Julien Duroure 2022-06-25 06:40:58 +02:00
parent 038db9d607
commit a2650c0158
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,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": (3, 3, 5),
"version": (3, 3, 6),
'blender': (3, 3, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -83,7 +83,7 @@ def create_from_data(gltf, img_idx):
img_data = BinaryData.get_image_data(gltf, img_idx)
if img_data is None:
return
img_name = 'Image_%d' % img_idx
img_name = gltf.data.images[img_idx].name or 'Image_%d' % img_idx
# Create image, width and height are dummy values
blender_image = bpy.data.images.new(img_name, 8, 8)