diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2022-06-25 07:40:58 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2022-06-25 07:40:58 +0300 |
commit | a2650c0158eeb6488e21204887c98d376d881f72 (patch) | |
tree | b5a0c61c0b8cc630657bac6ab62ca7c2927437c6 /io_scene_gltf2/blender | |
parent | 038db9d607b352f6a7391c5a6b3ab906692c9421 (diff) |
glTF importer: Add missing image name
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_image.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_image.py b/io_scene_gltf2/blender/imp/gltf2_blender_image.py index 4f9af799..abce0354 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_image.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_image.py @@ -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) |