[Bf-blender-cvs] [2f9fab716db] master: Cleanup: remove deprecated SEQ_DRAW_SEQUENCE value

Campbell Barton noreply at git.blender.org
Fri Oct 8 04:17:08 CEST 2021


Commit: 2f9fab716dbd53c9b8520272d3745994415dc819
Author: Campbell Barton
Date:   Fri Oct 8 13:03:39 2021 +1100
Branches: master
https://developer.blender.org/rB2f9fab716dbd53c9b8520272d3745994415dc819

Cleanup: remove deprecated SEQ_DRAW_SEQUENCE value

While drawing cleared this value (as part of temporary fix from 2009),
this was still being checked until recently.

Remove this value in versioning code.

Also clear unused text space flag.

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

M	source/blender/blenloader/intern/versioning_300.c
M	source/blender/editors/space_sequencer/space_sequencer.c
M	source/blender/makesdna/DNA_space_types.h

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

diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 95fa3058931..34712caf584 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -1719,5 +1719,27 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
    */
   {
     /* Keep this block, even when empty. */
+
+    for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+      LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+        LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+          switch (sl->spacetype) {
+            case SPACE_SEQ: {
+              SpaceSeq *sseq = (SpaceSeq *)sl;
+              enum { SEQ_DRAW_SEQUENCE = 0 };
+              if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
+                sseq->mainb = SEQ_DRAW_IMG_IMBUF;
+              }
+              break;
+            }
+            case SPACE_TEXT: {
+              SpaceText *st = (SpaceText *)sl;
+              st->flags &= ~ST_FLAG_UNUSED_4;
+              break;
+            }
+          }
+        }
+      }
+    }
   }
 }
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index c1f853270e9..508669abd04 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -784,11 +784,6 @@ static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
   const bool draw_overlay = (scene->ed && (scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) &&
                              (sseq->flag & SEQ_SHOW_OVERLAY));
 
-  /* XXX temp fix for wrong setting in sseq->mainb */
-  if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
-    sseq->mainb = SEQ_DRAW_IMG_IMBUF;
-  }
-
   if (!draw_overlay || sseq->overlay_type != SEQ_DRAW_OVERLAY_REFERENCE) {
     sequencer_draw_preview(C, scene, region, sseq, scene->r.cfra, 0, false, false);
   }
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index bace73b88ba..f6ce71dad54 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -667,7 +667,6 @@ typedef struct SpaceSeq {
 
 /* SpaceSeq.mainb */
 typedef enum eSpaceSeq_RegionType {
-  SEQ_DRAW_SEQUENCE = 0,
   SEQ_DRAW_IMG_IMBUF = 1,
   SEQ_DRAW_IMG_WAVEFORM = 2,
   SEQ_DRAW_IMG_VECTORSCOPE = 3,
@@ -1417,7 +1416,7 @@ typedef enum eSpaceText_Flags {
   /* scrollable */
   ST_SCROLL_SELECT = (1 << 0),
 
-  ST_FLAG_UNUSED_4 = (1 << 4), /* dirty */
+  ST_FLAG_UNUSED_4 = (1 << 4), /* Cleared. */
 
   ST_FIND_WRAP = (1 << 5),
   ST_FIND_ALL = (1 << 6),



More information about the Bf-blender-cvs mailing list