From 59cd9c6da682675c439731781d127b1b02f12a76 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Fri, 27 Aug 2021 12:59:46 +0200 Subject: VSE: Transform overwrite mode Add mode to overwrite strips on overlap instead of resolving overlap. When overlap is created, 3 things can happen: - On partial overlap, handles of overlapped strip are moved - On complete overlap with smaller strip, overlapped strip is split - On complete overlap with larger strip, overlapped strip is removed This mode can be enabled in header. Reviewed By: fsiddi, mano-wii Differential Revision: https://developer.blender.org/D11805 --- source/blender/editors/space_sequencer/sequencer_draw.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_sequencer') diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index b3c39e2fa6f..fe3ff469e50 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -737,7 +737,8 @@ static void draw_seq_handle(View2D *v2d, } } -static void draw_seq_outline(Sequence *seq, +static void draw_seq_outline(Scene *scene, + Sequence *seq, uint pos, float x1, float x2, @@ -765,7 +766,9 @@ static void draw_seq_outline(Sequence *seq, * - Slightly lighter. * - Red when overlapping with other strips. */ - if ((G.moving & G_TRANSFORM_SEQ) && (seq->flag & SELECT)) { + const eSeqOverlapMode overlap_mode = SEQ_tool_settings_overlap_mode_get(scene); + if ((G.moving & G_TRANSFORM_SEQ) && (seq->flag & SELECT) && + overlap_mode != SEQ_OVERLAP_OVERWRITE) { if (seq->flag & SEQ_OVERLAP) { col[0] = 255; col[1] = col[2] = 33; @@ -1383,7 +1386,7 @@ static void draw_seq_strip(const bContext *C, v2d, seq, handsize_clamped, SEQ_RIGHTHANDLE, pos, seq_active, pixelx, y_threshold); } - draw_seq_outline(seq, pos, x1, x2, y1, y2, pixelx, pixely, seq_active); + draw_seq_outline(scene, seq, pos, x1, x2, y1, y2, pixelx, pixely, seq_active); immUnbindProgram(); -- cgit v1.2.3