diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-13 08:55:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-13 08:55:48 +0300 |
commit | 0066b6a8aad2d054574c93a507a98f92692ad924 (patch) | |
tree | e95ecda8d6783497a9a849ca2dbef3ce4fc2c6d1 /source | |
parent | d0b953d86079a00c71950603c80aff71dcca8362 (diff) |
fix for big in yesterdays commit, color values were not initialized
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/api2_2x/sceneSequence.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c index be858b3020e..5be3a1479a6 100644 --- a/source/blender/python/api2_2x/sceneSequence.c +++ b/source/blender/python/api2_2x/sceneSequence.c @@ -144,11 +144,20 @@ static PyObject *NewSeq_internal(ListBase *seqbase, PyObject * args, Scene *sce) seq = alloc_sequence(seqbase, start, machine); /* warning, this sets last */ - if (PyArg_ParseTuple( py_data, "iO!|O!O!", &type, &Sequence_Type, &pyob1, &Sequence_Type, &pyob2, &Sequence_Type, &pyob3)) { + if (PyTuple_Check(py_data) && PyTuple_GET_SIZE(py_data) >= 2 && BPy_Sequence_Check(PyTuple_GET_ITEM(py_data, 1))) { struct SeqEffectHandle sh; Sequence *seq1, *seq2= NULL, *seq3= NULL; /* for effects */ + if (!PyArg_ParseTuple( py_data, "iO!|O!O!", &type, &Sequence_Type, &pyob1, &Sequence_Type, &pyob2, &Sequence_Type, &pyob3)) { + BLI_remlink(seqbase, seq); + free_sequence(seq); + + return EXPP_ReturnPyObjError( PyExc_ValueError, + "effect stripts expected an effect type int and 1 to 3 sequence strips"); + } + + seq1= ((BPy_Sequence *)pyob1)->seq; if(pyob2) seq2= ((BPy_Sequence *)pyob2)->seq; if(pyob3) seq3= ((BPy_Sequence *)pyob3)->seq; @@ -260,6 +269,8 @@ static PyObject *NewSeq_internal(ListBase *seqbase, PyObject * args, Scene *sce) } seq->effectdata = MEM_callocN(sizeof(struct SolidColorVars), "solidcolor"); + colvars= (SolidColorVars *)seq->effectdata; + seq->type= SEQ_COLOR; CLAMP(r,0,1); |