From 1cb884be35e160740e97065afd6548e6a052c9d8 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Tue, 17 Oct 2017 19:39:10 +0300 Subject: Make auto handle placement aware of cyclic extrapolation. Cyclic extrapolation is implemented as an f-curve modifier, so this technically violates abstraction separation and is something of a hack. However without such behavior achieving smooth looping with cyclic extrapolation is extremely cumbersome. The new behavior is applied when the first modifier is Cyclic extrapolation in Repeat or Repeat with Offset mode without using influence, repeat count or range restrictions. This change in behavior means that curve handles have to be updated when the modifier is added, removed or its options change. Due to the way code is structured, it seems it requires a helper link to the containing curve from the modifier object. Reviewers: aligorith Differential Revision: https://developer.blender.org/D2783 --- source/blender/editors/space_nla/nla_edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index f7f7c82171d..a6f76e1d556 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -2316,7 +2316,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) continue; /* add F-Modifier of specified type to selected, and make it the active one */ - fcm = add_fmodifier(&strip->modifiers, type); + fcm = add_fmodifier(&strip->modifiers, type, NULL); if (fcm) { set_active_fmodifier(&strip->modifiers, fcm); @@ -2470,7 +2470,7 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op) } /* paste FModifiers from buffer */ - ok += ANIM_fmodifiers_paste_from_buf(&strip->modifiers, replace); + ok += ANIM_fmodifiers_paste_from_buf(&strip->modifiers, replace, NULL); ale->update |= ANIM_UPDATE_DEPS; } } -- cgit v1.2.3