diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 1 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
4 files changed, 13 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 88267049b80..7eaf300c781 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -198,6 +198,7 @@ class SEQUENCER_MT_view(Menu): if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: layout.prop(st, "show_seconds") layout.prop(st, "show_frame_indicator") + layout.prop(st, "show_strip_offset") if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: if st.display_mode == 'IMAGE': diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index e499cd760d6..144f7876b5e 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -669,7 +669,7 @@ void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq) draw_shadedstrip(seq, col, x1, y1, (float)(seq->start), y2); /* feint pinstripes, helps see exactly which is extended and which isn't, - * especially when the extension is very small */ + * especially when the extension is very small */ if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24); else UI_GetColorPtrShade3ubv(col, col, -16); @@ -687,7 +687,7 @@ void draw_sequence_extensions(Scene *scene, ARegion *ar, Sequence *seq) draw_shadedstrip(seq, col, (float)(seq->start + seq->len), y1, x2, y2); /* feint pinstripes, helps see exactly which is extended and which isn't, - * especially when the extension is very small */ + * especially when the extension is very small */ if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, 24); else UI_GetColorPtrShade3ubv(col, col, -16); @@ -736,6 +736,10 @@ static void draw_seq_strip(const bContext *C, SpaceSeq *sseq, Scene *scene, AReg draw_shadedstrip(seq, background_col, x1, y1, x2, y2); } + if ((sseq->draw_flag & SEQ_DRAW_OFFSET_EXT) && !is_single_image) { + draw_sequence_extensions(scene, ar, seq); + } + draw_seq_handle(v2d, seq, handsize_clamped, SEQ_LEFTHANDLE); draw_seq_handle(v2d, seq, handsize_clamped, SEQ_RIGHTHANDLE); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 6489853bbaa..339b232f8a0 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -518,6 +518,7 @@ typedef enum eSpaceSeq_RegionType { /* sseq->draw_flag */ typedef enum eSpaceSeq_DrawFlag { SEQ_DRAW_BACKDROP = (1 << 0), + SEQ_DRAW_OFFSET_EXT = (1 << 1), } eSpaceSeq_DrawFlag; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 017e60c3aa6..17d4c1bfebb 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2630,6 +2630,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "draw_flag", SEQ_DRAW_BACKDROP); RNA_def_property_ui_text(prop, "Use Backdrop", "Display result under strips"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); + + prop = RNA_def_property(srna, "show_strip_offset", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "draw_flag", SEQ_DRAW_OFFSET_EXT); + RNA_def_property_ui_text(prop, "Show Offsets", "Display strip in/out offsets"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); } static void rna_def_space_text(BlenderRNA *brna) |