glTF exporter: images may be needlessly re-encoded in some cases

This commit is contained in:
Julien Duroure 2022-01-20 18:36:14 +01:00
parent 97d4577285
commit 38be61ebb8
2 changed files with 2 additions and 3 deletions

View File

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

View File

@ -189,8 +189,7 @@ class ExportImage:
def __encode_from_image(self, image: bpy.types.Image) -> bytes:
# See if there is an existing file we can use.
data = None
if image.source == 'FILE' and image.file_format == self.file_format and \
not image.is_dirty:
if image.source == 'FILE' and not image.is_dirty:
if image.packed_file is not None:
data = image.packed_file.data
else: