* 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__().
This commit is contained in:
@@ -383,12 +383,12 @@ PyObject * Stroke_strokeVerticesSize( BPy_Stroke *self ) {
|
||||
|
||||
PyObject * Stroke_verticesBegin( BPy_Stroke *self ) {
|
||||
Interface0DIterator if0D_it( self->s->verticesBegin() );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 0 );
|
||||
}
|
||||
|
||||
PyObject * Stroke_verticesEnd( BPy_Stroke *self ) {
|
||||
Interface0DIterator if0D_it( self->s->verticesEnd() );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 1 );
|
||||
}
|
||||
|
||||
PyObject * Stroke_pointsBegin( BPy_Stroke *self , PyObject *args) {
|
||||
@@ -398,7 +398,7 @@ PyObject * Stroke_pointsBegin( BPy_Stroke *self , PyObject *args) {
|
||||
return NULL;
|
||||
|
||||
Interface0DIterator if0D_it( self->s->pointsBegin(f) );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 0 );
|
||||
}
|
||||
|
||||
PyObject * Stroke_pointsEnd( BPy_Stroke *self , PyObject *args) {
|
||||
@@ -408,7 +408,7 @@ PyObject * Stroke_pointsEnd( BPy_Stroke *self , PyObject *args) {
|
||||
return NULL;
|
||||
|
||||
Interface0DIterator if0D_it( self->s->pointsEnd(f) );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
|
||||
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it, 1 );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user