diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-05-12 20:36:01 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-05-12 20:37:49 +0400 |
commit | 1b1b71f6970b54d70c99e9f616f93096df261e29 (patch) | |
tree | ef408b1f0c7d8ef475e478a6abe451a8c48d724b /intern/cycles | |
parent | 70303dfefe4ccd28434eb2804985b2b78652b65b (diff) |
Fix T40149: cycles motion blur render problem with multiple render layers.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_mesh.cpp | 5 | ||||
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 83514879477..27ea552c6a7 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -616,6 +616,11 @@ void BlenderSync::sync_mesh_motion(BL::Object b_ob, Object *object, float motion mesh_motion_synced.insert(mesh); + /* ensure we only motion sync meshes that also had mesh synced, to avoid + * unnecessary work and to ensure that its attributes were clear */ + if(mesh_synced.find(mesh) == mesh_synced.end()) + return; + /* for motion pass always compute, for motion blur it can be disabled */ int time_index = 0; diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 167647608a5..ec195d8c547 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -446,7 +446,6 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, float motion_time) light_map.pre_sync(); mesh_map.pre_sync(); object_map.pre_sync(); - mesh_synced.clear(); particle_system_map.pre_sync(); motion_times.clear(); } @@ -536,7 +535,6 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, float motion_time) scene->object_manager->tag_update(scene); if(particle_system_map.post_sync()) scene->particle_system_manager->tag_update(scene); - mesh_synced.clear(); } if(motion) diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 1f5e32a1123..555692d9e21 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -142,8 +142,13 @@ void BlenderSync::sync_data(BL::SpaceView3D b_v3d, BL::Object b_override, void * sync_film(); sync_shaders(); sync_curve_settings(); + + mesh_synced.clear(); /* use for objects and motion sync */ + sync_objects(b_v3d); sync_motion(b_v3d, b_override, python_thread_state); + + mesh_synced.clear(); } /* Integrator */ |