me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
3 changed files with 16 additions and 6 deletions
Showing only changes of commit 5d30c3994e - Show all commits

View File

@ -19,7 +19,13 @@ struct bContext;
void ED_sequencer_select_sequence_single(struct Scene *scene, void ED_sequencer_select_sequence_single(struct Scene *scene,
struct Sequence *seq, struct Sequence *seq,
bool deselect_all); bool deselect_all);
void ED_sequencer_deselect_all(struct Scene *scene); /**
* Iterates over a scene's sequences and deselects all of them.
*
* \param scene: scene containing sequences to be deselected.
* \return true if any sequences were deselected; false otherwise.
*/
bool ED_sequencer_deselect_all(struct Scene *scene);
bool ED_space_sequencer_maskedit_mask_poll(struct bContext *C); bool ED_space_sequencer_maskedit_mask_poll(struct bContext *C);
bool ED_space_sequencer_check_show_maskedit(struct SpaceSeq *sseq, struct Scene *scene); bool ED_space_sequencer_check_show_maskedit(struct SpaceSeq *sseq, struct Scene *scene);

View File

@ -2492,17 +2492,22 @@ void SEQUENCER_OT_copy(wmOperatorType *ot)
/** \name Paste Operator /** \name Paste Operator
* \{ */ * \{ */
void ED_sequencer_deselect_all(Scene *scene) bool ED_sequencer_deselect_all(Scene *scene)
{ {
Editing *ed = SEQ_editing_get(scene); Editing *ed = SEQ_editing_get(scene);
bool changed = false;
if (ed == NULL) { if (ed == NULL) {
return; return changed;
} }
LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) { LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) {
if (seq->flag & SEQ_ALLSEL) {
seq->flag &= ~SEQ_ALLSEL; seq->flag &= ~SEQ_ALLSEL;
changed = true;
} }
}
return changed;
} }
static void sequencer_paste_animation(bContext *C) static void sequencer_paste_animation(bContext *C)

View File

@ -974,8 +974,7 @@ static int sequencer_select_exec(bContext *C, wmOperator *op)
/* Deselect everything */ /* Deselect everything */
if (deselect_all || (seq && (extend == false && deselect == false && toggle == false))) { if (deselect_all || (seq && (extend == false && deselect == false && toggle == false))) {
ED_sequencer_deselect_all(scene); changed |= ED_sequencer_deselect_all(scene);
changed = true;
} }
/* Nothing to select, but strips could be deselected. */ /* Nothing to select, but strips could be deselected. */