From ba9943e4a7a6c671e427c08fc11845168a30e86a Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 31 Jul 2009 22:13:48 +0000 Subject: * Implemented Python's iterator protocol in Interface0DIterator and orientedViewEdgeIterator. * Simplified Python-related error handling in C++ class definitions. The definitions of the following C++ methods were simplified and most code segments using the C/Python API were moved to Director.cpp. ChainingIterator::init() ChainingIterator::traverse() UnaryPredicate0D::operator()() UnaryPredicate1D::operator()() BinaryPredicate0D::operator()() BinaryPredicate1D::operator()() UnaryFunction0D::operator()() UnaryFunction1D::operator()() StrokeShader.shade() * Moved part of the introspection-based automatic type conversion code from BPy_Interface0DIterator.cpp and Director.cpp to BPy_Convert.cpp for the sake of better code organization. * Fixed an uninitialized member in StrokeVertexIterator___init__(). --- source/blender/freestyle/intern/python/BPy_Interface1D.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/freestyle/intern/python/BPy_Interface1D.cpp') diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index c6d6e75d897..613a4f180cc 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -256,12 +256,12 @@ PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args) { PyObject * Interface1D_verticesBegin( BPy_Interface1D *self ) { Interface0DIterator if0D_it( self->if1D->verticesBegin() ); - return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 0 ); } PyObject * Interface1D_verticesEnd( BPy_Interface1D *self ) { Interface0DIterator if0D_it( self->if1D->verticesEnd() ); - return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 1 ); } @@ -272,7 +272,7 @@ PyObject * Interface1D_pointsBegin( BPy_Interface1D *self, PyObject *args ) { return NULL; Interface0DIterator if0D_it( self->if1D->pointsBegin(f) ); - return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 0 ); } PyObject * Interface1D_pointsEnd( BPy_Interface1D *self, PyObject *args ) { @@ -282,7 +282,7 @@ PyObject * Interface1D_pointsEnd( BPy_Interface1D *self, PyObject *args ) { return NULL; Interface0DIterator if0D_it( self->if1D->pointsEnd(f) ); - return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 1 ); } /////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3