diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-06 09:56:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-06 10:05:07 +0300 |
commit | bb53d2b07a1b9befcb476c4502abe82d1bbd49bd (patch) | |
tree | 9779d64f52057320aa0eb0b4a7d9bef832e29f3d /source | |
parent | 1aabb0bfcf22969d570b57bc621d2709b45429ef (diff) |
Sequencer: frame offset feature usability
- 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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index ea815bd5456..07350b5269e 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -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); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index c1ef31a80cd..80a4defba00 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -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); |