[Bf-blender-cvs] [90e9a22] master: Fix for earlier commit - Turning off "animated" influence/time didn't work

Joshua Leung noreply at git.blender.org
Sat Mar 28 15:08:03 CET 2015


Commit: 90e9a22eaa817dcf5b0008f6c73edeab9a27f99e
Author: Joshua Leung
Date:   Fri Mar 13 19:05:27 2015 +1300
Branches: master
https://developer.blender.org/rB90e9a22eaa817dcf5b0008f6c73edeab9a27f99e

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.

===================================================================

M	source/blender/blenkernel/intern/anim_sys.c

===================================================================

diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 59cc23a..b4c396d 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




More information about the Bf-blender-cvs mailing list