Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2020-01-29 23:39:42 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-01-29 23:39:42 +0300
commitc8846a9e1a07b356523cc5e36227d469706fdc08 (patch)
tree72084b9cce668dcc1cc35bb90c682f340f29f436 /io_scene_gltf2/blender/exp/gltf2_blender_image.py
parenta9e4f549520d325dd90916612d654c39375f3e92 (diff)
glTF exporter: fix image texture export.
Some weird stuff, probably linked to a Blender bug
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_image.py')
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_image.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_image.py b/io_scene_gltf2/blender/exp/gltf2_blender_image.py
index 4a7818fe..6afb0871 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_image.py
@@ -284,6 +284,7 @@ class ExportImage:
tmp_image = None
try:
tmp_image = image.copy()
+ tmp_image.update()
if image.is_dirty:
tmp_image.pixels = image.pixels[:]
@@ -298,9 +299,6 @@ def _encode_temp_image(tmp_image: bpy.types.Image, file_format: str) -> bytes:
tmpfilename = tmpdirname + '/img'
tmp_image.filepath_raw = tmpfilename
- # NOT A TYPO!!! If you delete this line, the
- # assignment on the next line will not work.
- tmp_image.file_format
tmp_image.file_format = file_format
tmp_image.save()