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:
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r--source/blender/editors/screen/screen_ops.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 9534be3509b..f172e22ea56 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4488,10 +4488,8 @@ static bool match_region_with_redraws(const ScrArea *area,
return false;
}
-static void screen_animation_region_tag_redraw(ScrArea *area,
- ARegion *region,
- const Scene *scene,
- eScreen_Redraws_Flag redraws)
+static void screen_animation_region_tag_redraw(
+ bContext *C, ScrArea *area, ARegion *region, const Scene *scene, eScreen_Redraws_Flag redraws)
{
/* Do follow time here if editor type supports it */
if ((redraws & TIME_FOLLOW) &&
@@ -4515,10 +4513,29 @@ static void screen_animation_region_tag_redraw(ScrArea *area,
* We do need to redraw when this area is in full screen as no other areas
* will be tagged for redrawing. */
if (region->regiontype == RGN_TYPE_WINDOW && !area->full) {
- if (ELEM(area->spacetype, SPACE_GRAPH, SPACE_NLA, SPACE_ACTION)) {
+ if (ELEM(area->spacetype, SPACE_NLA, SPACE_ACTION)) {
return;
}
+ /* Drivers Editor needs a full redraw on playback for graph_draw_driver_debug().
+ * This will make it slower than regular graph editor during playback, but drawing this in
+ * graph_main_region_draw_overlay() is not feasible because it requires animation filtering
+ * which has significant overhead which needs to be avoided in the overlay which is redrawn on
+ * every UI interaction. */
+ if (area->spacetype == SPACE_GRAPH) {
+ const SpaceGraph *sipo = area->spacedata.first;
+ if (sipo->mode != SIPO_MODE_DRIVERS) {
+ return;
+ }
+ bAnimContext ac;
+ if (ANIM_animdata_get_context(C, &ac) == false) {
+ return;
+ }
+ if (ac.datatype != ANIMCONT_DRIVERS) {
+ return;
+ }
+ }
+
if (area->spacetype == SPACE_SEQ) {
const SpaceSeq *sseq = area->spacedata.first;
if (!ED_space_sequencer_has_playback_animation(sseq, scene)) {
@@ -4712,7 +4729,7 @@ static int screen_animation_step_invoke(bContext *C, wmOperator *UNUSED(op), con
}
if (redraw) {
- screen_animation_region_tag_redraw(area, region, scene, sad->redraws);
+ screen_animation_region_tag_redraw(C, area, region, scene, sad->redraws);
}
}
}