glTF importer: Workaround for image not loaded (see T69857)
This commit is contained in:
parent
7307a3c57d
commit
9641357c82
|
@ -15,7 +15,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (0, 9, 65),
|
||||
"version": (0, 9, 66),
|
||||
'blender': (2, 81, 6),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -79,6 +79,7 @@ class BlenderImage():
|
|||
return
|
||||
|
||||
blender_image = bpy.data.images.load(path)
|
||||
blender_image.reload() # workaround bug in 2.81 alpha
|
||||
blender_image.name = img_name
|
||||
blender_image['tex_transform'] = {}
|
||||
blender_image['tex_transform'][str(tex_index)] = tex_transform
|
||||
|
@ -103,6 +104,7 @@ class BlenderImage():
|
|||
tmp_image.close()
|
||||
|
||||
blender_image = bpy.data.images.load(tmp_image.name)
|
||||
blender_image.reload() # workaround bug in 2.81 alpha
|
||||
blender_image.pack()
|
||||
blender_image.name = img_name
|
||||
blender_image['tex_transform'] = {}
|
||||
|
|
Loading…
Reference in New Issue