Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-24 08:48:34 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-24 08:48:34 +0400
commitdd899939dabae68564f7a1d1994b50ee2f2cf8be (patch)
tree4de9067c01b0f00fb566867e3b5aa92b8426a27b /source/blender/freestyle/intern/python/Iterator
parentd1b82d1f15a04a7c2383f0689ceede94971f4b81 (diff)
soc-2008-mxcurioni: Added first batch of Iterators: AdjacencyIterator, Interface0DIterator, CurvePointIterator, StrokeVertexIterator, SVertexIterator, orientedViewEdgeIterator.
Diffstat (limited to 'source/blender/freestyle/intern/python/Iterator')
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp142
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h32
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp0
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp0
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp0
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp162
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h33
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp139
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h32
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp162
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h34
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp158
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h33
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp150
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h34
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp130
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h34
17 files changed, 1275 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
new file mode 100644
index 00000000000..cc7ce17f4cf
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -0,0 +1,142 @@
+#include "BPy_AdjacencyIterator.h"
+
+#include "../BPy_Convert.h"
+#include "../Interface0D/BPy_ViewVertex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for AdjacencyIterator instance -----------*/
+static int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args);
+
+/*----------------------AdjacencyIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_AdjacencyIterator_methods[] = {
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_AdjacencyIterator type definition ------------------------------*/
+
+PyTypeObject AdjacencyIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "AdjacencyIterator", /* tp_name */
+ sizeof( BPy_AdjacencyIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_AdjacencyIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)AdjacencyIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args )
+{
+ PyObject *obj1 = 0, *obj2 = 0 , *obj3 = 0;
+
+ if (! PyArg_ParseTuple(args, "|OOO", &obj1, &obj2, &obj3) )
+ return -1;
+
+ if( !obj1 && !obj2 && !obj3 ){
+ self->ai = new AdjacencyIterator();
+
+ } else if( BPy_AdjacencyIterator_Check(obj1) ) {
+ self->ai = new AdjacencyIterator(*( ((BPy_AdjacencyIterator *) obj1)->ai ));
+
+ } else if( BPy_ViewVertex_Check(obj1) ) {
+ bool restrictToSelection = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true;
+ bool restrictToUnvisited = ( obj3 && PyBool_Check(obj3) ) ? bool_from_PyBool(obj3) : true;
+
+ self->ai = new AdjacencyIterator( ((BPy_ViewVertex *) obj1)->vv, restrictToSelection, restrictToUnvisited );
+
+ } else {
+ return -1;
+ }
+
+ self->py_it.it = self->ai;
+ return 0;
+
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h
new file mode 100644
index 00000000000..91319ff9c92
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h
@@ -0,0 +1,32 @@
+#ifndef FREESTYLE_PYTHON_ADJACENCYITERATOR_H
+#define FREESTYLE_PYTHON_ADJACENCYITERATOR_H
+
+#include "../../stroke/ChainingIterators.h"
+#include "../BPy_Iterator.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject AdjacencyIterator_Type;
+
+#define BPy_AdjacencyIterator_Check(v) (( (PyObject *) v)->ob_type == &AdjacencyIterator_Type)
+
+/*---------------------------Python BPy_AdjacencyIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ AdjacencyIterator *ai;
+} BPy_AdjacencyIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_ADJACENCYITERATOR_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
new file mode 100644
index 00000000000..b1b33b347bc
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -0,0 +1,162 @@
+#include "BPy_CurvePointIterator.h"
+
+#include "../BPy_Convert.h"
+#include "BPy_Interface0DIterator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for CurvePointIterator instance -----------*/
+static int CurvePointIterator___init__(BPy_CurvePointIterator *self, PyObject *args);
+static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self );
+static PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self );
+static PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self );
+
+
+/*----------------------CurvePointIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_CurvePointIterator_methods[] = {
+ {"t", ( PyCFunction ) CurvePointIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
+ {"u", ( PyCFunction ) CurvePointIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {"castToInterface0DIterator", ( PyCFunction ) CurvePointIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this CurvePointIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."},
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_CurvePointIterator type definition ------------------------------*/
+
+PyTypeObject CurvePointIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "CurvePointIterator", /* tp_name */
+ sizeof( BPy_CurvePointIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_CurvePointIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)CurvePointIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int CurvePointIterator___init__(BPy_CurvePointIterator *self, PyObject *args )
+{
+ PyObject *obj = 0;
+
+ if (! PyArg_ParseTuple(args, "|O", &obj) )
+ return -1;
+
+ if( !obj ){
+ self->cp_it = new CurvePointIterator();
+
+ } else if( BPy_CurvePointIterator_Check(obj) ) {
+ self->cp_it = new CurvePointIterator(*( ((BPy_CurvePointIterator *) obj)->cp_it ));
+
+ } else if( PyFloat_Check(obj) ) {
+ self->cp_it = new CurvePointIterator( PyFloat_AsDouble(obj) );
+
+ } else {
+ return -1;
+ }
+
+ self->py_it.it = self->cp_it;
+
+ return 0;
+}
+
+PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
+ return PyFloat_FromDouble( self->cp_it->t() );
+}
+
+PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self ) {
+ return PyFloat_FromDouble( self->cp_it->u() );
+}
+
+PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self ) {
+ PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 );
+ ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( self->cp_it->castToInterface0DIterator() );
+
+ return py_if0D_it;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h
new file mode 100644
index 00000000000..652f6fffb97
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h
@@ -0,0 +1,33 @@
+#ifndef FREESTYLE_PYTHON_CURVEPOINTITERATOR_H
+#define FREESTYLE_PYTHON_CURVEPOINTITERATOR_H
+
+#include "../../stroke/CurveIterators.h"
+using namespace CurveInternal;
+
+#include "../BPy_Iterator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject CurvePointIterator_Type;
+
+#define BPy_CurvePointIterator_Check(v) (( (PyObject *) v)->ob_type == &CurvePointIterator_Type)
+
+/*---------------------------Python BPy_CurvePointIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ CurvePointIterator *cp_it;
+} BPy_CurvePointIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_CURVEPOINTITERATOR_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
new file mode 100644
index 00000000000..b2b6d67aa0f
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -0,0 +1,139 @@
+#include "BPy_Interface0DIterator.h"
+
+#include "../BPy_Convert.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for Interface0DIterator instance -----------*/
+static int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject *args);
+
+static PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self );
+static PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self );
+
+/*----------------------Interface0DIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_Interface0DIterator_methods[] = {
+ {"t", ( PyCFunction ) Interface0DIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
+ {"u", ( PyCFunction ) Interface0DIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_Interface0DIterator type definition ------------------------------*/
+
+PyTypeObject Interface0DIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "Interface0DIterator", /* tp_name */
+ sizeof( BPy_Interface0DIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_Interface0DIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)Interface0DIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject *args )
+{
+ PyObject *obj = 0;
+
+ if (!( PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ))
+ return -1;
+
+ self->if0D_it = new Interface0DIterator(*( ((BPy_Interface0DIterator *) obj)->if0D_it ));
+ self->py_it.it = self->if0D_it;
+ return 0;
+
+}
+
+PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self ) {
+ return PyFloat_FromDouble( self->if0D_it->t() );
+}
+
+PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self ) {
+ return PyFloat_FromDouble( self->if0D_it->u() );
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h
new file mode 100644
index 00000000000..16edb2c3d68
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h
@@ -0,0 +1,32 @@
+#ifndef FREESTYLE_PYTHON_INTERFACE0DITERATOR_H
+#define FREESTYLE_PYTHON_INTERFACE0DITERATOR_H
+
+#include "../../view_map/Interface0D.h"
+#include "../BPy_Iterator.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject Interface0DIterator_Type;
+
+#define BPy_Interface0DIterator_Check(v) (( (PyObject *) v)->ob_type == &Interface0DIterator_Type)
+
+/*---------------------------Python BPy_Interface0DIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ Interface0DIterator *if0D_it;
+} BPy_Interface0DIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_INTERFACE0DITERATOR_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
new file mode 100644
index 00000000000..da8b1453102
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp
@@ -0,0 +1,162 @@
+#include "BPy_SVertexIterator.h"
+
+#include "../BPy_Convert.h"
+#include "../Interface0D/BPy_SVertex.h"
+#include "../Interface1D/BPy_FEdge.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for SVertexIterator instance -----------*/
+static int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args);
+
+static PyObject * SVertexIterator_t( BPy_SVertexIterator *self );
+static PyObject * SVertexIterator_u( BPy_SVertexIterator *self );
+
+/*----------------------SVertexIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_SVertexIterator_methods[] = {
+ {"t", ( PyCFunction ) SVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
+ {"u", ( PyCFunction ) SVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_SVertexIterator type definition ------------------------------*/
+
+PyTypeObject SVertexIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "SVertexIterator", /* tp_name */
+ sizeof( BPy_SVertexIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_SVertexIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)SVertexIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args )
+{
+ PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0;
+ float f;
+
+ if (! PyArg_ParseTuple(args, "|OOOOf", &obj1, &obj2, &obj3, &obj4, f) )
+ return -1;
+
+ if( !obj1 ){
+ self->sv_it = new SVertexIterator();
+
+ } else if( BPy_SVertexIterator_Check(obj1) ) {
+ self->sv_it = new SVertexIterator(*( ((BPy_SVertexIterator *) obj1)->sv_it ));
+
+ } else if( obj1 && BPy_SVertex_Check(obj1) &&
+ obj2 && BPy_SVertex_Check(obj2) &&
+ obj3 && BPy_FEdge_Check(obj3) &&
+ obj4 && BPy_FEdge_Check(obj4) ) {
+
+ self->sv_it = new SVertexIterator( ((BPy_SVertex *) obj1)->sv,
+ ((BPy_SVertex *) obj2)->sv,
+ ((BPy_FEdge *) obj3)->fe,
+ ((BPy_FEdge *) obj4)->fe,
+ f );
+
+ } else {
+ return -1;
+ }
+
+ self->py_it.it = self->sv_it;
+
+ return 0;
+}
+
+PyObject * SVertexIterator_t( BPy_SVertexIterator *self ) {
+ return PyFloat_FromDouble( self->sv_it->t() );
+}
+
+PyObject * SVertexIterator_u( BPy_SVertexIterator *self ) {
+ return PyFloat_FromDouble( self->sv_it->u() );
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h
new file mode 100644
index 00000000000..662685571eb
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h
@@ -0,0 +1,34 @@
+#ifndef FREESTYLE_PYTHON_SVERTEXITERATOR_H
+#define FREESTYLE_PYTHON_SVERTEXITERATOR_H
+
+#include "../../view_map/ViewMapIterators.h"
+using namespace ViewEdgeInternal;
+
+#include "../BPy_Iterator.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject SVertexIterator_Type;
+
+#define BPy_SVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &SVertexIterator_Type)
+
+/*---------------------------Python BPy_SVertexIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ SVertexIterator *sv_it;
+} BPy_SVertexIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_SVERTEXITERATOR_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
new file mode 100644
index 00000000000..895aaee2323
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp
@@ -0,0 +1,158 @@
+#include "BPy_StrokeVertexIterator.h"
+
+#include "../BPy_Convert.h"
+#include "BPy_Interface0DIterator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for StrokeVertexIterator instance -----------*/
+static int StrokeVertexIterator___init__(BPy_StrokeVertexIterator *self, PyObject *args);
+static PyObject * StrokeVertexIterator_t( BPy_StrokeVertexIterator *self );
+static PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self );
+static PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self );
+
+/*----------------------StrokeVertexIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_StrokeVertexIterator_methods[] = {
+ {"t", ( PyCFunction ) StrokeVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."},
+ {"u", ( PyCFunction ) StrokeVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."},
+ {"castToInterface0DIterator", ( PyCFunction ) StrokeVertexIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this StrokeVertexIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."},
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_StrokeVertexIterator type definition ------------------------------*/
+
+PyTypeObject StrokeVertexIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "StrokeVertexIterator", /* tp_name */
+ sizeof( BPy_StrokeVertexIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_StrokeVertexIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)StrokeVertexIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int StrokeVertexIterator___init__(BPy_StrokeVertexIterator *self, PyObject *args )
+{
+ PyObject *obj = 0;
+
+ if (! PyArg_ParseTuple(args, "|O", &obj) )
+ return -1;
+
+ if( !obj ){
+ self->sv_it = new StrokeVertexIterator();
+
+ } else if( BPy_StrokeVertexIterator_Check(obj) ) {
+ self->sv_it = new StrokeVertexIterator(*( ((BPy_StrokeVertexIterator *) obj)->sv_it ));
+
+ } else {
+ return -1;
+ }
+
+ self->py_it.it = self->sv_it;
+
+ return 0;
+}
+
+PyObject * StrokeVertexIterator_t( BPy_StrokeVertexIterator *self ) {
+ return PyFloat_FromDouble( self->sv_it->t() );
+}
+
+PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self ) {
+ return PyFloat_FromDouble( self->sv_it->u() );
+}
+
+PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self ) {
+ PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 );
+ ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( self->sv_it->castToInterface0DIterator() );
+
+ return py_if0D_it;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h
new file mode 100644
index 00000000000..8d9ffc56018
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h
@@ -0,0 +1,33 @@
+#ifndef FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H
+#define FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H
+
+#include "../../stroke/StrokeIterators.h"
+using namespace StrokeInternal;
+
+#include "../BPy_Iterator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject StrokeVertexIterator_Type;
+
+#define BPy_StrokeVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertexIterator_Type)
+
+/*---------------------------Python BPy_StrokeVertexIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ StrokeVertexIterator *sv_it;
+} BPy_StrokeVertexIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
new file mode 100644
index 00000000000..25ae25d52a9
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -0,0 +1,150 @@
+#include "BPy_ViewEdgeIterator.h"
+
+#include "../BPy_Convert.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for ViewEdgeIterator instance -----------*/
+static int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args);
+
+/*----------------------ViewEdgeIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_ViewEdgeIterator_methods[] = {
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_ViewEdgeIterator type definition ------------------------------*/
+
+PyTypeObject ViewEdgeIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "ViewEdgeIterator", /* tp_name */
+ sizeof( BPy_ViewEdgeIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_ViewEdgeIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)ViewEdgeIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args )
+{
+ PyObject *obj1 = 0, *obj2 = 0;
+
+ if (!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) ))
+ return -1;
+
+ if( obj1 && BPy_ViewEdgeIterator_Check(obj1) ) {
+ self->ve_it = new ViewEdgeIterator(*( ((BPy_ViewEdgeIterator *) obj1)->ve_it ));
+
+ } else {
+ ViewEdge *begin = ( obj1 && BPy_ViewEdge_Check(obj1) ) ? ((BPy_ViewEdge *) obj1)->ve : 0;
+ bool orientation = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true;
+
+ self->ve_it = new ViewEdgeIterator( begin, orientation);
+
+ }
+
+ self->py_it.it = self->ve_it;
+
+ return 0;
+}
+
+
+
+// ViewEdge * getCurrentEdge ()
+// void setCurrentEdge (ViewEdge *edge)
+// ViewEdge * getBegin ()
+// bool getOrientation () const
+
+
+
+// void setCurrentEdge (ViewEdge *edge)
+// void setBegin (ViewEdge *begin)
+// void setOrientation (bool orientation)
+// void changeOrientation ()
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h
new file mode 100644
index 00000000000..35d2f3f255b
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h
@@ -0,0 +1,34 @@
+#ifndef FREESTYLE_PYTHON_VIEWEDGEITERATOR_H
+#define FREESTYLE_PYTHON_VIEWEDGEITERATOR_H
+
+
+#include "../../view_map/ViewMapIterators.h"
+using namespace ViewEdgeInternal;
+
+#include "../BPy_Iterator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject ViewEdgeIterator_Type;
+
+#define BPy_ViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &ViewEdgeIterator_Type)
+
+/*---------------------------Python BPy_ViewEdgeIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ ViewEdgeIterator *ve_it;
+} BPy_ViewEdgeIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_VIEWEDGEITERATOR_H */
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
new file mode 100644
index 00000000000..9a32f384be9
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp
@@ -0,0 +1,130 @@
+#include "BPy_orientedViewEdgeIterator.h"
+
+#include "../BPy_Convert.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/*--------------- Python API function prototypes for orientedViewEdgeIterator instance -----------*/
+static int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args);
+
+/*----------------------orientedViewEdgeIterator instance definitions ----------------------------*/
+static PyMethodDef BPy_orientedViewEdgeIterator_methods[] = {
+ {NULL, NULL, 0, NULL}
+};
+
+/*-----------------------BPy_orientedViewEdgeIterator type definition ------------------------------*/
+
+PyTypeObject orientedViewEdgeIterator_Type = {
+ PyObject_HEAD_INIT( NULL )
+ 0, /* ob_size */
+ "orientedViewEdgeIterator", /* tp_name */
+ sizeof( BPy_orientedViewEdgeIterator ), /* tp_basicsize */
+ 0, /* tp_itemsize */
+
+ /* methods */
+ NULL, /* tp_dealloc */
+ NULL, /* printfunc tp_print; */
+ NULL, /* getattrfunc tp_getattr; */
+ NULL, /* setattrfunc tp_setattr; */
+ NULL, /* tp_compare */
+ NULL, /* tp_repr */
+
+ /* Method suites for standard classes */
+
+ NULL, /* PyNumberMethods *tp_as_number; */
+ NULL, /* PySequenceMethods *tp_as_sequence; */
+ NULL, /* PyMappingMethods *tp_as_mapping; */
+
+ /* More standard operations (here for binary compatibility) */
+
+ NULL, /* hashfunc tp_hash; */
+ NULL, /* ternaryfunc tp_call; */
+ NULL, /* reprfunc tp_str; */
+ NULL, /* getattrofunc tp_getattro; */
+ NULL, /* setattrofunc tp_setattro; */
+
+ /* Functions to access object as input/output buffer */
+ NULL, /* PyBufferProcs *tp_as_buffer; */
+
+ /*** Flags to define presence of optional/expanded features ***/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */
+
+ NULL, /* char *tp_doc; Documentation string */
+ /*** Assigned meaning in release 2.0 ***/
+ /* call function for all accessible objects */
+ NULL, /* traverseproc tp_traverse; */
+
+ /* delete references to contained objects */
+ NULL, /* inquiry tp_clear; */
+
+ /*** Assigned meaning in release 2.1 ***/
+ /*** rich comparisons ***/
+ NULL, /* richcmpfunc tp_richcompare; */
+
+ /*** weak reference enabler ***/
+ 0, /* long tp_weaklistoffset; */
+
+ /*** Added in release 2.2 ***/
+ /* Iterators */
+ NULL, /* getiterfunc tp_iter; */
+ NULL, /* iternextfunc tp_iternext; */
+
+ /*** Attribute descriptor and subclassing stuff ***/
+ BPy_orientedViewEdgeIterator_methods, /* struct PyMethodDef *tp_methods; */
+ NULL, /* struct PyMemberDef *tp_members; */
+ NULL, /* struct PyGetSetDef *tp_getset; */
+ &Iterator_Type, /* struct _typeobject *tp_base; */
+ NULL, /* PyObject *tp_dict; */
+ NULL, /* descrgetfunc tp_descr_get; */
+ NULL, /* descrsetfunc tp_descr_set; */
+ 0, /* long tp_dictoffset; */
+ (initproc)orientedViewEdgeIterator___init__, /* initproc tp_init; */
+ NULL, /* allocfunc tp_alloc; */
+ NULL, /* newfunc tp_new; */
+
+ /* Low-level free-memory routine */
+ NULL, /* freefunc tp_free; */
+
+ /* For PyObject_IS_GC */
+ NULL, /* inquiry tp_is_gc; */
+ NULL, /* PyObject *tp_bases; */
+
+ /* method resolution order */
+ NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_cache; */
+ NULL, /* PyObject *tp_subclasses; */
+ NULL, /* PyObject *tp_weaklist; */
+ NULL
+};
+
+//-------------------MODULE INITIALIZATION--------------------------------
+
+
+//------------------------INSTANCE METHODS ----------------------------------
+
+int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args )
+{
+ PyObject *obj = 0;
+
+ if (!( PyArg_ParseTuple(args, "|O", &obj) ))
+ return -1;
+
+ if( !obj )
+ self->ove_it = new orientedViewEdgeIterator();
+ else if( BPy_orientedViewEdgeIterator_Check(obj) )
+ self->ove_it = new orientedViewEdgeIterator(*( ((BPy_orientedViewEdgeIterator *) obj)->ove_it ));
+
+ self->py_it.it = self->ove_it;
+
+ return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h
new file mode 100644
index 00000000000..60754939220
--- /dev/null
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h
@@ -0,0 +1,34 @@
+#ifndef FREESTYLE_PYTHON_ORIENTEDVIEWEDGEITERATOR_H
+#define FREESTYLE_PYTHON_ORIENTEDVIEWEDGEITERATOR_H
+
+#include "../../stroke/Stroke.h"
+#include "../../view_map/ViewMapIterators.h"
+using namespace ViewVertexInternal;
+
+#include "../BPy_Iterator.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject orientedViewEdgeIterator_Type;
+
+#define BPy_orientedViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &orientedViewEdgeIterator_Type)
+
+/*---------------------------Python BPy_orientedViewEdgeIterator structure definition----------*/
+typedef struct {
+ BPy_Iterator py_it;
+ orientedViewEdgeIterator *ove_it;
+} BPy_orientedViewEdgeIterator;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREESTYLE_PYTHON_ORIENTEDVIEWEDGEITERATOR_H */