diff options
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r-- | intern/cycles/blender/blender_util.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index e50b1a4760e..3cf75b338dc 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -573,7 +573,8 @@ static inline BL::FluidDomainSettings object_fluid_gas_domain_find(BL::Object &b } static inline BL::MeshSequenceCacheModifier object_mesh_cache_find(BL::Object &b_ob, - bool check_velocity) + bool check_velocity, + bool *has_subdivision_modifier) { for (int i = b_ob.modifiers.length() - 1; i >= 0; --i) { BL::Modifier b_mod = b_ob.modifiers[i]; @@ -595,6 +596,15 @@ static inline BL::MeshSequenceCacheModifier object_mesh_cache_find(BL::Object &b continue; } + /* Only skip the subsurf modifier if we are not checking for the mesh sequence cache modifier + * for motion blur. */ + if (b_mod.type() == BL::Modifier::type_SUBSURF && !check_velocity) { + if (has_subdivision_modifier) { + *has_subdivision_modifier = true; + } + continue; + } + break; } |