|
|
@ -243,7 +243,9 @@ class MeshConverter: |
|
|
|
geospan.vertices = data.vertices |
|
|
|
geospan.vertices = data.vertices |
|
|
|
|
|
|
|
|
|
|
|
def export_object(self, bo): |
|
|
|
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) |
|
|
|
drawables = self._mesh_geospans.get(bo.data, None) |
|
|
|
if drawables is None: |
|
|
|
if drawables is None: |
|
|
|
drawables = self._export_mesh(bo) |
|
|
|
drawables = self._export_mesh(bo) |
|
|
@ -258,9 +260,8 @@ class MeshConverter: |
|
|
|
self._export_static_lighting(bo) |
|
|
|
self._export_static_lighting(bo) |
|
|
|
|
|
|
|
|
|
|
|
# Step 0.9: Update the mesh such that we can do things and schtuff... |
|
|
|
# Step 0.9: Update the mesh such that we can do things and schtuff... |
|
|
|
mesh = bo.data |
|
|
|
mesh = bo.to_mesh(bpy.context.scene, True, "RENDER", calc_tessface=True) |
|
|
|
mesh.update(calc_tessface=True) |
|
|
|
with helpers.TemporaryObject(mesh, bpy.data.meshes.remove): |
|
|
|
|
|
|
|
|
|
|
|
# Step 1: Export all of the doggone materials. |
|
|
|
# Step 1: Export all of the doggone materials. |
|
|
|
geospans = self._export_material_spans(bo, mesh) |
|
|
|
geospans = self._export_material_spans(bo, mesh) |
|
|
|
|
|
|
|
|
|
|
|