diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 1f830261739..c02bd0a00fc 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -1,5 +1,6 @@ #include "BPy_CurvePointIterator.h" +#include "../BPy_Convert.h" #include "BPy_Interface0DIterator.h" #ifdef __cplusplus @@ -14,12 +15,14 @@ static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ); static PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self ); static PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self ); +static PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self); /*----------------------CurvePointIterator instance definitions ----------------------------*/ static PyMethodDef BPy_CurvePointIterator_methods[] = { {"t", ( PyCFunction ) CurvePointIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, {"u", ( PyCFunction ) CurvePointIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, {"castToInterface0DIterator", ( PyCFunction ) CurvePointIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this CurvePointIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."}, + {"getObject", ( PyCFunction ) CurvePointIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -153,6 +156,10 @@ PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator return py_if0D_it; } +PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self) { + return BPy_CurvePoint_from_CurvePoint( self->cp_it->operator*() ); +} + /////////////////////////////////////////////////////////////////////////////////////////// |