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:
authorSebastian Parborg <darkdefende@gmail.com>2020-05-12 14:19:20 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-05-12 14:24:20 +0300
commit94734d64542bf7c5f8ff2b129f230173af5e1996 (patch)
tree2133859ad5adac291e43362521c7ca4fcc989f1c /source/blender/editors/include
parent07fc240d72cdcfe3a11764a253f6ab06b0deed39 (diff)
Fix Frame Dropping not dropping the correct amount of frames
Previously the playback mode "Frame Dropping" would not drop the correct number of frames which would lead to slow playback. For example, the playback target is 60fps. However we can only muster around 32 fps. The delta frames from the last step is in this case ~1.98 or so. With the previous code, we would floor this. That would lead us to step forward one frame each time, effectively playing back the animation at half the speed as we will try to render every frame. To fix this we simply save the remaining fraction from the previous frame and use it to compute the current frame step. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D7694
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_screen_types.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h
index 06c2c3039f5..51f3eea74fa 100644
--- a/source/blender/editors/include/ED_screen_types.h
+++ b/source/blender/editors/include/ED_screen_types.h
@@ -34,11 +34,11 @@ extern "C" {
typedef struct ScreenAnimData {
ARegion *region; /* do not read from this, only for comparing if region exists */
short redraws;
- short flag; /* flags for playback */
- int sfra; /* frame that playback was started from */
- int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
- double last_duration; /* used for frame dropping */
- bool from_anim_edit; /* playback was invoked from animation editor */
+ short flag; /* flags for playback */
+ int sfra; /* frame that playback was started from */
+ int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */
+ double lagging_frame_count; /* used for frame dropping */
+ bool from_anim_edit; /* playback was invoked from animation editor */
} ScreenAnimData;
/* for animplayer */