Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-02-17 11:55:50 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-17 11:55:50 +0300
commite81fde5aa41f6dbaed3af0105cc268a6d4f3588c (patch)
treefba7407323deecf9408a3b0d3bcb975477aca698 /source/blender/editors/transform/transform_generics.c
parent312c8229457de7cc37eb29d05a5ceeaba9ac7f78 (diff)
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
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r--source/blender/editors/transform/transform_generics.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 479d750865d..7c865e91c40 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -561,11 +561,15 @@ void recalcData(TransInfo *t)
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 @@ void recalcData(TransInfo *t)
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 @@ void initTransInfo (bContext *C, TransInfo *t, wmEvent *event)
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;