Cycles: Support deformation motion blur for curves deformed by taper

This commit is contained in:
Sergey Sharybin 2016-04-01 15:53:40 +02:00
parent f318e8322f
commit 9ca9256693

@ -3653,6 +3653,14 @@ static bool object_moves_in_time(Object *object)
return false;
}
static bool object_deforms_in_time(Object *object)
{
if (BKE_key_from_object(object) != NULL) {
return true;
}
return object_moves_in_time(object);
}
static bool constructive_modifier_is_deform_modified(ModifierData *md)
{
/* TODO(sergey): Consider generalizing this a bit so all modifier logic
@ -3712,8 +3720,16 @@ int BKE_object_is_deform_modified(Scene *scene, Object *ob)
int flag = 0;
const bool is_modifier_animated = modifiers_has_animation_check(ob);
if (BKE_key_from_object(ob))
if (BKE_key_from_object(ob)) {
flag |= eModifierMode_Realtime | eModifierMode_Render;
}
if (ob->type == OB_CURVE) {
Curve *cu = (Curve *)ob->data;
if (cu->taperobj != NULL && object_deforms_in_time(cu->taperobj)) {
flag |= eModifierMode_Realtime | eModifierMode_Render;
}
}
/* cloth */
for (md = modifiers_getVirtualModifierList(ob, &virtualModifierData);