[Bf-extensions-cvs] [a6008be7] master: glTF exporter: remove unused code

Julien Duroure noreply at git.blender.org
Sat Nov 30 15:56:30 CET 2019


Commit: a6008be7622c4acd85759fbb184fc803e0d26658
Author: Julien Duroure
Date:   Sat Nov 30 15:56:00 2019 +0100
Branches: master
https://developer.blender.org/rBAa6008be7622c4acd85759fbb184fc803e0d26658

glTF exporter: remove unused code

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/exp/gltf2_blender_export.py
M	io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 01ac743b..e05e588f 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,7 @@
 bl_info = {
     'name': 'glTF 2.0 format',
     'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
-    "version": (1, 1, 17),
+    "version": (1, 1, 18),
     'blender': (2, 81, 6),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_export.py b/io_scene_gltf2/blender/exp/gltf2_blender_export.py
index 8c39cfdb..06af24cc 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_export.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_export.py
@@ -49,7 +49,6 @@ def save(context, export_settings):
 
 
 def __export(export_settings):
-    export_settings['gltf_channelcache'] = dict()
     exporter = GlTF2Exporter(__get_copyright(export_settings))
     __gather_gltf(exporter, export_settings)
     buffer = __create_buffer(exporter, export_settings)
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 9f322f10..9309eb64 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
@@ -143,19 +143,6 @@ def __get_image_data(sockets_or_slots, export_settings) -> gltf2_blender_image.E
     # For shared resources, 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
     # resources.
-    def split_pixels_by_channels(image: bpy.types.Image, export_settings) -> typing.Optional[typing.List[typing.List[float]]]:
-        channelcache = export_settings['gltf_channelcache']
-        if image.name in channelcache:
-            return channelcache[image.name]
-
-        pixels = np.array(image.pixels[:])
-        pixels = pixels.reshape((pixels.shape[0] // image.channels, image.channels))
-        channels = np.split(pixels, pixels.shape[1], axis=1)
-
-        channelcache[image.name] = channels
-
-        return channels
-
     if __is_socket(sockets_or_slots):
         results = [__get_tex_from_socket(socket, export_settings) for socket in sockets_or_slots]
         composed_image = None



More information about the Bf-extensions-cvs mailing list