Sequencer: frame offset feature usability
authorCampbell Barton <ideasman42@gmail.com>
Tue, 6 Aug 2019 06:56:14 +0000 (16:56 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 6 Aug 2019 07:05:07 +0000 (17:05 +1000)
- Expose the operator in the panel,
  (wasn't available in the UI at all).
- Offset frame was hard coded to a color matching the background.
  Use the current frame color with dashes instead.
- Overlay toggle had wrong name.

release/scripts/startup/bl_ui/space_sequencer.py
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/makesrna/intern/rna_sequencer.c

index d5ef24d7ff3dbad8825a3d3d612b8757e79fa793..a7600552cbc0c244c111e7f993135bfdc66d30bc 100644 (file)
@@ -243,13 +243,6 @@ class SEQUENCER_MT_view(Menu):
                     translate=False,
                 ).ratio = a / b
 
-            layout.separator()
-
-            layout.operator_context = 'INVOKE_DEFAULT'
-
-            # # XXX, invokes in the header view
-            # layout.operator("sequencer.view_ghost_border", text="Overlay Border")
-
         if is_sequencer_view:
             layout.prop(st, "show_seconds")
             layout.prop(st, "show_frame_indicator")
@@ -1843,6 +1836,11 @@ class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel):
 
     def draw(self, context):
         layout = self.layout
+
+        layout.operator_context = 'INVOKE_REGION_PREVIEW'
+        layout.operator("sequencer.view_ghost_border", text="Set Overlay Region")
+        layout.operator_context = 'INVOKE_DEFAULT'
+
         layout.use_property_split = True
         layout.use_property_decorate = False
 
index ea815bd54563a50411b70fc07d1e83713df3f727..07350b5269e5828c66e7c7740468d51a75eaf4c7 100644 (file)
@@ -2076,9 +2076,11 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
                         scene->r.cfra + scene->ed->over_ofs;
 
     uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
-    immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
+    immBindBuiltinProgram(GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR);
 
-    immUniformColor3f(0.2f, 0.2f, 0.2f);
+    immUniform1f("dash_width", 20.0f * U.pixelsize);
+    immUniform1f("dash_factor", 0.5f);
+    immUniformThemeColor(TH_CFRAME);
 
     immBegin(GPU_PRIM_LINES, 2);
     immVertex2f(pos, cfra_over, v2d->cur.ymin);
index c1ef31a80cd9dd15bc7191f40eb7eec6ffa14e5e..80a4defba0094a15ca973c885b20ee99c20f612a 100644 (file)
@@ -1853,7 +1853,8 @@ static void rna_def_editor(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
-  RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer");
+  RNA_def_property_ui_text(
+      prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset");
   RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
 
   prop = RNA_def_property(srna, "use_overlay_lock", PROP_BOOLEAN, PROP_NONE);
@@ -1864,7 +1865,7 @@ static void rna_def_editor(BlenderRNA *brna)
 
   /* access to fixed and relative frame */
   prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
-  RNA_def_property_ui_text(prop, "Overlay Offset", "");
+  RNA_def_property_ui_text(prop, "Overlay Offset", "Number of frames to offset");
   RNA_def_property_int_funcs(
       prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
   RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);