From 17555efed7583c12459d4f3044dfdd457489ab39 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Mon, 1 Dec 2008 11:14:33 +0000 Subject: Added changes to support Python's native iterator protocol in Stroke and StrokeVertexIterator. freestyle_init.py * Added a generic getName() method that allows subclasses to omit the method to return their class names. BPy_Convert.cpp BPy_Convert.h * Added to BPy_StrokeVertexIterator_from_StrokeVertexIterator() a second argument to specify the direction (reversed or not) of the iterator to be created. BPy_Stroke.cpp * Added support for Python's native iterator protocol. * Added code to parse the optional argument of strokeVerticesBegin(). BPy_StrokeVertexIterator.cpp BPy_StrokeVertexIterator.h * Added support for Python's native iterator protocol. Stroke.cpp * Fixed a null pointer reference. Stroke.h * Added new method Stroke::strokeVerticeAt(i) that returns the i-th StrokeVertex of the Stroke. --- .../blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h') diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h index 9e95fc0a401..0c4b6e4bb6c 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h @@ -21,6 +21,7 @@ extern PyTypeObject StrokeVertexIterator_Type; typedef struct { BPy_Iterator py_it; StrokeInternal::StrokeVertexIterator *sv_it; + int reversed; } BPy_StrokeVertexIterator; /////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3