diff options
Diffstat (limited to 'source/blender/freestyle/intern/python')
-rw-r--r-- | source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp | 5 | ||||
-rw-r--r-- | source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index d649a70e72f..686781ee22e 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -151,10 +151,7 @@ PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self ) { } PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self ) { - PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); - ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( self->cp_it->castToInterface0DIterator() ); - - return py_if0D_it; + return BPy_Interface0DIterator_from_Interface0DIterator( self->cp_it->castToInterface0DIterator() ); } PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 6492d9a1603..f33f1a76860 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -167,10 +167,7 @@ PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self ) { } PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self ) { - PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); - ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( self->sv_it->castToInterface0DIterator() ); - - return py_if0D_it; + return BPy_Interface0DIterator_from_Interface0DIterator( self->sv_it->castToInterface0DIterator() ); } PyObject * StrokeVertexIterator_getObject( BPy_StrokeVertexIterator *self) { |