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:
authorJoerg Mueller <nexyon@gmail.com>2012-03-19 02:21:29 +0400
committerJoerg Mueller <nexyon@gmail.com>2012-03-19 02:21:29 +0400
commit727f586a0de6351f58f5fc970a2ee04fcbc50da6 (patch)
treec0a3f40b2943822b33c4ea8de35b63190a199e3d /source/blender/editors/screen
parent53b7078343c1fa0e9361e038163a6a17f52da4e4 (diff)
Fix for [#30495] Framerate goes crazy after changing Sync mode from "Frame Dropping" to "no Sync" while playing anim
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b1d718f08b5..697f40a507a 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2915,13 +2915,12 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
else {
if (sync) {
- int step = floor(wt->duration * FPS);
+ int step = floor((wt->duration - sad->last_duration) * FPS);
/* skip frames */
if (sad->flag & ANIMPLAY_FLAG_REVERSE)
scene->r.cfra -= step;
else
scene->r.cfra += step;
- wt->duration -= ((double)step)/FPS;
}
else {
/* one frame +/- */
@@ -2932,6 +2931,8 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
}
+ sad->last_duration = wt->duration;
+
/* reset 'jumped' flag before checking if we need to jump... */
sad->flag &= ~ANIMPLAY_FLAG_JUMPED;