Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-02-25 15:41:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-02-25 15:41:50 +0300
commita05f95f347848932705c1f62e6f70775c3d0c3e8 (patch)
tree1c07979be35cab0ebadf725be5f37411d8035c9c /source/blender/python/api2_2x/Ipo.c
parent436e1697fdf07f5a17bcfbdde8b18e89e44e9cf1 (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.c10
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" );