diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-02-25 15:41:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-02-25 15:41:50 +0300 |
commit | a05f95f347848932705c1f62e6f70775c3d0c3e8 (patch) | |
tree | 1c07979be35cab0ebadf725be5f37411d8035c9c /source/blender/python/api2_2x/Ipo.c | |
parent | 436e1697fdf07f5a17bcfbdde8b18e89e44e9cf1 (diff) |
Image.c
* moved to getseters (use new generic ID funcs)
* added 'reflect' attribute
Text.c
* moved to getseters (new generic ID funcs too)
NLA.c
* moved to getseters (ditto)
Ipo.c
* bugfix, allow nested loops on an IPO's curves.
Blender.c
* removed undocumented function RemoveFakeuser, since actions now have the fakeUser attribute.
Diffstat (limited to 'source/blender/python/api2_2x/Ipo.c')
-rw-r--r-- | source/blender/python/api2_2x/Ipo.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c index 87815e69c42..6f270839ce2 100644 --- a/source/blender/python/api2_2x/Ipo.c +++ b/source/blender/python/api2_2x/Ipo.c @@ -1556,8 +1556,13 @@ static int Ipo_contains( BPy_Ipo *self, PyObject *key ) static PyObject *Ipo_getIter( BPy_Ipo * self ) { - self->iter = 0; - return EXPP_incr_ret ( (PyObject *) self ); + /* return a new IPO object if we are looping on the existing one + This allows nested loops */ + if (self->iter==0) { + return EXPP_incr_ret ( (PyObject *) self ); + } else { + return Ipo_CreatePyObject(self->ipo); + } } /* @@ -1589,6 +1594,7 @@ static PyObject *Ipo_nextIter( BPy_Ipo * self ) } } + self->iter = 0; /* allow iter use again */ /* ran out of curves */ return EXPP_ReturnPyObjError( PyExc_StopIteration, "iterator at end" ); |