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:
authorJeroen Bakker <jbakker>2020-06-23 08:59:34 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2020-06-23 13:03:17 +0300
commitbbb2e0614fc3c017f4dbcdb8a26be612e8cb282e (patch)
tree44f695b04ce732d0c5a6bf35a6883b70044563e7 /source/blender/editors/include
parent87ceff3d1b5805658622a314a84620b52ab98c7d (diff)
Performance: Draw play head as an overlay
When playing back animations a playhead is updated in all the animation editors. The drawing of the playhead is part of the drawing of the main region `RGN_TYPE_WINDOW` that redraws the whole region. This change will draw the play head and window scrollers when updating the screen. This affects the Action editor, Timeline, Graph editor, NLA editor and Sequence editor. There is noticeable speedup when using complex animation files. Spring 02_020_A.anim.blend fps went from 11.8 to 12.5 when showing a timeline and a action editor on a Ryzen 1700. * When playing back animation the markers don't jump up/down when near the frame. This could be added back. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D8066
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h4
-rw-r--r--source/blender/editors/include/ED_time_scrub_ui.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 426a470b128..f46ef3ff1be 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -640,14 +640,14 @@ bool ANIM_remove_empty_action_from_animdata(struct AnimData *adt);
/* ---------- Current Frame Drawing ---------------- */
/* flags for Current Frame Drawing */
-enum eAnimEditDraw_CurrentFrame {
+typedef enum eAnimEditDraw_CurrentFrame {
/* plain time indicator with no special indicators */
/* DRAWCFRA_PLAIN = 0, */ /* UNUSED */
/* time indication in seconds or frames */
DRAWCFRA_UNIT_SECONDS = (1 << 0),
/* draw indicator extra wide (for timeline) */
DRAWCFRA_WIDE = (1 << 1),
-};
+} eAnimEditDraw_CurrentFrame;
/* main call to draw current-frame indicator in an Animation Editor */
void ANIM_draw_cfra(const struct bContext *C, struct View2D *v2d, short flag);
diff --git a/source/blender/editors/include/ED_time_scrub_ui.h b/source/blender/editors/include/ED_time_scrub_ui.h
index d5b9fa2a553..483dce56577 100644
--- a/source/blender/editors/include/ED_time_scrub_ui.h
+++ b/source/blender/editors/include/ED_time_scrub_ui.h
@@ -32,6 +32,11 @@ struct bContext;
struct bDopeSheet;
struct wmEvent;
+void ED_time_scrub_draw_current_frame(const struct ARegion *region,
+ const struct Scene *scene,
+ bool display_seconds,
+ bool draw_vert_line);
+
void ED_time_scrub_draw(const struct ARegion *region,
const struct Scene *scene,
bool display_seconds,