[Bf-extensions-cvs] [9641357c] master: glTF importer: Workaround for image not loaded (see T69857)

Julien Duroure noreply at git.blender.org
Fri Sep 13 22:49:24 CEST 2019


Commit: 9641357c8269e8b3a032c81f37fc8aaa771b73e6
Author: Julien Duroure
Date:   Fri Sep 13 22:48:34 2019 +0200
Branches: master
https://developer.blender.org/rBA9641357c8269e8b3a032c81f37fc8aaa771b73e6

glTF importer: Workaround for image not loaded (see T69857)

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_image.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 800aeab2..fa5903e7 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, 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',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_image.py b/io_scene_gltf2/blender/imp/gltf2_blender_image.py
index 546aa7e3..95824537 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_image.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_image.py
@@ -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'] = {}



More information about the Bf-extensions-cvs mailing list