diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-08-27 13:59:46 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-08-27 13:59:46 +0300 |
commit | 59cd9c6da682675c439731781d127b1b02f12a76 (patch) | |
tree | be3547652d6e9bf2e4051dbd54a71b771ec5afad /source/blender/editors/space_sequencer/sequencer_draw.c | |
parent | 7f7370fa26fbe8597cbb9832755f854fd4a8d0e5 (diff) |
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
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 9 |
1 files changed, 6 insertions, 3 deletions
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(); |