[Bf-blender-cvs] [df33aff] temp_motionpaths: Enable motion curve update for armatures as well.

Antony Riakiotakis noreply at git.blender.org
Mon Mar 2 19:29:04 CET 2015


Commit: df33afff86593d85012bf458248628e109b7fce7
Author: Antony Riakiotakis
Date:   Mon Mar 2 19:28:53 2015 +0100
Branches: temp_motionpaths
https://developer.blender.org/rBdf33afff86593d85012bf458248628e109b7fce7

Enable motion curve update for armatures as well.

This is currently brute force updating, also disabled object copies
but it's likely that we'll need those to do threaded update of the
motionpaths.

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

M	source/blender/blenkernel/intern/anim.c
M	source/blender/editors/transform/transform.c

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

diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 478c9f0..e384097 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -290,16 +290,16 @@ static void motionpaths_calc_optimise_depsgraph(Scene *scene, ListBase *targets)
 			baseNext = base->next;
 			
 			if ((base->object == mpt->ob) && !(mpt->ob->flag & BA_TEMP_TAG)) {
-				Object *ob = BKE_object_copy(mpt->ob);
-				Base *basen = MEM_mallocN(sizeof(Base), "duplibase");
-				*basen = *base;
-				basen->object = ob;
-				mpt->base_copy = basen;
-				ob->flag |= BA_TEMP_TAG;
+//				Object *ob = BKE_object_copy(mpt->ob);
+//				Base *basen = MEM_mallocN(sizeof(Base), "duplibase");
+//				*basen = *base;
+//				basen->object = ob;
+//				mpt->base_copy = basen;
+//				ob->flag |= BA_TEMP_TAG;
 
-				//BLI_remlink(&scene->base, base);
-				//BLI_addhead(&scene->base, base);
-				BLI_addhead(&scene->base, basen);   /* addhead: prevent eternal loop */
+				BLI_remlink(&scene->base, base);
+				BLI_addhead(&scene->base, base);
+				//BLI_addhead(&scene->base, basen);
 
 				mpt->ob->flag |= BA_TEMP_TAG;
 
@@ -396,7 +396,8 @@ static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
 		}
 		else {
 			/* worldspace object location */
-			copy_v3_v3(mpv->co, mpt->base_copy->object->obmat[3]);
+			copy_v3_v3(mpv->co, mpt->ob->obmat[3]);
+			//copy_v3_v3(mpv->co, mpt->base_copy->object->obmat[3]);
 		}
 	}
 }
@@ -460,6 +461,7 @@ void animviz_calc_motionpaths(Scene *scene, ListBase *targets)
 		/* clear the flag requesting recalculation of targets */
 		avs->recalc &= ~ANIMVIZ_RECALC_PATHS;
 
+		/*
 		if (mpt->base_copy) {
 			DAG_id_type_tag(G.main, ID_OB);
 			DAG_relations_tag_update(G.main);
@@ -468,6 +470,7 @@ void animviz_calc_motionpaths(Scene *scene, ListBase *targets)
 			if (scene->basact == mpt->base_copy) scene->basact = NULL;
 			MEM_freeN(mpt->base_copy);
 		}
+		*/
 	}
 }
 
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 3ae1821..eeeb0d6 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2360,7 +2360,9 @@ void transformApply(bContext *C, TransInfo *t)
 	if ((t->flag & T_POSE) && (t->poseobj) && (t->mode != TFM_DUMMY) && t->scene->toolsettings->realtime_motion_path) {
 		if ((t->poseobj->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) {
 			//ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
-			ED_pose_recalculate_paths(t->scene, t->poseobj);
+			int targetless_ik = (t->flag & T_AUTOIK); // XXX this currently doesn't work, since flags aren't set yet!
+
+			autokeyframe_pose_cb_func(C, t->scene, (View3D *)t->view, t->poseobj, t->mode, targetless_ik);
 		}
 	}
 	else {




More information about the Bf-blender-cvs mailing list