diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-11-06 16:06:24 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-11-06 16:06:24 +0300 |
commit | 5e01e71b597f779bee74ce588bafba56a726a14e (patch) | |
tree | 5149f8ee344e3851553edfa7185fbb14431b5d56 /source | |
parent | 70f74daa5a57692cfce67999734a1b925d894ec5 (diff) |
Revert "Metastrips: disallow making a metastrip with only one strip present."
This reverts commit a1578f08dc442b0c64f05a1ab18ef0fd90a9f6e4.
Looks like some workflows benefit from being able to do this
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 6 |
3 files changed, 8 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index bbc4fd05256..e460d0d8917 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -312,7 +312,7 @@ void BKE_sequencer_offset_animdata(struct Scene *scene, struct Sequence *seq, in void BKE_sequencer_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst); bool BKE_sequence_base_shuffle(struct ListBase *seqbasep, struct Sequence *test, struct Scene *evil_scene); bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, struct Scene *evil_scene); -bool BKE_sequence_base_isolated_sel_check(struct ListBase *seqbase, bool one_only); +bool BKE_sequence_base_isolated_sel_check(struct ListBase *seqbase); void BKE_sequencer_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); struct Sequence *BKE_sequence_dupli_recursive(struct Scene *scene, struct Scene *scene_to, struct Sequence *seq, int dupe_flag); int BKE_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 0a22faf3c26..1d7830ca5ae 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3529,28 +3529,16 @@ bool BKE_sequence_single_check(Sequence *seq) } /* check if the selected seq's reference unselected seq's */ -bool BKE_sequence_base_isolated_sel_check(ListBase *seqbase, bool one_only) +bool BKE_sequence_base_isolated_sel_check(ListBase *seqbase) { Sequence *seq; - /* is there a valid selection select */ + /* is there more than 1 select */ bool ok = false; - /* is there one selected already? */ - bool first = false; for (seq = seqbase->first; seq; seq = seq->next) { if (seq->flag & SELECT) { - if (one_only) { - ok = true; - break; - } - else { - if (first) { - ok = true; - break; - } - else - first = true; - } + ok = true; + break; } } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 2270c7dbe55..92e0b8ba54c 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2425,8 +2425,8 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) Sequence *seq, *seqm, *next, *last_seq = BKE_sequencer_active_get(scene); int channel_max = 1; - if (BKE_sequence_base_isolated_sel_check(ed->seqbasep, false) == false) { - BKE_report(op->reports, RPT_ERROR, "Please select more than one or all related strips"); + if (BKE_sequence_base_isolated_sel_check(ed->seqbasep) == false) { + BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); return OPERATOR_CANCELLED; } @@ -3119,7 +3119,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) BKE_sequencer_free_clipboard(); - if (BKE_sequence_base_isolated_sel_check(ed->seqbasep, true) == false) { + if (BKE_sequence_base_isolated_sel_check(ed->seqbasep) == false) { BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); return OPERATOR_CANCELLED; } |