Fix #118486: Prevent emitting error when adding VSE strips
When adding strips that generate image on their own, while 3 or more strips are selected, it emits error. This was caused by incorrect handling of this case in `seq_effect_find_selected()`. If effect has no inputs, function should return early. Pull Request: https://projects.blender.org/blender/blender/pulls/118866
This commit is contained in:
committed by
Richard Antalik
parent
da101d8cdb
commit
58a9acb016
@@ -1113,9 +1113,14 @@ int seq_effect_find_selected(Scene *scene,
|
||||
seq2 = SEQ_select_active_get(scene);
|
||||
}
|
||||
|
||||
if (SEQ_effect_get_num_inputs(type) == 0) {
|
||||
*r_selseq1 = *r_selseq2 = *r_selseq3 = nullptr;
|
||||
return 1;
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) {
|
||||
if (seq->flag & SELECT) {
|
||||
if (seq->type == SEQ_TYPE_SOUND_RAM && SEQ_effect_get_num_inputs(type) != 0) {
|
||||
if (seq->type == SEQ_TYPE_SOUND_RAM) {
|
||||
*r_error_str = N_("Cannot apply effects to audio sequence strips");
|
||||
return 0;
|
||||
}
|
||||
@@ -1146,9 +1151,6 @@ int seq_effect_find_selected(Scene *scene,
|
||||
}
|
||||
|
||||
switch (SEQ_effect_get_num_inputs(type)) {
|
||||
case 0:
|
||||
*r_selseq1 = *r_selseq2 = *r_selseq3 = nullptr;
|
||||
return 1; /* Success. */
|
||||
case 1:
|
||||
if (seq2 == nullptr) {
|
||||
*r_error_str = N_("At least one selected sequence strip is needed");
|
||||
|
||||
Reference in New Issue
Block a user