[Bf-blender-cvs] [b4af70563ff] blender-v3.0-release: VSE: Remove separator lines between rows

Pablo Vazquez noreply at git.blender.org
Fri Nov 5 15:06:43 CET 2021


Commit: b4af70563ff181bd7567a4f18af4a050f430dbe9
Author: Pablo Vazquez
Date:   Fri Nov 5 14:53:27 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rBb4af70563ff181bd7567a4f18af4a050f430dbe9

VSE: Remove separator lines between rows

The VSE grid theme setting is currently used for two things:

* Indicate time intervals (vertical lines)
* As separator between channels (horizontal lines)

This adds visual noise because for the time interval to be visible, the
grid color needs to be bright, resulting in a rectangle-grid backdrop.

Recently, the VSE got a theme setting to customize alternate-row background color.
This should be sufficient to tell the channels apart without the need for a line in between.

Additionally, this patch makes the VSE background use the theme setting as-is,
without hard-coded darkening, to ease the tweaking of themes.  This aligns the style
of the VSE backdrop with the rest of Blender (Outliner rows, File Browser, Spreadsheet,
Info and animation editors).

Related reports: T92581
Related task: T92792

#### Before
{F11680317, size=full}

#### After
{F11694981, size=full}

Reviewed By: #user_interface, Severin

Maniphest Tasks: T92581

Differential Revision: https://developer.blender.org/D13072

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

M	release/datafiles/userdef/userdef_default_theme.c
M	source/blender/editors/space_sequencer/sequencer_draw.c

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

diff --git a/release/datafiles/userdef/userdef_default_theme.c b/release/datafiles/userdef/userdef_default_theme.c
index fc489abace8..69d542da23a 100644
--- a/release/datafiles/userdef/userdef_default_theme.c
+++ b/release/datafiles/userdef/userdef_default_theme.c
@@ -612,7 +612,7 @@ const bTheme U_theme_default = {
     .nla_sound_sel = RGBA(0x1f7a7aff),
   },
   .space_sequencer = {
-    .back = RGBA(0x30303000),
+    .back = RGBA(0x18181800),
     .title = RGBA(0xeeeeeeff),
     .text = RGBA(0xa6a6a6ff),
     .text_hi = RGBA(0xffffffff),
@@ -635,7 +635,7 @@ const bTheme U_theme_default = {
       .sub_back = RGBA(0x0000001f),
     },
     .shade1 = RGBA(0xa0a0a000),
-    .grid = RGBA(0x181818ff),
+    .grid = RGBA(0x303030ff),
     .vertex_select = RGBA(0xff8500ff),
     .bone_pose = RGBA(0x50c8ff50),
     .cframe = RGBA(0x4772b3ff),
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 379788ecf49..3374ff11726 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -2274,11 +2274,11 @@ static void draw_seq_backdrop(View2D *v2d)
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
   /* View backdrop. */
-  immUniformThemeColorShade(TH_BACK, -25);
+  immUniformThemeColor(TH_BACK);
   immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
 
   /* Darker overlay over the view backdrop. */
-  immUniformThemeColorShade(TH_BACK, -20);
+  immUniformThemeColorShade(TH_BACK, -10);
   immRectf(pos, v2d->cur.xmin, -1.0, v2d->cur.xmax, 1.0);
 
   /* Alternating horizontal stripes. */
@@ -2295,19 +2295,6 @@ static void draw_seq_backdrop(View2D *v2d)
   }
 
   GPU_blend(GPU_BLEND_NONE);
-
-  /* Lines separating the horizontal bands. */
-  i = max_ii(1, ((int)v2d->cur.ymin) - 1);
-  int line_len = (int)v2d->cur.ymax - i + 1;
-  immUniformThemeColorShade(TH_GRID, 10);
-  immBegin(GPU_PRIM_LINES, line_len * 2);
-  while (line_len--) {
-    immVertex2f(pos, v2d->cur.xmax, i);
-    immVertex2f(pos, v2d->cur.xmin, i);
-    i++;
-  }
-  immEnd();
-
   immUnbindProgram();
 }
 
@@ -2413,7 +2400,7 @@ static void seq_draw_sfra_efra(const Scene *scene, View2D *v2d)
   immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
   /* Draw overlay outside of frame range. */
-  immUniformThemeColorShadeAlpha(TH_BACK, -25, -100);
+  immUniformThemeColorShadeAlpha(TH_BACK, -10, -100);
 
   if (frame_sta < frame_end) {
     immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)frame_sta, v2d->cur.ymax);



More information about the Bf-blender-cvs mailing list