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>2019-08-25 11:05:32 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-08-25 11:06:37 +0300
commita9283e526feaab2b124d6634c0b20f390e41e2ad (patch)
tree040cc7e91ca71d97e75b0610d475e2b7f15900da /io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
parentfb55d80bfbf656d794ac02103065eaa9a2377d4c (diff)
glTF exporter: Fix T68822 speedup pixel transfer from blender to numpy
if more speed is needed, we will need to check API side
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_image.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
index a92de291..9f322f10 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
@@ -148,7 +148,7 @@ def __get_image_data(sockets_or_slots, export_settings) -> gltf2_blender_image.E
if image.name in channelcache:
return channelcache[image.name]
- pixels = np.array(image.pixels)
+ pixels = np.array(image.pixels[:])
pixels = pixels.reshape((pixels.shape[0] // image.channels, image.channels))
channels = np.split(pixels, pixels.shape[1], axis=1)