[Bf-blender-cvs] [741fb0d6c9a] master: Sequencer: hide gizmos & cursor during scrubbing & playback

Campbell Barton noreply at git.blender.org
Fri Oct 8 09:07:51 CEST 2021


Commit: 741fb0d6c9a790b13c622e10ff6ef7ece48784eb
Author: Campbell Barton
Date:   Fri Oct 8 18:06:50 2021 +1100
Branches: master
https://developer.blender.org/rB741fb0d6c9a790b13c622e10ff6ef7ece48784eb

Sequencer: hide gizmos & cursor during scrubbing & playback

This was distracting prevented easily viewing an animation.

===================================================================

M	source/blender/editors/space_sequencer/space_sequencer.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 978ac9a3404..87344a38c26 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -783,6 +783,7 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
   wmWindowManager *wm = CTX_wm_manager(C);
   const bool draw_overlay = (scene->ed && (scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) &&
                              (sseq->flag & SEQ_SHOW_OVERLAY));
+  const bool is_playing = ED_screen_animation_playing(wm);
 
   if (!draw_overlay || sseq->overlay_type != SEQ_DRAW_OVERLAY_REFERENCE) {
     sequencer_draw_preview(C, scene, region, sseq, scene->r.cfra, 0, false, false);
@@ -805,7 +806,7 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
   }
 
   /* No need to show the cursor for scopes. */
-  if (draw_overlay && (sseq->mainb == SEQ_DRAW_IMG_IMBUF)) {
+  if (draw_overlay && (is_playing == false) && (sseq->mainb == SEQ_DRAW_IMG_IMBUF)) {
     GPU_color_mask(true, true, true, true);
     GPU_depth_mask(false);
     GPU_depth_test(GPU_DEPTH_NONE);
@@ -816,7 +817,7 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
     DRW_draw_cursor_2d_ex(region, cursor_pixel);
   }
 
-  if ((sseq->gizmo_flag & SEQ_GIZMO_HIDE) == 0) {
+  if ((is_playing == false) && (sseq->gizmo_flag & SEQ_GIZMO_HIDE) == 0) {
     WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
   }



More information about the Bf-blender-cvs mailing list