Browse Source

Ensure object modifiers are applied to meshes

pull/8/head
Adam Johnson 10 years ago
parent
commit
65da157066
  1. 9
      korman/exporter/mesh.py

9
korman/exporter/mesh.py

@ -243,7 +243,9 @@ class MeshConverter:
geospan.vertices = data.vertices
def export_object(self, bo):
# Have we already exported this mesh?
# If this object has modifiers, then it's a unique mesh, and we don't need to try caching it
# Otherwise, let's *try* to share meshes as best we can...
if not bo.modifiers:
drawables = self._mesh_geospans.get(bo.data, None)
if drawables is None:
drawables = self._export_mesh(bo)
@ -258,9 +260,8 @@ class MeshConverter:
self._export_static_lighting(bo)
# Step 0.9: Update the mesh such that we can do things and schtuff...
mesh = bo.data
mesh.update(calc_tessface=True)
mesh = bo.to_mesh(bpy.context.scene, True, "RENDER", calc_tessface=True)
with helpers.TemporaryObject(mesh, bpy.data.meshes.remove):
# Step 1: Export all of the doggone materials.
geospans = self._export_material_spans(bo, mesh)

Loading…
Cancel
Save