Cycles: fix instanced mesh sync being a bit too slow.

This commit is contained in:
2011-05-31 10:57:43 +00:00
parent d404c31e8d
commit 20746f6bb0
3 changed files with 9 additions and 0 deletions

View File

@@ -252,6 +252,12 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated)
}
}
/* ensure we only sync instanced meshes once */
if(mesh_synced.find(mesh) != mesh_synced.end())
return mesh;
mesh_synced.insert(mesh);
/* create derived mesh */
BL::Mesh b_mesh = object_to_mesh(b_ob, b_scene, true, !preview);
/* todo: this will crash on non-mesh types! */