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-07-31 11:43:47 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-31 11:43:47 +0400
commita1eef5bb4d1ac64cfde0a5055a889116ee855b7f (patch)
tree9d6d41c69b672868f0e8f09d7dd0430cc4ade00b /source/blender/editors/screen
parent6f847863a131cc61addbe6485abf2f24ae150ff1 (diff)
Animato - NLA + Realtime Animating Goodies
* When doing realtime recording of animation (i.e. transforming objects + bones while animation playback is running, and auto-keying is enabled), animation will be added to a new NLA Track+Strip combo everytime a single 'loop' of the frame range has finished. This will allow 'passes' over the animation to be less destructive. * Made the evaluation of the active action (when NLA data is present), be handled as part of the normal NLA system evaluation code (as if it were just another strip in a track at the end). The immediate benefit is that there are now some settings (available in the "Animation Data" panel in the NLA Editor with a strip selected) which allow for the way the active action is combined with the NLA stack results. For instance, the way that the action extrapolates is used in the recording tweaks above.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c29
2 files changed, 21 insertions, 10 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 817959aef13..926768c98ab 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1477,7 +1477,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int enable)
screen->animtimer= WM_event_add_window_timer(win, TIMER0, (1.0/FPS));
sad->ar= CTX_wm_region(C);
sad->redraws= redraws;
- sad->reverse= (enable < 0);
+ sad->flag= (enable < 0) ? ANIMPLAY_FLAG_REVERSE : 0;
screen->animtimer->customdata= sad;
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 07454088604..c9e30b8c879 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2197,39 +2197,50 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
if(scene->audio.flag & AUDIO_SYNC) {
int step = floor(wt->duration * FPS);
- if (sad->reverse) // XXX does this option work with audio?
+ if (sad->flag & ANIMPLAY_FLAG_REVERSE) // XXX does this option work with audio?
scene->r.cfra -= step;
else
scene->r.cfra += step;
wt->duration -= ((float)step)/FPS;
}
else {
- if (sad->reverse)
+ if (sad->flag & ANIMPLAY_FLAG_REVERSE)
scene->r.cfra--;
else
scene->r.cfra++;
}
- if (sad->reverse) {
- /* jump back to end */
+ /* reset 'jumped' flag before checking if we need to jump... */
+ sad->flag &= ~ANIMPLAY_FLAG_JUMPED;
+
+ if (sad->flag & ANIMPLAY_FLAG_REVERSE) {
+ /* jump back to end? */
if (scene->r.psfra) {
- if(scene->r.cfra < scene->r.psfra)
+ if (scene->r.cfra < scene->r.psfra) {
scene->r.cfra= scene->r.pefra;
+ sad->flag |= ANIMPLAY_FLAG_JUMPED;
+ }
}
else {
- if(scene->r.cfra < scene->r.sfra)
+ if (scene->r.cfra < scene->r.sfra) {
scene->r.cfra= scene->r.efra;
+ sad->flag |= ANIMPLAY_FLAG_JUMPED;
+ }
}
}
else {
- /* jump back to start */
+ /* jump back to start? */
if (scene->r.psfra) {
- if(scene->r.cfra > scene->r.pefra)
+ if (scene->r.cfra > scene->r.pefra) {
scene->r.cfra= scene->r.psfra;
+ sad->flag |= ANIMPLAY_FLAG_JUMPED;
+ }
}
else {
- if(scene->r.cfra > scene->r.efra)
+ if (scene->r.cfra > scene->r.efra) {
scene->r.cfra= scene->r.sfra;
+ sad->flag |= ANIMPLAY_FLAG_JUMPED;
+ }
}
}