* 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:
@@ -145,7 +145,7 @@ PyObject * ViewVertex_edgesBegin( BPy_ViewVertex *self ) {
|
||||
Py_RETURN_NONE;
|
||||
|
||||
ViewVertexInternal::orientedViewEdgeIterator ove_it( self->vv->edgesBegin() );
|
||||
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it );
|
||||
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it, 0 );
|
||||
}
|
||||
|
||||
PyObject * ViewVertex_edgesEnd( BPy_ViewVertex *self ) {
|
||||
@@ -153,7 +153,7 @@ PyObject * ViewVertex_edgesEnd( BPy_ViewVertex *self ) {
|
||||
Py_RETURN_NONE;
|
||||
|
||||
ViewVertexInternal::orientedViewEdgeIterator ove_it( self->vv->edgesEnd() );
|
||||
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it );
|
||||
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it, 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ PyObject * ViewVertex_edgesIterator( BPy_ViewVertex *self, PyObject *args ) {
|
||||
|
||||
ViewEdge *ve = ((BPy_ViewEdge *) py_ve)->ve;
|
||||
ViewVertexInternal::orientedViewEdgeIterator ove_it( self->vv->edgesIterator( ve ) );
|
||||
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it );
|
||||
return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it, 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user