glTF exporter: workaround for image size copy not stored
This commit is contained in:
parent
dc2d9b0864
commit
3b088fc33d
|
@ -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, 15),
|
||||
"version": (1, 8, 16),
|
||||
'blender': (3, 1, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -245,8 +245,10 @@ def _make_temp_image_copy(guard: TmpImageGuard, src_image: bpy.types.Image):
|
|||
tmp_image = guard.image
|
||||
|
||||
tmp_image.update()
|
||||
# See #1564 and T95616
|
||||
tmp_image.scale(*src_image.size)
|
||||
|
||||
if src_image.is_dirty:
|
||||
if src_image.is_dirty: # Warning, img size change doesn't make it dirty, see T95616
|
||||
# Unsaved changes aren't copied by .copy(), so do them ourselves
|
||||
tmp_buf = np.empty(src_image.size[0] * src_image.size[1] * 4, np.float32)
|
||||
src_image.pixels.foreach_get(tmp_buf)
|
||||
|
|
Loading…
Reference in New Issue