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>2018-11-27 22:59:55 +0300
committerJulien Duroure <julien.duroure@gmail.com>2018-11-27 22:59:55 +0300
commit74dbec774ef5e10f1b3475682efe286da8fed4cc (patch)
tree88ae822fee83f7188deeb0774b131d6300037fa5 /io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
parenta12a93cbdffe78998b494175d5012fb1a79e2826 (diff)
glTF addon: updates from upstream
* invalidate cache for multiple exports * exporter: support KHR_lights_punctual * fixed lights * disable export all layers * fixed texture slot images stalling export * option to enable exporting more than 4 influences from upsteam commit 26699c476211add92d13df0a284b8df2f08acb3e to upstream commit 7a8f733fc446cfb3880a8c1658bccf94bcfd456c
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_image.py4
1 files changed, 2 insertions, 2 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 4941ffe2..b89f51d7 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
@@ -98,7 +98,7 @@ def __get_image_data(sockets_or_slots):
# For shared ressources, such as images, we just store the portion of data that is needed in the glTF property
# in a helper class. During generation of the glTF in the exporter these will then be combined to actual binary
# ressources.
- def split_pixels_by_channels(image: bpy.types.Image) -> typing.Iterable[typing.Iterable[float]]:
+ def split_pixels_by_channels(image: bpy.types.Image) -> typing.List[typing.List[float]]:
pixels = np.array(image.pixels)
pixels = pixels.reshape((pixels.shape[0] // image.channels, image.channels))
channels = np.split(pixels, pixels.shape[1], axis=1)
@@ -139,7 +139,7 @@ def __get_image_data(sockets_or_slots):
return image
elif __is_slot(sockets_or_slots):
texture = __get_tex_from_slot(sockets_or_slots[0])
- pixels = texture.image.pixels
+ pixels = split_pixels_by_channels(texture.image)
image_data = gltf2_io_image_data.ImageData(
texture.name,