Skip to content
Snippets Groups Projects
Commit 38be61eb authored by Julien Duroure's avatar Julien Duroure
Browse files

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

parent 97d45772
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
bl_info = { bl_info = {
'name': 'glTF 2.0 format', 'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', '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), 'blender': (3, 0, 0),
'location': 'File > Import-Export', 'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0', 'description': 'Import-Export as glTF 2.0',
......
...@@ -189,8 +189,7 @@ class ExportImage: ...@@ -189,8 +189,7 @@ class ExportImage:
def __encode_from_image(self, image: bpy.types.Image) -> bytes: def __encode_from_image(self, image: bpy.types.Image) -> bytes:
# See if there is an existing file we can use. # See if there is an existing file we can use.
data = None data = None
if image.source == 'FILE' and image.file_format == self.file_format and \ if image.source == 'FILE' and not image.is_dirty:
not image.is_dirty:
if image.packed_file is not None: if image.packed_file is not None:
data = image.packed_file.data data = image.packed_file.data
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment