Adding Ipos to Sound strips in Sequencer didn't work anymore. Adding a new
curve with CTRL+click also wasn't smart enough to detect that only one
channel existed there... fixed that too.
This commit is contained in:
Ton Roosendaal
2005-12-13 14:28:34 +00:00
parent 082e589c1a
commit 5fa5392b04

View File

@@ -186,6 +186,12 @@ EditIpo *get_active_editipo(void)
if(G.sipo==NULL)
return NULL;
/* prevent confusing situations, like for sequencer */
if(G.sipo->totipo==1) {
ei= G.sipo->editipo;
ei->flag |= IPO_ACTIVE;
return ei;
}
for(a=0, ei=G.sipo->editipo; a<G.sipo->totipo; a++, ei++)
if(ei->flag & IPO_ACTIVE)
return ei;
@@ -976,7 +982,7 @@ static void get_ipo_context(short blocktype, ID **from, Ipo **ipo, char *actname
else if(blocktype==ID_SEQ) {
extern Sequence *last_seq;
if(last_seq && (last_seq->type & SEQ_EFFECT)) {
if(last_seq && ((last_seq->type & SEQ_EFFECT)||(last_seq->type == SEQ_SOUND))) {
*from= (ID *)last_seq;
*ipo= last_seq->ipo;
}