Bugfix #17721: Action Strips added from scripts don't work properly unless at least one strip has already been added by hand.

Synced the behaviour of the PyAPI when adding strips with the behaviour of UI.
This commit is contained in:
Joshua Leung 2008-10-01 00:14:28 +00:00
parent c3602099c8
commit e427b82962

@ -1438,7 +1438,11 @@ static PyObject *ActionStrips_append( BPy_ActionStrips *self, PyObject * args )
strip->flag = ACTSTRIP_LOCK_ACTION;
find_stridechannel(ob, strip);
if(ob->nlastrips.first == NULL)
ob->nlaflag |= OB_NLA_OVERRIDE;
strip->repeat = 1.0;
strip->scale = 1.0;
act->id.us++;
BLI_addtail(&ob->nlastrips, strip);