Browse Source

applied fix to buffergeometry methods

Ryan Lee 8 years ago
parent
commit
53f0cf20d2

+ 1 - 1
utils/exporters/blender/addons/io_three/exporter/api/mesh.py

@@ -185,7 +185,7 @@ def buffer_normal(mesh, options):
 
 
 
 
 @_mesh
 @_mesh
-def buffer_position(mesh):
+def buffer_position(mesh, options):
     """
     """
 
 
     :param mesh:
     :param mesh:

+ 2 - 2
utils/exporters/blender/addons/io_three/exporter/geometry.py

@@ -373,13 +373,13 @@ class Geometry(base_classes.BaseNode):
         option_index_type = self.options.get(constants.INDEX_TYPE)
         option_index_type = self.options.get(constants.INDEX_TYPE)
 
 
         pos_tuple = (constants.POSITION, options_vertices,
         pos_tuple = (constants.POSITION, options_vertices,
-                     api.mesh.buffer_position, 3)
+                     lambda m: api.mesh.buffer_position(m, self.options), 3)
         uvs_tuple = (constants.UV, option_uvs,
         uvs_tuple = (constants.UV, option_uvs,
                      api.mesh.buffer_uv, 2)
                      api.mesh.buffer_uv, 2)
         uvs2_tuple = (constants.UV2, option_uvs,
         uvs2_tuple = (constants.UV2, option_uvs,
                      lambda m: api.mesh.buffer_uv(m, layer=1), 2)
                      lambda m: api.mesh.buffer_uv(m, layer=1), 2)
         normals_tuple = (constants.NORMAL, option_normals,
         normals_tuple = (constants.NORMAL, option_normals,
-                         api.mesh.buffer_normal, 3)
+                         lambda m: api.mesh.buffer_normal(m, self.options), 3)
         dispatch = (pos_tuple, uvs_tuple, uvs2_tuple, normals_tuple)
         dispatch = (pos_tuple, uvs_tuple, uvs2_tuple, normals_tuple)
 
 
         for key, option, func, size in dispatch:
         for key, option, func, size in dispatch: