Fix T97071: Duplicating strip in locked channel creates overlapping strips
Add flag `SEQ_IGNORE_CHANNEL_LOCK` to indicate, that channel lock should not apply to strip. This flag must be cleared after transformation.
This commit is contained in:
parent
d889762590
commit
d5550c7b2c
Notes:
blender-bot
2023-02-14 01:07:44 +01:00
Referenced by issue #97071, Sequencer: duplicating strips on locked channels created duplicate overlapping strips
|
@ -1687,6 +1687,7 @@ static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
SEQ_select_active_set(scene, seq);
|
||||
}
|
||||
seq->flag &= ~(SEQ_LEFTSEL + SEQ_RIGHTSEL + SEQ_LOCK);
|
||||
seq->flag |= SEQ_IGNORE_CHANNEL_LOCK;
|
||||
SEQ_animation_duplicate(scene, seq, &fcurves_original_backup);
|
||||
SEQ_ensure_unique_name(seq, scene);
|
||||
}
|
||||
|
|
|
@ -606,6 +606,11 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c
|
|||
SeqCollection *transformed_strips = seq_transform_collection_from_transdata(tc);
|
||||
SEQ_collection_expand(seqbase_active_get(t), transformed_strips, SEQ_query_strip_effect_chain);
|
||||
|
||||
Sequence *seq;
|
||||
SEQ_ITERATOR_FOREACH (seq, transformed_strips) {
|
||||
seq->flag &= ~SEQ_IGNORE_CHANNEL_LOCK;
|
||||
}
|
||||
|
||||
if (t->state == TRANS_CANCEL) {
|
||||
seq_transform_cancel(t, transformed_strips);
|
||||
SEQ_collection_free(transformed_strips);
|
||||
|
|
|
@ -562,7 +562,7 @@ enum {
|
|||
SEQ_MAKE_FLOAT = (1 << 13),
|
||||
SEQ_LOCK = (1 << 14),
|
||||
SEQ_USE_PROXY = (1 << 15),
|
||||
SEQ_FLAG_UNUSED_23 = (1 << 16), /* cleared */
|
||||
SEQ_IGNORE_CHANNEL_LOCK = (1 << 16),
|
||||
SEQ_FLAG_UNUSED_22 = (1 << 17), /* cleared */
|
||||
SEQ_FLAG_UNUSED_18 = (1 << 18), /* cleared */
|
||||
SEQ_FLAG_UNUSED_19 = (1 << 19), /* cleared */
|
||||
|
|
|
@ -395,7 +395,8 @@ void SEQ_transform_offset_after_frame(Scene *scene,
|
|||
bool SEQ_transform_is_locked(ListBase *channels, Sequence *seq)
|
||||
{
|
||||
SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine);
|
||||
return seq->flag & SEQ_LOCK || SEQ_channel_is_locked(channel);
|
||||
return seq->flag & SEQ_LOCK ||
|
||||
(SEQ_channel_is_locked(channel) && ((seq->flag & SEQ_IGNORE_CHANNEL_LOCK) == 0));
|
||||
}
|
||||
|
||||
void SEQ_image_transform_mirror_factor_get(const Sequence *seq, float r_mirror[2])
|
||||
|
|
Loading…
Reference in New Issue