diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-25 12:05:00 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-25 12:05:00 +0400 |
commit | 2a448448702a1805a9d249f1a49b5f886feb146c (patch) | |
tree | df01f3c0a1532406eb70ead51e79f5a5a121f027 /intern/cycles/blender/blender_mesh.cpp | |
parent | ca1bca442ab3ae6ab4332a24a784a1c79bde4e27 (diff) |
Fix T41532: Some files bounce back and forth between 'packing BVH nodes' and 'Copying Transforms to Device'
This was originally caused by a6ae12a where i didn't foresee unclear distinguishing
between empty and non-synced meshes will give issues for the viewport. They're the
same for final rendering, but for viewport we need to be accurate here.
Diffstat (limited to 'intern/cycles/blender/blender_mesh.cpp')
-rw-r--r-- | intern/cycles/blender/blender_mesh.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 0f7d14ee411..a5e4b7bd2ae 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -529,14 +529,12 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tri Mesh *mesh; if(!mesh_map.sync(&mesh, key)) { - bool have_geometry = mesh->verts.size() != 0; - /* if transform was applied to mesh, need full update */ if(object_updated && mesh->transform_applied); /* test if shaders changed, these can be object level so mesh * does not get tagged for recalc */ else if(mesh->used_shaders != used_shaders); - else if(use_mesh_geometry != have_geometry); + else if(use_mesh_geometry != mesh->geometry_synced); else { /* even if not tagged for recalc, we may need to sync anyway * because the shader needs different mesh attributes */ @@ -599,6 +597,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tri /* free derived mesh */ b_data.meshes.remove(b_mesh); } + mesh->geometry_synced = true; } /* displacement method */ |