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-08-01 06:15:25 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-08-01 06:15:25 +0400
commit149f3688a4663dbaf890f6f5e5a41c35ce6d5e56 (patch)
treeba1abb08dcc3514d2c1e396504034d39dc866d40 /source/blender/freestyle
parent6a6c23ecd8af6b1216975ad87b1602f618a7a5fd (diff)
soc-2008-mxcurioni: moved Curve to FrsCurve, fixed bugs with some style modules having with strokes without a representation and iterators not being correctly routed. For example, the cartoon style module should work now.
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Convert.cpp35
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp4
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.cpp (renamed from source/blender/freestyle/intern/python/BPy_Noise.cpp)98
-rw-r--r--source/blender/freestyle/intern/python/BPy_FrsNoise.h36
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface1D.cpp8
-rw-r--r--source/blender/freestyle/intern/python/BPy_Iterator.cpp3
-rw-r--r--source/blender/freestyle/intern/python/BPy_Noise.h36
-rw-r--r--source/blender/freestyle/intern/python/Director.cpp23
-rw-r--r--source/blender/freestyle/intern/python/Director.h7
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp (renamed from source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp)84
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h (renamed from source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h)14
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp2
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h4
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp1
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp1
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp2
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp2
17 files changed, 198 insertions, 162 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp
index 13e4f332c32..53a4e171e74 100644
--- a/source/blender/freestyle/intern/python/BPy_Convert.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp
@@ -30,6 +30,8 @@
#include "Iterator/BPy_ViewEdgeIterator.h"
#include "Iterator/BPy_orientedViewEdgeIterator.h"
+#include "../stroke/StrokeRep.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -242,6 +244,7 @@ Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) {
PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it ) {
PyObject *py_a_it = AdjacencyIterator_Type.tp_new( &AdjacencyIterator_Type, 0, 0 );
((BPy_AdjacencyIterator *) py_a_it)->a_it = new AdjacencyIterator( a_it );
+ ((BPy_AdjacencyIterator *) py_a_it)->py_it.it = ((BPy_AdjacencyIterator *) py_a_it)->a_it;
return py_a_it;
}
@@ -249,62 +252,72 @@ PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it
PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ) {
PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 );
((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( if0D_it );
+ ((BPy_Interface0DIterator *) py_if0D_it)->py_it.it = ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it;
return py_if0D_it;
}
PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it ) {
PyObject *py_cp_it = CurvePointIterator_Type.tp_new( &CurvePointIterator_Type, 0, 0 );
- ((BPy_CurvePointIterator*) py_cp_it)->cp_it = new CurveInternal::CurvePointIterator( cp_it );
+ ((BPy_CurvePointIterator *) py_cp_it)->cp_it = new CurveInternal::CurvePointIterator( cp_it );
+ ((BPy_CurvePointIterator *) py_cp_it)->py_it.it = ((BPy_CurvePointIterator *) py_cp_it)->cp_it;
return py_cp_it;
}
PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it) {
PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new( &StrokeVertexIterator_Type, 0, 0 );
- ((BPy_StrokeVertexIterator*) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it );
+ ((BPy_StrokeVertexIterator *) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it );
+ ((BPy_StrokeVertexIterator *) py_sv_it)->py_it.it = ((BPy_StrokeVertexIterator *) py_sv_it)->sv_it;
return py_sv_it;
}
PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it ) {
PyObject *py_sv_it = SVertexIterator_Type.tp_new( &SVertexIterator_Type, 0, 0 );
- ((BPy_SVertexIterator*) py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator( sv_it );
-
+ ((BPy_SVertexIterator *) py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator( sv_it );
+ ((BPy_SVertexIterator *) py_sv_it)->py_it.it = ((BPy_SVertexIterator *) py_sv_it)->sv_it;
+
return py_sv_it;
}
+
PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) {
PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 );
((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it );
-
+ ((BPy_orientedViewEdgeIterator *) py_ove_it)->py_it.it = ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it;
+
return py_ove_it;
}
PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it ) {
PyObject *py_ve_it = ViewEdgeIterator_Type.tp_new( &ViewEdgeIterator_Type, 0, 0 );
- ((BPy_ViewEdgeIterator*) py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator( ve_it );
-
+ ((BPy_ViewEdgeIterator *) py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator( ve_it );
+ ((BPy_ViewEdgeIterator *) py_ve_it)->py_it.it = ((BPy_ViewEdgeIterator *) py_ve_it)->ve_it;
+
return py_ve_it;
}
PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ) {
PyObject *py_c_it = ChainingIterator_Type.tp_new( &ChainingIterator_Type, 0, 0 );
- ((BPy_ChainingIterator*) py_c_it)->c_it = new ChainingIterator( c_it );
-
+ ((BPy_ChainingIterator *) py_c_it)->c_it = new ChainingIterator( c_it );
+ ((BPy_ChainingIterator *) py_c_it)->py_ve_it.py_it.it = ((BPy_ChainingIterator *) py_c_it)->c_it;
+
return py_c_it;
}
PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ) {
PyObject *py_cp_it = ChainPredicateIterator_Type.tp_new( &ChainPredicateIterator_Type, 0, 0 );
- ((BPy_ChainPredicateIterator*) py_cp_it)->cp_it = new ChainPredicateIterator( cp_it );
+ ((BPy_ChainPredicateIterator *) py_cp_it)->cp_it = new ChainPredicateIterator( cp_it );
+ ((BPy_ChainPredicateIterator *) py_cp_it)->py_c_it.py_ve_it.py_it.it = ((BPy_ChainPredicateIterator *) py_cp_it)->cp_it;
return py_cp_it;
}
PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ) {
PyObject *py_cs_it = ChainSilhouetteIterator_Type.tp_new( &ChainSilhouetteIterator_Type, 0, 0 );
- ((BPy_ChainSilhouetteIterator*) py_cs_it)->cs_it = new ChainSilhouetteIterator( cs_it );
+ ((BPy_ChainSilhouetteIterator *) py_cs_it)->cs_it = new ChainSilhouetteIterator( cs_it );
+ ((BPy_ChainSilhouetteIterator *) py_cs_it)->py_c_it.py_ve_it.py_it.it = ((BPy_ChainSilhouetteIterator *) py_cs_it)->cs_it;
return py_cs_it;
}
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index 6348d30577c..b4170dc4f92 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -4,6 +4,7 @@
#include "BPy_BinaryPredicate0D.h"
#include "BPy_BinaryPredicate1D.h"
#include "BPy_Material.h"
+#include "BPy_FrsNoise.h"
#include "BPy_Id.h"
#include "BPy_IntegrationType.h"
#include "BPy_Interface0D.h"
@@ -12,7 +13,6 @@
#include "BPy_MediumType.h"
#include "BPy_Nature.h"
#include "BPy_Operators.h"
-#include "BPy_Noise.h"
#include "BPy_SShape.h"
#include "BPy_StrokeAttribute.h"
#include "BPy_StrokeShader.h"
@@ -148,13 +148,13 @@ PyObject *Freestyle_Init( void )
BinaryPredicate0D_Init( module );
BinaryPredicate1D_Init( module );
Material_Init( module );
+ FrsNoise_Init( module );
Id_Init( module );
IntegrationType_Init( module );
Interface0D_Init( module );
Interface1D_Init( module );
Iterator_Init( module );
Operators_Init( module );
- Noise_Init( module );
SShape_Init( module );
StrokeAttribute_Init( module );
StrokeShader_Init( module );
diff --git a/source/blender/freestyle/intern/python/BPy_Noise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
index f8d5d6b066d..a9989b13c6d 100644
--- a/source/blender/freestyle/intern/python/BPy_Noise.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp
@@ -1,4 +1,4 @@
-#include "BPy_Noise.h"
+#include "BPy_FrsNoise.h"
#ifdef __cplusplus
extern "C" {
@@ -6,45 +6,45 @@ extern "C" {
///////////////////////////////////////////////////////////////////////////////////////////
-/*--------------- Python API function prototypes for Noise instance -----------*/
-static int Noise___init__(BPy_Noise *self, PyObject *args, PyObject *kwds);
-static void Noise___dealloc__(BPy_Noise *self);
-static PyObject * Noise___repr__(BPy_Noise *self);
-
-static PyObject * Noise_turbulence1( BPy_Noise *self, PyObject *args);
-static PyObject * Noise_turbulence2( BPy_Noise *self, PyObject *args);
-static PyObject * Noise_turbulence3( BPy_Noise *self, PyObject *args);
-static PyObject * Noise_smoothNoise1( BPy_Noise *self, PyObject *args);
-static PyObject * Noise_smoothNoise2( BPy_Noise *self, PyObject *args);
-static PyObject * Noise_smoothNoise3( BPy_Noise *self, PyObject *args);
-
-/*----------------------Noise instance definitions ----------------------------*/
-static PyMethodDef BPy_Noise_methods[] = {
- {"turbulence1", ( PyCFunction ) Noise_turbulence1, METH_VARARGS, "(float arg, float freq, float amp, unsigned oct=4))Returns a noise value for a 1D element"},
- {"turbulence2", ( PyCFunction ) Noise_turbulence2, METH_VARARGS, "([x, y], float freq, float amp, unsigned oct=4)))Returns a noise value for a 2D element"},
- {"turbulence3", ( PyCFunction ) Noise_turbulence3, METH_VARARGS, "([x, y, z], float freq, float amp, unsigned oct=4)))Returns a noise value for a 3D element"},
- {"smoothNoise1", ( PyCFunction ) Noise_smoothNoise1, METH_VARARGS, "(float arg))Returns a smooth noise value for a 1D element "},
- {"smoothNoise2", ( PyCFunction ) Noise_smoothNoise2, METH_VARARGS, "([x, y]))Returns a smooth noise value for a 2D element "},
- {"smoothNoise3", ( PyCFunction ) Noise_smoothNoise3, METH_VARARGS, "([x, y, z))Returns a smooth noise value for a 3D element "},
+/*--------------- Python API function prototypes for FrsNoise instance -----------*/
+static int FrsNoise___init__(BPy_FrsNoise *self, PyObject *args, PyObject *kwds);
+static void FrsNoise___dealloc__(BPy_FrsNoise *self);
+static PyObject * FrsNoise___repr__(BPy_FrsNoise *self);
+
+static PyObject * FrsNoise_turbulence1( BPy_FrsNoise *self, PyObject *args);
+static PyObject * FrsNoise_turbulence2( BPy_FrsNoise *self, PyObject *args);
+static PyObject * FrsNoise_turbulence3( BPy_FrsNoise *self, PyObject *args);
+static PyObject * FrsNoise_smoothNoise1( BPy_FrsNoise *self, PyObject *args);
+static PyObject * FrsNoise_smoothNoise2( BPy_FrsNoise *self, PyObject *args);
+static PyObject * FrsNoise_smoothNoise3( BPy_FrsNoise *self, PyObject *args);
+
+/*----------------------FrsNoise instance definitions ----------------------------*/
+static PyMethodDef BPy_FrsNoise_methods[] = {
+ {"turbulence1", ( PyCFunction ) FrsNoise_turbulence1, METH_VARARGS, "(float arg, float freq, float amp, unsigned oct=4))Returns a noise value for a 1D element"},
+ {"turbulence2", ( PyCFunction ) FrsNoise_turbulence2, METH_VARARGS, "([x, y], float freq, float amp, unsigned oct=4)))Returns a noise value for a 2D element"},
+ {"turbulence3", ( PyCFunction ) FrsNoise_turbulence3, METH_VARARGS, "([x, y, z], float freq, float amp, unsigned oct=4)))Returns a noise value for a 3D element"},
+ {"smoothNoise1", ( PyCFunction ) FrsNoise_smoothNoise1, METH_VARARGS, "(float arg))Returns a smooth noise value for a 1D element "},
+ {"smoothNoise2", ( PyCFunction ) FrsNoise_smoothNoise2, METH_VARARGS, "([x, y]))Returns a smooth noise value for a 2D element "},
+ {"smoothNoise3", ( PyCFunction ) FrsNoise_smoothNoise3, METH_VARARGS, "([x, y, z))Returns a smooth noise value for a 3D element "},
{NULL, NULL, 0, NULL}
};
-/*-----------------------BPy_Noise type definition ------------------------------*/
+/*-----------------------BPy_FrsNoise type definition ------------------------------*/
-PyTypeObject Noise_Type = {
+PyTypeObject FrsNoise_Type = {
PyObject_HEAD_INIT( NULL )
0, /* ob_size */
- "Noise", /* tp_name */
- sizeof( BPy_Noise ), /* tp_basicsize */
+ "FrsNoise", /* tp_name */
+ sizeof( BPy_FrsNoise ), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)Noise___dealloc__, /* tp_dealloc */
+ (destructor)FrsNoise___dealloc__, /* tp_dealloc */
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
NULL, /* tp_compare */
- (reprfunc)Noise___repr__, /* tp_repr */
+ (reprfunc)FrsNoise___repr__, /* tp_repr */
/* Method suites for standard classes */
@@ -87,7 +87,7 @@ PyTypeObject Noise_Type = {
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
- BPy_Noise_methods, /* struct PyMethodDef *tp_methods; */
+ BPy_FrsNoise_methods, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
NULL, /* struct _typeobject *tp_base; */
@@ -95,7 +95,7 @@ PyTypeObject Noise_Type = {
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
0, /* long tp_dictoffset; */
- (initproc)Noise___init__, /* initproc tp_init; */
+ (initproc)FrsNoise___init__, /* initproc tp_init; */
NULL, /* allocfunc tp_alloc; */
PyType_GenericNew, /* newfunc tp_new; */
@@ -115,58 +115,58 @@ PyTypeObject Noise_Type = {
};
//-------------------MODULE INITIALIZATION--------------------------------
-PyMODINIT_FUNC Noise_Init( PyObject *module )
+PyMODINIT_FUNC FrsNoise_Init( PyObject *module )
{
if( module == NULL )
return;
- if( PyType_Ready( &Noise_Type ) < 0 )
+ if( PyType_Ready( &FrsNoise_Type ) < 0 )
return;
- Py_INCREF( &Noise_Type );
- PyModule_AddObject(module, "Noise", (PyObject *)&Noise_Type);
+ Py_INCREF( &FrsNoise_Type );
+ PyModule_AddObject(module, "FrsNoise", (PyObject *)&FrsNoise_Type);
}
//------------------------INSTANCE METHODS ----------------------------------
-int Noise___init__(BPy_Noise *self, PyObject *args, PyObject *kwds)
+int FrsNoise___init__(BPy_FrsNoise *self, PyObject *args, PyObject *kwds)
{
self->n = new Noise();
return 0;
}
-void Noise___dealloc__(BPy_Noise* self)
+void FrsNoise___dealloc__(BPy_FrsNoise* self)
{
delete self->n;
self->ob_type->tp_free((PyObject*)self);
}
-PyObject * Noise___repr__(BPy_Noise* self)
+PyObject * FrsNoise___repr__(BPy_FrsNoise* self)
{
- return PyString_FromFormat("Noise - address: %p", self->n );
+ return PyString_FromFormat("FrsNoise - address: %p", self->n );
}
-PyObject * Noise_turbulence1( BPy_Noise *self , PyObject *args) {
+PyObject * FrsNoise_turbulence1( BPy_FrsNoise *self , PyObject *args) {
float f1, f2, f3;
unsigned int i;
if(!( PyArg_ParseTuple(args, "fff|I", &f1, &f2, &f3, &i) )) {
- cout << "ERROR: Noise_turbulence1" << endl;
+ cout << "ERROR: FrsNoise_turbulence1" << endl;
Py_RETURN_NONE;
}
return PyFloat_FromDouble( self->n->turbulence1(f1, f2, f3, i) );
}
-PyObject * Noise_turbulence2( BPy_Noise *self , PyObject *args) {
+PyObject * FrsNoise_turbulence2( BPy_FrsNoise *self , PyObject *args) {
PyObject *obj1;
float f2, f3;
unsigned int i;
if(!( PyArg_ParseTuple(args, "Off|I", &obj1, &f2, &f3, &i) && PyList_Check(obj1) && PyList_Size(obj1) > 1 )) {
- cout << "ERROR: Noise_turbulence2" << endl;
+ cout << "ERROR: FrsNoise_turbulence2" << endl;
Py_RETURN_NONE;
}
@@ -175,13 +175,13 @@ PyObject * Noise_turbulence2( BPy_Noise *self , PyObject *args) {
return PyFloat_FromDouble( self->n->turbulence2(v, f2, f3, i) );
}
-PyObject * Noise_turbulence3( BPy_Noise *self , PyObject *args) {
+PyObject * FrsNoise_turbulence3( BPy_FrsNoise *self , PyObject *args) {
PyObject *obj1;
float f2, f3;
unsigned int i;
if(!( PyArg_ParseTuple(args, "Off|I", &obj1, &f2, &f3, &i) && PyList_Check(obj1) && PyList_Size(obj1) > 2 )) {
- cout << "ERROR: Noise_turbulence3" << endl;
+ cout << "ERROR: FrsNoise_turbulence3" << endl;
Py_RETURN_NONE;
}
@@ -192,22 +192,22 @@ PyObject * Noise_turbulence3( BPy_Noise *self , PyObject *args) {
return PyFloat_FromDouble( self->n->turbulence3(v, f2, f3, i) );
}
-PyObject * Noise_smoothNoise1( BPy_Noise *self , PyObject *args) {
+PyObject * FrsNoise_smoothNoise1( BPy_FrsNoise *self , PyObject *args) {
float f;
if(!( PyArg_ParseTuple(args, "f", &f) )) {
- cout << "ERROR: Noise_smoothNoise1" << endl;
+ cout << "ERROR: FrsNoise_smoothNoise1" << endl;
Py_RETURN_NONE;
}
return PyFloat_FromDouble( self->n->smoothNoise1(f) );
}
-PyObject * Noise_smoothNoise2( BPy_Noise *self , PyObject *args) {
+PyObject * FrsNoise_smoothNoise2( BPy_FrsNoise *self , PyObject *args) {
PyObject *obj;
if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 1 )) {
- cout << "ERROR: Noise_smoothNoise2" << endl;
+ cout << "ERROR: FrsNoise_smoothNoise2" << endl;
Py_RETURN_NONE;
}
@@ -216,11 +216,11 @@ PyObject * Noise_smoothNoise2( BPy_Noise *self , PyObject *args) {
return PyFloat_FromDouble( self->n->smoothNoise2(v) );
}
-PyObject * Noise_smoothNoise3( BPy_Noise *self , PyObject *args) {
+PyObject * FrsNoise_smoothNoise3( BPy_FrsNoise *self , PyObject *args) {
PyObject *obj;
if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 2 )) {
- cout << "ERROR: Noise_smoothNoise3" << endl;
+ cout << "ERROR: FrsNoise_smoothNoise3" << endl;
Py_RETURN_NONE;
}
diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.h b/source/blender/freestyle/intern/python/BPy_FrsNoise.h
new file mode 100644
index 00000000000..d0215fda9af
--- /dev/null
+++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.h
@@ -0,0 +1,36 @@
+#ifndef FREESTYLE_PYTHON_FRSNOISE_H
+#define FREESTYLE_PYTHON_FRSNOISE_H
+
+#include "../geometry/Noise.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#include <Python.h>
+
+extern PyTypeObject FrsNoise_Type;
+
+#define BPy_FrsNoise_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsNoise_Type) )
+
+/*---------------------------Python BPy_FrsNoise structure definition----------*/
+typedef struct {
+ PyObject_HEAD
+ Noise *n;
+} BPy_FrsNoise;
+
+/*---------------------------Python BPy_FrsNoise visible prototypes-----------*/
+
+PyMODINIT_FUNC FrsNoise_Init( PyObject *module );
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* FREESTYLE_PYTHON_FRSNOISE_H */
diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
index 509dfb23894..3db9531da4b 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp
@@ -1,7 +1,7 @@
#include "BPy_Interface1D.h"
#include "BPy_Convert.h"
-#include "Interface1D/BPy_Curve.h"
+#include "Interface1D/BPy_FrsCurve.h"
#include "Interface1D/Curve/BPy_Chain.h"
#include "Interface1D/BPy_FEdge.h"
#include "Interface1D/FEdge/BPy_FEdgeSharp.h"
@@ -142,10 +142,10 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module )
Py_INCREF( &Interface1D_Type );
PyModule_AddObject(module, "Interface1D", (PyObject *)&Interface1D_Type);
- if( PyType_Ready( &Curve_Type ) < 0 )
+ if( PyType_Ready( &FrsCurve_Type ) < 0 )
return;
- Py_INCREF( &Curve_Type );
- PyModule_AddObject(module, "Curve", (PyObject *)&Curve_Type);
+ Py_INCREF( &FrsCurve_Type );
+ PyModule_AddObject(module, "FrsCurve", (PyObject *)&FrsCurve_Type);
if( PyType_Ready( &Chain_Type ) < 0 )
return;
diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
index cf6d8ed4877..23dd68e0aa8 100644
--- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp
@@ -227,14 +227,11 @@ PyObject * Iterator_isEnd(BPy_Iterator* self) {
return PyBool_from_bool( self->it->isEnd() );
}
-//%rename(getObject) Interface0DIterator::operator*
PyObject * Iterator_getObject(BPy_Iterator* self) {
return PyBool_from_bool( self->it->isEnd() );
}
-
-
///////////////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
diff --git a/source/blender/freestyle/intern/python/BPy_Noise.h b/source/blender/freestyle/intern/python/BPy_Noise.h
deleted file mode 100644
index 5dc8a1a4bd1..00000000000
--- a/source/blender/freestyle/intern/python/BPy_Noise.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef FREESTYLE_PYTHON_NOISE_H
-#define FREESTYLE_PYTHON_NOISE_H
-
-#include "../geometry/Noise.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-///////////////////////////////////////////////////////////////////////////////////////////
-
-#include <Python.h>
-
-extern PyTypeObject Noise_Type;
-
-#define BPy_Noise_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Noise_Type) )
-
-/*---------------------------Python BPy_Noise structure definition----------*/
-typedef struct {
- PyObject_HEAD
- Noise *n;
-} BPy_Noise;
-
-/*---------------------------Python BPy_Noise visible prototypes-----------*/
-
-PyMODINIT_FUNC Noise_Init( PyObject *module );
-
-
-///////////////////////////////////////////////////////////////////////////////////////////
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* FREESTYLE_PYTHON_NOISE_H */
diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp
index d3aff4a65f2..42677919ca5 100644
--- a/source/blender/freestyle/intern/python/Director.cpp
+++ b/source/blender/freestyle/intern/python/Director.cpp
@@ -61,7 +61,6 @@ ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyItera
return ((BPy_ViewEdge *) result)->ve;
}
-
// BPy_UnaryFunction{0D,1D}: __call__
// BPy_UnaryFunction0DDouble
// BPy_UnaryFunction0DEdgeNature
@@ -83,4 +82,26 @@ ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyItera
// BPy_UnaryFunction1DVectorViewShape
// BPy_UnaryFunction1DVoid
+// BPy_Iterator: increment, decrement, isBegin, isEnd
+void Director_BPy_Iterator_increment( PyObject *obj ) {
+ PyObject_CallMethod( obj, "increment", "", 0 );
+}
+
+void Director_BPy_Iterator_decrement( PyObject *obj ) {
+ PyObject_CallMethod( obj, "decrement", "", 0 );
+}
+
+bool Director_BPy_Iterator_isBegin( PyObject *obj ) {
+ PyObject *result = PyObject_CallMethod( obj, "isBegin", "", 0 );
+
+ return bool_from_PyBool(result);
+}
+
+bool Director_BPy_Iterator_isEnd( PyObject *obj ) {
+ PyObject *result = PyObject_CallMethod( obj, "isEnd", "", 0 );
+
+ return bool_from_PyBool(result);
+}
+
+
diff --git a/source/blender/freestyle/intern/python/Director.h b/source/blender/freestyle/intern/python/Director.h
index 95ab16047a8..2a67be237f5 100644
--- a/source/blender/freestyle/intern/python/Director.h
+++ b/source/blender/freestyle/intern/python/Director.h
@@ -59,7 +59,10 @@ double Director_BPy_UnaryFunction0DDouble___call__( PyObject *obj, Interface0DIt
// BPy_UnaryFunction1DVoid
void Director_BPy_UnaryFunction1DVoid___call__( PyObject *obj, Interface1D& if1D);
-
-
+// BPy_Iterator: increment, decrement, isBegin, isEnd
+void Director_BPy_Iterator_increment( PyObject *obj );
+void Director_BPy_Iterator_decrement( PyObject *obj );
+bool Director_BPy_Iterator_isBegin( PyObject *obj );
+bool Director_BPy_Iterator_isEnd( PyObject *obj );
#endif // FREESTYLE_PYTHON_DIRECTOR
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
index b0f043a6525..1506092511a 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp
@@ -1,4 +1,4 @@
-#include "BPy_Curve.h"
+#include "BPy_FrsCurve.h"
#include "../BPy_Convert.h"
#include "../BPy_Id.h"
@@ -11,38 +11,38 @@ extern "C" {
///////////////////////////////////////////////////////////////////////////////////////////
-/*--------------- Python API function prototypes for Curve instance -----------*/
-static int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds);
-static PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args );
-static PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args );
-static PyObject * Curve_empty( BPy_Curve *self );
-static PyObject * Curve_nSegments( BPy_Curve *self );
+/*--------------- Python API function prototypes for FrsCurve instance -----------*/
+static int FrsCurve___init__(BPy_FrsCurve *self, PyObject *args, PyObject *kwds);
+static PyObject * FrsCurve_push_vertex_back( BPy_FrsCurve *self, PyObject *args );
+static PyObject * FrsCurve_push_vertex_front( BPy_FrsCurve *self, PyObject *args );
+static PyObject * FrsCurve_empty( BPy_FrsCurve *self );
+static PyObject * FrsCurve_nSegments( BPy_FrsCurve *self );
// point_iterator points_begin (float step=0)
-static PyObject * Curve_verticesBegin( BPy_Curve *self );
-static PyObject * Curve_verticesEnd( BPy_Curve *self );
-static PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args );
-static PyObject * Curve_pointsEnd( BPy_Curve *self, PyObject *args );
-
-/*----------------------Curve instance definitions ----------------------------*/
-static PyMethodDef BPy_Curve_methods[] = {
- {"push_vertex_back", ( PyCFunction ) Curve_push_vertex_back, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the front of the Curve."},
- {"push_vertex_front", ( PyCFunction ) Curve_push_vertex_front, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the end of the Curve."},
- {"empty", ( PyCFunction ) Curve_empty, METH_NOARGS, "() Returns true is the Curve doesn't have any Vertex yet."},
- {"nSegments", ( PyCFunction ) Curve_nSegments, METH_NOARGS, "() Returns the number of segments in the oplyline constituing the Curve."},
- {"verticesBegin", ( PyCFunction ) Curve_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can iterate over the vertices of the Curve."},
- {"verticesEnd", ( PyCFunction ) Curve_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator pointing after the last vertex of the Curve and that can iterate over the vertices of the Curve."},
- {"pointsBegin", ( PyCFunction ) Curve_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing onto the first point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."},
- {"pointsEnd", ( PyCFunction ) Curve_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing after the last point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."},
+static PyObject * FrsCurve_verticesBegin( BPy_FrsCurve *self );
+static PyObject * FrsCurve_verticesEnd( BPy_FrsCurve *self );
+static PyObject * FrsCurve_pointsBegin( BPy_FrsCurve *self, PyObject *args );
+static PyObject * FrsCurve_pointsEnd( BPy_FrsCurve *self, PyObject *args );
+
+/*----------------------FrsCurve instance definitions ----------------------------*/
+static PyMethodDef BPy_FrsCurve_methods[] = {
+ {"push_vertex_back", ( PyCFunction ) FrsCurve_push_vertex_back, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the front of the Curve."},
+ {"push_vertex_front", ( PyCFunction ) FrsCurve_push_vertex_front, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the end of the Curve."},
+ {"empty", ( PyCFunction ) FrsCurve_empty, METH_NOARGS, "() Returns true is the Curve doesn't have any Vertex yet."},
+ {"nSegments", ( PyCFunction ) FrsCurve_nSegments, METH_NOARGS, "() Returns the number of segments in the oplyline constituing the Curve."},
+ {"verticesBegin", ( PyCFunction ) FrsCurve_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can iterate over the vertices of the Curve."},
+ {"verticesEnd", ( PyCFunction ) FrsCurve_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator pointing after the last vertex of the Curve and that can iterate over the vertices of the Curve."},
+ {"pointsBegin", ( PyCFunction ) FrsCurve_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing onto the first point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."},
+ {"pointsEnd", ( PyCFunction ) FrsCurve_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing after the last point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."},
{NULL, NULL, 0, NULL}
};
-/*-----------------------BPy_Curve type definition ------------------------------*/
+/*-----------------------BPy_FrsCurve type definition ------------------------------*/
-PyTypeObject Curve_Type = {
+PyTypeObject FrsCurve_Type = {
PyObject_HEAD_INIT( NULL )
0, /* ob_size */
- "Curve", /* tp_name */
- sizeof( BPy_Curve ), /* tp_basicsize */
+ "FrsCurve", /* tp_name */
+ sizeof( BPy_FrsCurve ), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
@@ -94,7 +94,7 @@ PyTypeObject Curve_Type = {
NULL, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
- BPy_Curve_methods, /* struct PyMethodDef *tp_methods; */
+ BPy_FrsCurve_methods, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
&Interface1D_Type, /* struct _typeobject *tp_base; */
@@ -102,7 +102,7 @@ PyTypeObject Curve_Type = {
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
0, /* long tp_dictoffset; */
- (initproc)Curve___init__, /* initproc tp_init; */
+ (initproc)FrsCurve___init__, /* initproc tp_init; */
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
@@ -126,7 +126,7 @@ PyTypeObject Curve_Type = {
//------------------------INSTANCE METHODS ----------------------------------
-int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds)
+int FrsCurve___init__(BPy_FrsCurve *self, PyObject *args, PyObject *kwds)
{
PyObject *obj = 0;
@@ -137,9 +137,9 @@ int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds)
if( !obj ){
self->c = new Curve();
- } else if( BPy_Curve_Check(obj) ) {
- if( ((BPy_Curve *) obj)->c )
- self->c = new Curve(*( ((BPy_Curve *) obj)->c ));
+ } else if( BPy_FrsCurve_Check(obj) ) {
+ if( ((BPy_FrsCurve *) obj)->c )
+ self->c = new Curve(*( ((BPy_FrsCurve *) obj)->c ));
else
return -1;
@@ -159,11 +159,11 @@ int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds)
}
-PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ) {
+PyObject * FrsCurve_push_vertex_back( BPy_FrsCurve *self, PyObject *args ) {
PyObject *obj;
if(!( PyArg_ParseTuple(args, "O", &obj) )) {
- cout << "ERROR: Curve_push_vertex_back" << endl;
+ cout << "ERROR: FrsCurve_push_vertex_back" << endl;
Py_RETURN_NONE;
}
@@ -176,11 +176,11 @@ PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ) {
Py_RETURN_NONE;
}
-PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ) {
+PyObject * FrsCurve_push_vertex_front( BPy_FrsCurve *self, PyObject *args ) {
PyObject *obj;
if(!( PyArg_ParseTuple(args, "O", &obj) )) {
- cout << "ERROR: Curve_push_vertex_front" << endl;
+ cout << "ERROR: FrsCurve_push_vertex_front" << endl;
Py_RETURN_NONE;
}
@@ -193,11 +193,11 @@ PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ) {
Py_RETURN_NONE;
}
-PyObject * Curve_empty( BPy_Curve *self ) {
+PyObject * FrsCurve_empty( BPy_FrsCurve *self ) {
return PyBool_from_bool( self->c->empty() );
}
-PyObject * Curve_nSegments( BPy_Curve *self ) {
+PyObject * FrsCurve_nSegments( BPy_FrsCurve *self ) {
return PyInt_FromLong( self->c->nSegments() );
}
@@ -205,18 +205,18 @@ PyObject * Curve_nSegments( BPy_Curve *self ) {
// not implemented
-PyObject * Curve_verticesBegin( BPy_Curve *self ) {
+PyObject * FrsCurve_verticesBegin( BPy_FrsCurve *self ) {
Interface0DIterator if0D_it( self->c->verticesBegin() );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
}
-PyObject * Curve_verticesEnd( BPy_Curve *self ) {
+PyObject * FrsCurve_verticesEnd( BPy_FrsCurve *self ) {
Interface0DIterator if0D_it( self->c->verticesEnd() );
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
}
-PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ) {
+PyObject * FrsCurve_pointsBegin( BPy_FrsCurve *self, PyObject *args ) {
float f = 0;
if(!( PyArg_ParseTuple(args, "|f", &f) )) {
@@ -228,7 +228,7 @@ PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ) {
return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it );
}
-PyObject * Curve_pointsEnd( BPy_Curve *self, PyObject *args ) {
+PyObject * FrsCurve_pointsEnd( BPy_FrsCurve *self, PyObject *args ) {
float f = 0;
if(!( PyArg_ParseTuple(args, "|f", &f) )) {
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h
index fd29a7bf4f1..0829cf0ebf5 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h
@@ -1,5 +1,5 @@
-#ifndef FREESTYLE_PYTHON_CURVE_H
-#define FREESTYLE_PYTHON_CURVE_H
+#ifndef FREESTYLE_PYTHON_FRSCURVE_H
+#define FREESTYLE_PYTHON_FRSCURVE_H
#include "../BPy_Interface1D.h"
#include "../../stroke/Curve.h"
@@ -12,15 +12,15 @@ extern "C" {
#include <Python.h>
-extern PyTypeObject Curve_Type;
+extern PyTypeObject FrsCurve_Type;
-#define BPy_Curve_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curve_Type) )
+#define BPy_FrsCurve_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsCurve_Type) )
-/*---------------------------Python BPy_Curve structure definition----------*/
+/*---------------------------Python BPy_FrsCurve structure definition----------*/
typedef struct {
BPy_Interface1D py_if1D;
Curve *c;
-} BPy_Curve;
+} BPy_FrsCurve;
///////////////////////////////////////////////////////////////////////////////////////////
@@ -28,4 +28,4 @@ typedef struct {
}
#endif
-#endif /* FREESTYLE_PYTHON_CURVE_H */
+#endif /* FREESTYLE_PYTHON_FRSCURVE_H */
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index 8b6240986b9..7116c574c76 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -84,7 +84,7 @@ PyTypeObject Chain_Type = {
BPy_Chain_methods, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
- &Curve_Type, /* struct _typeobject *tp_base; */
+ &FrsCurve_Type, /* struct _typeobject *tp_base; */
NULL, /* PyObject *tp_dict; */
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h
index ade70c47f25..19f325ef513 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h
@@ -1,7 +1,7 @@
#ifndef FREESTYLE_PYTHON_CHAIN_H
#define FREESTYLE_PYTHON_CHAIN_H
-#include "../BPy_Curve.h"
+#include "../BPy_FrsCurve.h"
#include "../../../stroke/Chain.h"
#ifdef __cplusplus
@@ -18,7 +18,7 @@ extern PyTypeObject Chain_Type;
/*---------------------------Python BPy_Chain structure definition----------*/
typedef struct {
- BPy_Curve py_c;
+ BPy_FrsCurve py_c;
Chain *c;
} BPy_Chain;
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
index 13c8382c3a2..139db9dd73f 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
@@ -134,6 +134,7 @@ int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args )
}
self->py_it.it = self->a_it;
+
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
index c5ff61e239f..3d41e4b66c1 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp
@@ -142,6 +142,7 @@ int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject *
self->py_c_it.py_ve_it.ve_it = self->cp_it;
self->py_c_it.py_ve_it.py_it.it = self->cp_it;
+
return 0;
}
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
index 92c3a7dfc38..1b3a37b5518 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp
@@ -123,8 +123,8 @@ int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject *args )
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 ) {
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
index 1f3e3c05d91..0547c173249 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp
@@ -143,7 +143,7 @@ int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args )
}
self->py_it.it = self->ve_it;
-
+
return 0;
}