[Bf-blender-cvs] [2b96fa8] depsgraph_refactor: Depsgraph: Don't evaluate drivers/nla from action evaluation callback

Sergey Sharybin noreply at git.blender.org
Wed Nov 26 17:19:06 CET 2014


Commit: 2b96fa8ea9da8dad5d7940dec6f09f7e6494ff6e
Author: Sergey Sharybin
Date:   Wed Nov 26 14:36:34 2014 +0100
Branches: depsgraph_refactor
https://developer.blender.org/rB2b96fa8ea9da8dad5d7940dec6f09f7e6494ff6e

Depsgraph: Don't evaluate drivers/nla from action evaluation callback

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

M	source/blender/depsgraph/intern/depsgraph_type_defines.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cpp b/source/blender/depsgraph/intern/depsgraph_type_defines.cpp
index 3b64ce6..5058502 100644
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cpp
@@ -72,23 +72,29 @@ extern "C" {
 
 #include "stubs.h" // XXX: THIS MUST BE REMOVED WHEN THE DEPSGRAPH REFACTOR IS DONE
 
-void BKE_animsys_eval_action(EvaluationContext *eval_ctx, ID *id, bAction *action, TimeSourceDepsNode *time_src)
+void BKE_animsys_eval_action(EvaluationContext *UNUSED(eval_ctx),
+                             ID *id,
+                             bAction *action,
+                             TimeSourceDepsNode *time_src)
 {
+	AnimData *adt = BKE_animdata_from_id(id);
+	PointerRNA id_ptr;
+	float ctime = time_src->cfra;
 	printf("%s on %s\n", __func__, id->name);
-	if (ID_REAL_USERS(id) > 0) {
-		AnimData *adt = BKE_animdata_from_id(id);
-		float ctime = time_src->cfra;
-		BKE_animsys_evaluate_animdata(NULL, id, adt, ctime, ADT_RECALC_ANIM);
-	}
+	RNA_id_pointer_create(id, &id_ptr);
+	animsys_evaluate_action(&id_ptr, action, adt->remap, ctime);
 }
 
-void BKE_animsys_eval_driver(EvaluationContext *eval_ctx, ID *id, FCurve *fcurve, TimeSourceDepsNode *time_src)
+void BKE_animsys_eval_driver(EvaluationContext *UNUSED(eval_ctx),
+                             ID *id,
+                             FCurve *fcurve,
+                             TimeSourceDepsNode *time_src)
 {
 	/* TODO(sergey): De-duplicate with BKE animsys. */
 	printf("%s on %s\n", __func__, id->name);
-	if (ID_REAL_USERS(id) > 0 && (fcurve->driver->flag & DRIVER_FLAG_INVALID) == 0) {
-		float ctime = time_src->cfra;
+	if ((fcurve->driver->flag & DRIVER_FLAG_INVALID) == 0) {
 		PointerRNA id_ptr;
+		float ctime = time_src->cfra;
 		RNA_id_pointer_create(id, &id_ptr);
 		calculate_fcurve(fcurve, ctime);
 		if (!BKE_animsys_execute_fcurve(&id_ptr, NULL, fcurve)) {




More information about the Bf-blender-cvs mailing list