From f76c3aa3764283918413a50ed9dab079e720ed98 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Fri, 21 May 2010 21:27:32 +0000 Subject: * Fix for a crash in StrokeVertexIterator::getObject(). * Minor docstring fixes. --- .../freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp | 2 +- .../freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp | 2 +- .../freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp | 2 ++ .../blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/freestyle/intern/python/Iterator') diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index 624d983da4d..38670f20d7f 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -60,7 +60,7 @@ static char ChainPredicateIterator___doc__[] = " already been chained must be ignored ot not.\n" " :type iRestrictToUnvisited: bool\n" " :arg begin: The ViewEdge from where to start the iteration.\n" -" :type begin: :class:`ViewEdge`\n" +" :type begin: :class:`ViewEdge` or None\n" " :arg orientation: If true, we'll look for the next ViewEdge among\n" " the ViewEdges that surround the ending ViewVertex of begin. If\n" " false, we'll search over the ViewEdges surrounding the ending\n" diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 00e62ad30d4..0549a4ac12b 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -31,7 +31,7 @@ static char ChainSilhouetteIterator___doc__[] = " to stay within the set of selected ViewEdges or not.\n" " :type iRestrictToSelection: bool\n" " :arg begin: The ViewEdge from where to start the iteration.\n" -" :type begin: :class:`ViewEdge`\n" +" :type begin: :class:`ViewEdge` or None\n" " :arg orientation: If true, we'll look for the next ViewEdge among\n" " the ViewEdges that surround the ending ViewVertex of begin. If\n" " false, we'll search over the ViewEdges surrounding the ending\n" diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 607109ce3ad..1273cc2a471 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -128,6 +128,8 @@ static char StrokeVertexIterator_getObject___doc__[] = " :rtype: :class:`StrokeVertex`\n"; static PyObject * StrokeVertexIterator_getObject( BPy_StrokeVertexIterator *self) { + if (!self->reversed && self->sv_it->isEnd()) + Py_RETURN_NONE; StrokeVertex *sv = self->sv_it->operator->(); if( sv ) return BPy_StrokeVertex_from_StrokeVertex( *sv ); diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index 856cebb308c..55402165226 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -24,7 +24,7 @@ static char ViewEdgeIterator___doc__[] = " orientation.\n" "\n" " :arg begin: The ViewEdge from where to start the iteration.\n" -" :type begin: :class:`ViewEdge`\n" +" :type begin: :class:`ViewEdge` or None\n" " :arg orientation: If true, we'll look for the next ViewEdge among\n" " the ViewEdges that surround the ending ViewVertex of begin. If\n" " false, we'll search over the ViewEdges surrounding the ending\n" -- cgit v1.2.3