From 90e9a22eaa817dcf5b0008f6c73edeab9a27f99e Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 13 Mar 2015 19:05:27 +1300 Subject: Fix for earlier commit - Turning off "animated" influence/time didn't work Reshuffled order that in which NLA Strip's F-Curves vs its automatic settings are evaluated so that the automatic settings can always override the custom settings, since it's not that easy to get things working correctly the other way around. --- source/blender/blenkernel/intern/anim_sys.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 59cc23ab8a1..b4c396d38d2 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1800,12 +1800,6 @@ static float nlastrip_get_influence(NlaStrip *strip, float cframe) /* evaluate the evaluation time and influence for the strip, storing the results in the strip */ static void nlastrip_evaluate_controls(NlaStrip *strip, float ctime) { - /* firstly, analytically generate values for influence and time (if applicable) */ - if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0) - strip->strip_time = nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL); - if ((strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) == 0) - strip->influence = nlastrip_get_influence(strip, ctime); - /* now strip's evaluate F-Curves for these settings (if applicable) */ if (strip->fcurves.first) { PointerRNA strip_ptr; @@ -1816,6 +1810,15 @@ static void nlastrip_evaluate_controls(NlaStrip *strip, float ctime) /* execute these settings as per normal */ animsys_evaluate_fcurves(&strip_ptr, &strip->fcurves, NULL, ctime); } + + /* analytically generate values for influence and time (if applicable) + * - we do this after the F-Curves have been evaluated to override the effects of those + * in case the override has been turned off. + */ + if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0) + strip->strip_time = nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL); + if ((strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) == 0) + strip->influence = nlastrip_get_influence(strip, ctime); /* if user can control the evaluation time (using F-Curves), consider the option which allows this time to be clamped * to lie within extents of the action-clip, so that a steady changing rate of progress through several cycles of the clip -- cgit v1.2.3