[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19002] branches/blender2.5/blender/source /blender/editors/transform: Record Transform Animation - Quicky feature which makes it super-easy to animate stuff quickly

Joshua Leung aligorith at gmail.com
Tue Feb 17 09:56:22 CET 2009


Revision: 19002
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19002
Author:   aligorith
Date:     2009-02-17 09:55:50 +0100 (Tue, 17 Feb 2009)

Log Message:
-----------
Record Transform Animation - Quicky feature which makes it super-easy to animate stuff quickly

To use, simply enable Auto-Keyframing and start the animation playback from the TimeLine.
Then at any time while the playback is still running (and Auto-Keyframing is still enabled), select any object/bone and start moving it around. 
You can also select other objects/bones and move them around using standard transform tools (grab/rotate/scale), or exit transform for the active/selected object(s), and move on to other objects instead. Repeat until satisfactory!

This is similar to the old 'Record IPO' functionality (and/or is closer to the 'Mouse Recording' in 3DSMax), except it's much cooler, and is more flexible at the same time. It's
"good for quick and dirty tests, or things with timing, where it's easier to do it real time" - William Reynish, or "handycam effect or eyes animation" - Pepeland.


Additional Notes:
- for now, the objects that are used for this currently need some animation data already. This limitation is temporary.
- eventually, 'samples' (i.e. baked-data) not keyframes will be made by this tool as samples are more suitable for such large sets of densely spaced points

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/transform/transform_conversions.c
    branches/blender2.5/blender/source/blender/editors/transform/transform_generics.c

Modified: branches/blender2.5/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/transform/transform_conversions.c	2009-02-17 04:32:49 UTC (rev 19001)
+++ branches/blender2.5/blender/source/blender/editors/transform/transform_conversions.c	2009-02-17 08:55:50 UTC (rev 19002)
@@ -4203,7 +4203,7 @@
 {
 	ID *id= &ob->id;
 	AnimData *adt= ob->adt;
-	bArmature *arm= ob->data;
+	//bArmature *arm= ob->data;
 	bAction	*act= (adt) ? adt->action : NULL;
 	bPose	*pose= ob->pose;
 	bPoseChannel *pchan;

Modified: branches/blender2.5/blender/source/blender/editors/transform/transform_generics.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/transform/transform_generics.c	2009-02-17 04:32:49 UTC (rev 19001)
+++ branches/blender2.5/blender/source/blender/editors/transform/transform_generics.c	2009-02-17 08:55:50 UTC (rev 19002)
@@ -561,11 +561,15 @@
 		Object *ob= t->poseobj;
 		bArmature *arm= ob->data;
 		
-		/* if animtimer is running, check if the auto-record feature means that we should record 'samples'
+		/* if animtimer is running, and the object already has animation data,
+		 * check if the auto-record feature means that we should record 'samples'
 		 * (i.e. uneditable animation values)
 		 */
-		if (t->animtimer && IS_AUTOKEY_ON(t->scene)) {
-			// XXX
+		// XXX experimental feature
+		// TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes?
+		if ((ob->adt) && (t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
+			short targetless_ik= 0; // XXX...
+			autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
 		}
 		
 		/* old optimize trick... this enforces to bypass the depgraph */
@@ -584,24 +588,16 @@
 				ob->recalc |= OB_RECALC_OB;
 			if(base->flag & BA_HAS_RECALC_DATA)
 				ob->recalc |= OB_RECALC_DATA;
-
-#if 0 // XXX old animation system
-			/* thanks to ob->ctime usage, ipos are not called in where_is_object,
-			   unless we edit ipokeys */
-			if(base->flag & BA_DO_IPO) {
-				if(ob->ipo) {
-					IpoCurve *icu;
-					
-					ob->ctime= -1234567.0;
-					
-					icu= ob->ipo->curve.first;
-					while(icu) {
-						calchandles_ipocurve(icu);
-						icu= icu->next;
-					}
-				}				
+			
+			/* if animtimer is running, and the object already has animation data,
+			 * check if the auto-record feature means that we should record 'samples'
+			 * (i.e. uneditable animation values)
+			 */
+			// XXX experimental feature
+			// TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes?
+			if ((ob->adt) && (t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
+				autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode);
 			}
-#endif // XXX old animation system
 			
 			/* proxy exception */
 			if(ob->proxy)
@@ -738,6 +734,7 @@
 		View3D *v3d = sa->spacedata.first;
 		
 		t->view = v3d;
+		t->animtimer= CTX_wm_screen(C)->animtimer;
 		
 		if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
 		t->around = v3d->around;





More information about the Bf-blender-cvs mailing list