From 8970758f8e5be4e0344894327ba30420aea3227c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 15 Feb 2016 18:39:09 -0500 Subject: [PATCH] bpy.types.Mesh.materials is an ebil liar! --- korman/exporter/mesh.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index d096683..02e90e2 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -165,8 +165,8 @@ class MeshConverter: # at home (and actually enjoys reading these lawgs) print(" Bounds and SpaceTree in the saddle") - def _export_geometry(self, bo, mesh, geospans): - geodata = [_GeoData(len(mesh.vertices)) for i in mesh.materials] + def _export_geometry(self, bo, mesh, materials, geospans): + geodata = [_GeoData(len(mesh.vertices)) for i in materials] # Locate relevant vertex color layers now... color, alpha = None, None @@ -283,7 +283,7 @@ class MeshConverter: geospans = self._export_material_spans(bo, mesh, materials) # Step 2: Export Blender mesh data to Plasma GeometrySpans - self._export_geometry(bo, mesh, geospans) + self._export_geometry(bo, mesh, materials, geospans) # Step 3: Add plGeometrySpans to the appropriate DSpan and create indices _diindices = {}