Code clean-up and fix for typos in docstrings.
This commit is contained in:
		@@ -81,10 +81,6 @@ static PyObject * BBox_repr(BPy_BBox* self)
 | 
			
		||||
	return PyUnicode_FromFormat("BBox - address: %p", self->bb);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_BBox_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*-----------------------BPy_BBox type definition ------------------------------*/
 | 
			
		||||
 | 
			
		||||
PyTypeObject BBox_Type = {
 | 
			
		||||
@@ -115,7 +111,7 @@ PyTypeObject BBox_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_BBox_methods,               /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	0,                              /* tp_getset */
 | 
			
		||||
	0,                              /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -48,9 +48,9 @@ int BinaryPredicate0D_Init(PyObject *module)
 | 
			
		||||
 | 
			
		||||
	if (PyType_Ready(&BinaryPredicate0D_Type) < 0)
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
	Py_INCREF(&BinaryPredicate0D_Type);
 | 
			
		||||
	PyModule_AddObject(module, "BinaryPredicate0D", (PyObject *)&BinaryPredicate0D_Type);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -72,61 +72,71 @@
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
//==============================
 | 
			
		||||
// C++ => Python
 | 
			
		||||
//==============================
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
PyObject * PyBool_from_bool( bool b ){
 | 
			
		||||
PyObject *PyBool_from_bool(bool b)
 | 
			
		||||
{
 | 
			
		||||
	return PyBool_FromLong(b ? 1 : 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
PyObject * Vector_from_Vec2f( Vec2f& vec ) {
 | 
			
		||||
PyObject *Vector_from_Vec2f(Vec2f& vec)
 | 
			
		||||
{
 | 
			
		||||
	float vec_data[2]; // because vec->_coord is protected
 | 
			
		||||
 | 
			
		||||
	vec_data[0] = vec.x();		vec_data[1] = vec.y();
 | 
			
		||||
	vec_data[0] = vec.x();
 | 
			
		||||
	vec_data[1] = vec.y();
 | 
			
		||||
	return Vector_CreatePyObject(vec_data, 2, Py_NEW, NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * Vector_from_Vec3f( Vec3f& vec ) {
 | 
			
		||||
PyObject *Vector_from_Vec3f(Vec3f& vec)
 | 
			
		||||
{
 | 
			
		||||
	float vec_data[3]; // because vec->_coord is protected
 | 
			
		||||
	
 | 
			
		||||
	vec_data[0] = vec.x();		vec_data[1] = vec.y(); 		vec_data[2] = vec.z(); 
 | 
			
		||||
	vec_data[0] = vec.x();
 | 
			
		||||
	vec_data[1] = vec.y();
 | 
			
		||||
	vec_data[2] = vec.z(); 
 | 
			
		||||
	return Vector_CreatePyObject(vec_data, 3, Py_NEW, NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * Vector_from_Vec3r( Vec3r& vec ) {
 | 
			
		||||
PyObject *Vector_from_Vec3r(Vec3r& vec)
 | 
			
		||||
{
 | 
			
		||||
	float vec_data[3]; // because vec->_coord is protected
 | 
			
		||||
	
 | 
			
		||||
	vec_data[0] = vec.x();		vec_data[1] = vec.y(); 		vec_data[2] = vec.z(); 
 | 
			
		||||
	vec_data[0] = vec.x();
 | 
			
		||||
	vec_data[1] = vec.y();
 | 
			
		||||
	vec_data[2] = vec.z();
 | 
			
		||||
	return Vector_CreatePyObject(vec_data, 3, Py_NEW, NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Id_from_Id( Id& id ) {
 | 
			
		||||
PyObject *BPy_Id_from_Id(Id& id)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_id = Id_Type.tp_new(&Id_Type, 0, 0);
 | 
			
		||||
	((BPy_Id *)py_id)->id = new Id(id.getFirst(), id.getSecond());
 | 
			
		||||
 | 
			
		||||
	return py_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * Any_BPy_Interface0D_from_Interface0D( Interface0D& if0D ) {
 | 
			
		||||
PyObject *Any_BPy_Interface0D_from_Interface0D(Interface0D& if0D)
 | 
			
		||||
{
 | 
			
		||||
	if (typeid(if0D) == typeid(CurvePoint)) {
 | 
			
		||||
		return BPy_CurvePoint_from_CurvePoint(dynamic_cast<CurvePoint&>(if0D));
 | 
			
		||||
	} else if (typeid(if0D) == typeid(StrokeVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if0D) == typeid(StrokeVertex)) {
 | 
			
		||||
		return BPy_StrokeVertex_from_StrokeVertex(dynamic_cast<StrokeVertex&>(if0D));
 | 
			
		||||
	} else if (typeid(if0D) == typeid(SVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if0D) == typeid(SVertex)) {
 | 
			
		||||
		return BPy_SVertex_from_SVertex(dynamic_cast<SVertex&>(if0D));
 | 
			
		||||
	} else if (typeid(if0D) == typeid(ViewVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if0D) == typeid(ViewVertex)) {
 | 
			
		||||
		return BPy_ViewVertex_from_ViewVertex(dynamic_cast<ViewVertex&>(if0D));
 | 
			
		||||
	} else if (typeid(if0D) == typeid(NonTVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if0D) == typeid(NonTVertex)) {
 | 
			
		||||
		return BPy_NonTVertex_from_NonTVertex(dynamic_cast<NonTVertex&>(if0D));
 | 
			
		||||
	} else if (typeid(if0D) == typeid(TVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if0D) == typeid(TVertex)) {
 | 
			
		||||
		return BPy_TVertex_from_TVertex(dynamic_cast<TVertex&>(if0D));
 | 
			
		||||
	} else if (typeid(if0D) == typeid(Interface0D)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if0D) == typeid(Interface0D)) {
 | 
			
		||||
		return BPy_Interface0D_from_Interface0D(if0D);
 | 
			
		||||
	}
 | 
			
		||||
	string msg("unexpected type: " + if0D.getExactTypeName());
 | 
			
		||||
@@ -134,20 +144,27 @@ PyObject * Any_BPy_Interface0D_from_Interface0D( Interface0D& if0D ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * Any_BPy_Interface1D_from_Interface1D( Interface1D& if1D ) {
 | 
			
		||||
PyObject *Any_BPy_Interface1D_from_Interface1D(Interface1D& if1D)
 | 
			
		||||
{
 | 
			
		||||
	if (typeid(if1D) == typeid(ViewEdge)) {
 | 
			
		||||
		return BPy_ViewEdge_from_ViewEdge(dynamic_cast<ViewEdge&>(if1D));
 | 
			
		||||
	} else if (typeid(if1D) == typeid(Chain)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if1D) == typeid(Chain)) {
 | 
			
		||||
		return BPy_Chain_from_Chain(dynamic_cast<Chain&>(if1D));
 | 
			
		||||
	} else if (typeid(if1D) == typeid(Stroke)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if1D) == typeid(Stroke)) {
 | 
			
		||||
		return BPy_Stroke_from_Stroke(dynamic_cast<Stroke&>(if1D));
 | 
			
		||||
	} else if (typeid(if1D) == typeid(FEdgeSharp)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if1D) == typeid(FEdgeSharp)) {
 | 
			
		||||
		return BPy_FEdgeSharp_from_FEdgeSharp(dynamic_cast<FEdgeSharp&>(if1D));
 | 
			
		||||
	} else if (typeid(if1D) == typeid(FEdgeSmooth)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if1D) == typeid(FEdgeSmooth)) {
 | 
			
		||||
		return BPy_FEdgeSmooth_from_FEdgeSmooth(dynamic_cast<FEdgeSmooth&>(if1D));
 | 
			
		||||
	} else if (typeid(if1D) == typeid(FEdge)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if1D) == typeid(FEdge)) {
 | 
			
		||||
		return BPy_FEdge_from_FEdge(dynamic_cast<FEdge&>(if1D));
 | 
			
		||||
	} else if (typeid(if1D) == typeid(Interface1D)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(if1D) == typeid(Interface1D)) {
 | 
			
		||||
		return BPy_Interface1D_from_Interface1D(if1D);
 | 
			
		||||
	}
 | 
			
		||||
	string msg("unexpected type: " + if1D.getExactTypeName());
 | 
			
		||||
@@ -155,12 +172,15 @@ PyObject * Any_BPy_Interface1D_from_Interface1D( Interface1D& if1D ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * Any_BPy_FEdge_from_FEdge( FEdge& fe ) {
 | 
			
		||||
PyObject *Any_BPy_FEdge_from_FEdge(FEdge& fe)
 | 
			
		||||
{
 | 
			
		||||
	if (typeid(fe) == typeid(FEdgeSharp)) {
 | 
			
		||||
		return BPy_FEdgeSharp_from_FEdgeSharp(dynamic_cast<FEdgeSharp&>(fe));
 | 
			
		||||
	} else if (typeid(fe) == typeid(FEdgeSmooth)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(fe) == typeid(FEdgeSmooth)) {
 | 
			
		||||
		return BPy_FEdgeSmooth_from_FEdgeSmooth(dynamic_cast<FEdgeSmooth&>(fe));
 | 
			
		||||
	} else if (typeid(fe) == typeid(FEdge)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(fe) == typeid(FEdge)) {
 | 
			
		||||
		return BPy_FEdge_from_FEdge(fe);
 | 
			
		||||
	}
 | 
			
		||||
	string msg("unexpected type: " + fe.getExactTypeName());
 | 
			
		||||
@@ -168,12 +188,15 @@ PyObject * Any_BPy_FEdge_from_FEdge( FEdge& fe ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * Any_BPy_ViewVertex_from_ViewVertex( ViewVertex& vv ) {
 | 
			
		||||
PyObject *Any_BPy_ViewVertex_from_ViewVertex(ViewVertex& vv)
 | 
			
		||||
{
 | 
			
		||||
	if (typeid(vv) == typeid(NonTVertex)) {
 | 
			
		||||
		return BPy_NonTVertex_from_NonTVertex(dynamic_cast<NonTVertex&>(vv));
 | 
			
		||||
	} else if (typeid(vv) == typeid(TVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(vv) == typeid(TVertex)) {
 | 
			
		||||
		return BPy_TVertex_from_TVertex(dynamic_cast<TVertex&>(vv));
 | 
			
		||||
	} else if (typeid(vv) == typeid(ViewVertex)) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (typeid(vv) == typeid(ViewVertex)) {
 | 
			
		||||
		return BPy_ViewVertex_from_ViewVertex(vv);
 | 
			
		||||
	}
 | 
			
		||||
	string msg("unexpected type: " + vv.getExactTypeName());
 | 
			
		||||
@@ -181,154 +204,152 @@ PyObject * Any_BPy_ViewVertex_from_ViewVertex( ViewVertex& vv ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ) {
 | 
			
		||||
PyObject *BPy_Interface0D_from_Interface0D(Interface0D& if0D)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_if0D =  Interface0D_Type.tp_new(&Interface0D_Type, 0, 0);
 | 
			
		||||
	((BPy_Interface0D *)py_if0D)->if0D = &if0D;
 | 
			
		||||
	((BPy_Interface0D *)py_if0D)->borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_if0D;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ) {
 | 
			
		||||
PyObject *BPy_Interface1D_from_Interface1D(Interface1D& if1D)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_if1D =  Interface1D_Type.tp_new(&Interface1D_Type, 0, 0);
 | 
			
		||||
	((BPy_Interface1D *)py_if1D)->if1D = &if1D;
 | 
			
		||||
	((BPy_Interface1D *)py_if1D)->borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_if1D;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_SVertex_from_SVertex( SVertex& sv ) {
 | 
			
		||||
PyObject *BPy_SVertex_from_SVertex(SVertex& sv)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_sv = SVertex_Type.tp_new(&SVertex_Type, 0, 0);
 | 
			
		||||
	((BPy_SVertex *)py_sv)->sv = &sv;
 | 
			
		||||
	((BPy_SVertex *)py_sv)->py_if0D.if0D = ((BPy_SVertex *)py_sv)->sv;
 | 
			
		||||
	((BPy_SVertex *)py_sv)->py_if0D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_sv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_FEdgeSharp_from_FEdgeSharp( FEdgeSharp& fes ) {
 | 
			
		||||
PyObject *BPy_FEdgeSharp_from_FEdgeSharp(FEdgeSharp& fes)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_fe = FEdgeSharp_Type.tp_new(&FEdgeSharp_Type, 0, 0);
 | 
			
		||||
	((BPy_FEdgeSharp *)py_fe)->fes = &fes;
 | 
			
		||||
	((BPy_FEdgeSharp *)py_fe)->py_fe.fe = ((BPy_FEdgeSharp *)py_fe)->fes;
 | 
			
		||||
	((BPy_FEdgeSharp *)py_fe)->py_fe.py_if1D.if1D = ((BPy_FEdgeSharp *)py_fe)->fes;
 | 
			
		||||
	((BPy_FEdgeSharp *)py_fe)->py_fe.py_if1D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_fe;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_FEdgeSmooth_from_FEdgeSmooth( FEdgeSmooth& fes ) {
 | 
			
		||||
PyObject *BPy_FEdgeSmooth_from_FEdgeSmooth(FEdgeSmooth& fes)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_fe = FEdgeSmooth_Type.tp_new(&FEdgeSmooth_Type, 0, 0);
 | 
			
		||||
	((BPy_FEdgeSmooth *)py_fe)->fes = &fes;
 | 
			
		||||
	((BPy_FEdgeSmooth *)py_fe)->py_fe.fe = ((BPy_FEdgeSmooth *)py_fe)->fes;
 | 
			
		||||
	((BPy_FEdgeSmooth *)py_fe)->py_fe.py_if1D.if1D = ((BPy_FEdgeSmooth *)py_fe)->fes;
 | 
			
		||||
	((BPy_FEdgeSmooth *)py_fe)->py_fe.py_if1D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_fe;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_FEdge_from_FEdge( FEdge& fe ) {
 | 
			
		||||
PyObject *BPy_FEdge_from_FEdge(FEdge& fe)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_fe = FEdge_Type.tp_new(&FEdge_Type, 0, 0);
 | 
			
		||||
	((BPy_FEdge *)py_fe)->fe = &fe;
 | 
			
		||||
	((BPy_FEdge *)py_fe)->py_if1D.if1D = ((BPy_FEdge *)py_fe)->fe;
 | 
			
		||||
	((BPy_FEdge *)py_fe)->py_if1D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_fe;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Nature_from_Nature( unsigned short n ) {
 | 
			
		||||
	PyObject *py_n;
 | 
			
		||||
 | 
			
		||||
PyObject *BPy_Nature_from_Nature(unsigned short n)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *args = PyTuple_New(1);
 | 
			
		||||
	PyTuple_SET_ITEM(args, 0, PyLong_FromLong(n));
 | 
			
		||||
	py_n =  Nature_Type.tp_new(&Nature_Type, args, NULL);
 | 
			
		||||
	PyObject *py_n =  Nature_Type.tp_new(&Nature_Type, args, NULL);
 | 
			
		||||
	Py_DECREF(args);
 | 
			
		||||
 | 
			
		||||
	return py_n;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Stroke_from_Stroke( Stroke& s ) {
 | 
			
		||||
PyObject *BPy_Stroke_from_Stroke(Stroke& s)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_s = Stroke_Type.tp_new(&Stroke_Type, 0, 0);
 | 
			
		||||
	((BPy_Stroke *)py_s)->s = &s;
 | 
			
		||||
	((BPy_Stroke *)py_s)->py_if1D.if1D = ((BPy_Stroke *)py_s)->s;
 | 
			
		||||
	((BPy_Stroke *)py_s)->py_if1D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_s;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ) {
 | 
			
		||||
PyObject *BPy_StrokeAttribute_from_StrokeAttribute(StrokeAttribute& sa)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_sa = StrokeAttribute_Type.tp_new(&StrokeAttribute_Type, 0, 0);
 | 
			
		||||
	((BPy_StrokeAttribute *)py_sa)->sa = &sa;
 | 
			
		||||
	((BPy_StrokeAttribute *)py_sa)->borrowed = 1;
 | 
			
		||||
	return py_sa;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_MediumType_from_MediumType( Stroke::MediumType n ) {
 | 
			
		||||
	PyObject *py_mt;
 | 
			
		||||
 | 
			
		||||
PyObject *BPy_MediumType_from_MediumType(Stroke::MediumType n)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *args = PyTuple_New(1);
 | 
			
		||||
	PyTuple_SET_ITEM(args, 0, PyLong_FromLong(n));
 | 
			
		||||
	py_mt = MediumType_Type.tp_new( &MediumType_Type, args, NULL );
 | 
			
		||||
	PyObject *py_mt = MediumType_Type.tp_new(&MediumType_Type, args, NULL);
 | 
			
		||||
	Py_DECREF(args);
 | 
			
		||||
 | 
			
		||||
	return py_mt;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ) {
 | 
			
		||||
PyObject *BPy_StrokeVertex_from_StrokeVertex(StrokeVertex& sv)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_sv = StrokeVertex_Type.tp_new(&StrokeVertex_Type, 0, 0);
 | 
			
		||||
	((BPy_StrokeVertex *)py_sv)->sv = &sv;
 | 
			
		||||
	((BPy_StrokeVertex *)py_sv)->py_cp.cp = ((BPy_StrokeVertex *)py_sv)->sv;
 | 
			
		||||
	((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.if0D = ((BPy_StrokeVertex *)py_sv)->sv;
 | 
			
		||||
	((BPy_StrokeVertex *)py_sv)->py_cp.py_if0D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_sv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_ViewVertex_from_ViewVertex( ViewVertex& vv ) {
 | 
			
		||||
PyObject *BPy_ViewVertex_from_ViewVertex(ViewVertex& vv)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_vv = ViewVertex_Type.tp_new(&ViewVertex_Type, 0, 0);
 | 
			
		||||
	((BPy_ViewVertex *)py_vv)->vv = &vv;
 | 
			
		||||
	((BPy_ViewVertex *)py_vv)->py_if0D.if0D = ((BPy_ViewVertex *)py_vv)->vv;
 | 
			
		||||
	((BPy_ViewVertex *)py_vv)->py_if0D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_vv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_NonTVertex_from_NonTVertex( NonTVertex& ntv ) {
 | 
			
		||||
PyObject *BPy_NonTVertex_from_NonTVertex(NonTVertex& ntv)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_ntv = NonTVertex_Type.tp_new(&NonTVertex_Type, 0, 0);
 | 
			
		||||
	((BPy_NonTVertex *)py_ntv)->ntv = &ntv;
 | 
			
		||||
	((BPy_NonTVertex *)py_ntv)->py_vv.vv = ((BPy_NonTVertex *)py_ntv)->ntv;
 | 
			
		||||
	((BPy_NonTVertex *)py_ntv)->py_vv.py_if0D.if0D = ((BPy_NonTVertex *)py_ntv)->ntv;
 | 
			
		||||
	((BPy_NonTVertex *)py_ntv)->py_vv.py_if0D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_ntv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_TVertex_from_TVertex( TVertex& tv ) {
 | 
			
		||||
PyObject *BPy_TVertex_from_TVertex(TVertex& tv)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_tv = TVertex_Type.tp_new(&TVertex_Type, 0, 0);
 | 
			
		||||
	((BPy_TVertex *)py_tv)->tv = &tv;
 | 
			
		||||
	((BPy_TVertex *)py_tv)->py_vv.vv = ((BPy_TVertex *)py_tv)->tv;
 | 
			
		||||
	((BPy_TVertex *)py_tv)->py_vv.py_if0D.if0D = ((BPy_TVertex *)py_tv)->tv;
 | 
			
		||||
	((BPy_TVertex *)py_tv)->py_vv.py_if0D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_tv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_BBox_from_BBox(const BBox< Vec3r > &bb) {
 | 
			
		||||
PyObject *BPy_BBox_from_BBox(const BBox< Vec3r > &bb)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_bb = BBox_Type.tp_new(&BBox_Type, 0, 0);
 | 
			
		||||
	((BPy_BBox *)py_bb)->bb = new BBox< Vec3r >(bb);
 | 
			
		||||
 | 
			
		||||
	return py_bb;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ) {
 | 
			
		||||
PyObject *BPy_ViewEdge_from_ViewEdge(ViewEdge& ve)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_ve = ViewEdge_Type.tp_new(&ViewEdge_Type, 0, 0);
 | 
			
		||||
	((BPy_ViewEdge *)py_ve)->ve = &ve;
 | 
			
		||||
	((BPy_ViewEdge *)py_ve)->py_if1D.if1D = ((BPy_ViewEdge *)py_ve)->ve;
 | 
			
		||||
	((BPy_ViewEdge *)py_ve)->py_if1D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_ve;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Chain_from_Chain( Chain& c ) {
 | 
			
		||||
PyObject *BPy_Chain_from_Chain(Chain& c)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_c = Chain_Type.tp_new(&Chain_Type, 0, 0);
 | 
			
		||||
	((BPy_Chain *)py_c)->c = &c;
 | 
			
		||||
	((BPy_Chain *)py_c)->py_c.c = ((BPy_Chain *)py_c)->c;
 | 
			
		||||
@@ -337,56 +358,53 @@ PyObject * BPy_Chain_from_Chain( Chain& c ) {
 | 
			
		||||
	return py_c;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_SShape_from_SShape( SShape& ss ) {
 | 
			
		||||
PyObject *BPy_SShape_from_SShape(SShape& ss)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_ss = SShape_Type.tp_new(&SShape_Type, 0, 0);
 | 
			
		||||
	((BPy_SShape *)py_ss)->ss = &ss;
 | 
			
		||||
	((BPy_SShape *)py_ss)->borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_ss;	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) {
 | 
			
		||||
PyObject *BPy_ViewShape_from_ViewShape(ViewShape& vs)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_vs = ViewShape_Type.tp_new(&ViewShape_Type, 0, 0);
 | 
			
		||||
	((BPy_ViewShape *)py_vs)->vs = &vs;
 | 
			
		||||
	((BPy_ViewShape *)py_vs)->borrowed = 1;
 | 
			
		||||
	((BPy_ViewShape *)py_vs)->py_ss = NULL;
 | 
			
		||||
 | 
			
		||||
	return py_vs;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial& m) {
 | 
			
		||||
PyObject *BPy_FrsMaterial_from_FrsMaterial(const FrsMaterial& m)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_m = FrsMaterial_Type.tp_new(&FrsMaterial_Type, 0, 0);
 | 
			
		||||
	((BPy_FrsMaterial*) py_m)->m = new FrsMaterial(m);
 | 
			
		||||
 | 
			
		||||
	return py_m;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_IntegrationType_from_IntegrationType( IntegrationType i ) {
 | 
			
		||||
	PyObject *py_it;
 | 
			
		||||
 | 
			
		||||
PyObject *BPy_IntegrationType_from_IntegrationType(IntegrationType i)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *args = PyTuple_New(1);
 | 
			
		||||
	PyTuple_SET_ITEM(args, 0, PyLong_FromLong(i));
 | 
			
		||||
	py_it = IntegrationType_Type.tp_new( &IntegrationType_Type, args, NULL );
 | 
			
		||||
	PyObject *py_it = IntegrationType_Type.tp_new(&IntegrationType_Type, args, NULL);
 | 
			
		||||
	Py_DECREF(args);
 | 
			
		||||
 | 
			
		||||
	return py_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ) {
 | 
			
		||||
PyObject *BPy_CurvePoint_from_CurvePoint(CurvePoint& cp)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_cp = CurvePoint_Type.tp_new(&CurvePoint_Type, 0, 0);
 | 
			
		||||
	((BPy_CurvePoint*) py_cp)->cp = &cp;
 | 
			
		||||
	((BPy_CurvePoint*) py_cp)->py_if0D.if0D = ((BPy_CurvePoint*) py_cp)->cp;
 | 
			
		||||
	((BPy_CurvePoint*) py_cp)->py_if0D.borrowed = 1;
 | 
			
		||||
 | 
			
		||||
	return py_cp;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ) {
 | 
			
		||||
PyObject *BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdge& dve)
 | 
			
		||||
{
 | 
			
		||||
	PyObject *py_dve = PyTuple_New(2);
 | 
			
		||||
	
 | 
			
		||||
	PyTuple_SET_ITEM(py_dve, 0, BPy_ViewEdge_from_ViewEdge(*(dve.first)));
 | 
			
		||||
	PyTuple_SET_ITEM(py_dve, 1, PyBool_from_bool(dve.second));
 | 
			
		||||
	
 | 
			
		||||
	return py_dve;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -394,112 +412,115 @@ PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewE
 | 
			
		||||
// Iterators
 | 
			
		||||
//==============================
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it ) {
 | 
			
		||||
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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it, int reversed ) {
 | 
			
		||||
PyObject *BPy_Interface0DIterator_from_Interface0DIterator(Interface0DIterator& if0D_it, int reversed)
 | 
			
		||||
{
 | 
			
		||||
	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;
 | 
			
		||||
	((BPy_Interface0DIterator *)py_if0D_it)->reversed = reversed;
 | 
			
		||||
 | 
			
		||||
	return py_if0D_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_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)->py_it.it = ((BPy_CurvePointIterator *)py_cp_it)->cp_it;
 | 
			
		||||
 | 
			
		||||
	return py_cp_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it, int reversed) {
 | 
			
		||||
PyObject *BPy_StrokeVertexIterator_from_StrokeVertexIterator(StrokeInternal::StrokeVertexIterator& sv_it, int reversed)
 | 
			
		||||
{
 | 
			
		||||
	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)->py_it.it = ((BPy_StrokeVertexIterator *)py_sv_it)->sv_it;
 | 
			
		||||
	((BPy_StrokeVertexIterator *)py_sv_it)->reversed = reversed;
 | 
			
		||||
 | 
			
		||||
	return py_sv_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& 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)->py_it.it = ((BPy_SVertexIterator *)py_sv_it)->sv_it;
 | 
			
		||||
	
 | 
			
		||||
	return py_sv_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it, int reversed ) {
 | 
			
		||||
PyObject *BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator& ove_it, int reversed)
 | 
			
		||||
{
 | 
			
		||||
	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;
 | 
			
		||||
	((BPy_orientedViewEdgeIterator *)py_ove_it)->reversed = reversed;
 | 
			
		||||
	
 | 
			
		||||
	return py_ove_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_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)->py_it.it =	((BPy_ViewEdgeIterator *)py_ve_it)->ve_it;
 | 
			
		||||
	
 | 
			
		||||
	return py_ve_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_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)->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 *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)->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 *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)->py_c_it.py_ve_it.py_it.it = ((BPy_ChainSilhouetteIterator *)py_cs_it)->cs_it;
 | 
			
		||||
 | 
			
		||||
	return py_cs_it;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//==============================
 | 
			
		||||
// Python => C++
 | 
			
		||||
//==============================
 | 
			
		||||
 | 
			
		||||
bool bool_from_PyBool( PyObject *b ) {
 | 
			
		||||
bool bool_from_PyBool(PyObject *b)
 | 
			
		||||
{
 | 
			
		||||
	return PyObject_IsTrue(b) != 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) {
 | 
			
		||||
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	return static_cast<IntegrationType>(PyLong_AsLong(obj));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) {
 | 
			
		||||
Stroke::MediumType MediumType_from_BPy_MediumType(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	return static_cast<Stroke::MediumType>(PyLong_AsLong(obj));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Nature::EdgeNature EdgeNature_from_BPy_Nature( PyObject* obj ) {
 | 
			
		||||
Nature::EdgeNature EdgeNature_from_BPy_Nature(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	return static_cast<Nature::EdgeNature>(PyLong_AsLong(obj));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec2f * Vec2f_ptr_from_PyObject( PyObject* obj ) {
 | 
			
		||||
Vec2f * Vec2f_ptr_from_PyObject(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	Vec2f *v;
 | 
			
		||||
	if ((v = Vec2f_ptr_from_Vector(obj)))
 | 
			
		||||
		return v;
 | 
			
		||||
@@ -510,7 +531,8 @@ Vec2f * Vec2f_ptr_from_PyObject( PyObject* obj ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3f * Vec3f_ptr_from_PyObject( PyObject* obj ) {
 | 
			
		||||
Vec3f * Vec3f_ptr_from_PyObject(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	Vec3f *v;
 | 
			
		||||
	if ((v = Vec3f_ptr_from_Vector(obj)))
 | 
			
		||||
		return v;
 | 
			
		||||
@@ -523,7 +545,8 @@ Vec3f * Vec3f_ptr_from_PyObject( PyObject* obj ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3r * Vec3r_ptr_from_PyObject( PyObject* obj ) {
 | 
			
		||||
Vec3r * Vec3r_ptr_from_PyObject(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	Vec3r *v;
 | 
			
		||||
	if ((v = Vec3r_ptr_from_Vector(obj)))
 | 
			
		||||
		return v;
 | 
			
		||||
@@ -536,7 +559,8 @@ Vec3r * Vec3r_ptr_from_PyObject( PyObject* obj ) {
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec2f * Vec2f_ptr_from_Vector( PyObject* obj ) {
 | 
			
		||||
Vec2f * Vec2f_ptr_from_Vector(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 2)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = ((VectorObject *)obj)->vec[0];
 | 
			
		||||
@@ -544,7 +568,8 @@ Vec2f * Vec2f_ptr_from_Vector( PyObject* obj ) {
 | 
			
		||||
	return new Vec2f(x, y);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3f * Vec3f_ptr_from_Vector( PyObject* obj ) {
 | 
			
		||||
Vec3f * Vec3f_ptr_from_Vector(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = ((VectorObject *)obj)->vec[0];
 | 
			
		||||
@@ -553,7 +578,8 @@ Vec3f * Vec3f_ptr_from_Vector( PyObject* obj ) {
 | 
			
		||||
	return new Vec3f(x,y,z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ) {
 | 
			
		||||
Vec3r * Vec3r_ptr_from_Vector(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!VectorObject_Check(obj) || ((VectorObject *)obj)->size != 3)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	real x = ((VectorObject *)obj)->vec[0];
 | 
			
		||||
@@ -562,7 +588,8 @@ Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ) {
 | 
			
		||||
	return new Vec3r(x,y,z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3f * Vec3f_ptr_from_Color( PyObject* obj ) {
 | 
			
		||||
Vec3f * Vec3f_ptr_from_Color(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!ColorObject_Check(obj))
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float r = ((ColorObject *)obj)->col[0];
 | 
			
		||||
@@ -571,7 +598,8 @@ Vec3f * Vec3f_ptr_from_Color( PyObject* obj ) {
 | 
			
		||||
	return new Vec3f(r,g,b);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3r * Vec3r_ptr_from_Color( PyObject* obj ) {
 | 
			
		||||
Vec3r * Vec3r_ptr_from_Color(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!ColorObject_Check(obj))
 | 
			
		||||
		return NULL;
 | 
			
		||||
	real r = ((ColorObject *)obj)->col[0];
 | 
			
		||||
@@ -580,7 +608,8 @@ Vec3r * Vec3r_ptr_from_Color( PyObject* obj ) {
 | 
			
		||||
	return new Vec3r(r,g,b);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec2f * Vec2f_ptr_from_PyList( PyObject* obj ) {
 | 
			
		||||
Vec2f * Vec2f_ptr_from_PyList(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!PyList_Check(obj) || PyList_Size(obj) != 2)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = PyFloat_AsDouble(PyList_GetItem(obj, 0));
 | 
			
		||||
@@ -588,7 +617,8 @@ Vec2f * Vec2f_ptr_from_PyList( PyObject* obj ) {
 | 
			
		||||
	return new Vec2f(x,y);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3f * Vec3f_ptr_from_PyList( PyObject* obj ) {
 | 
			
		||||
Vec3f * Vec3f_ptr_from_PyList(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!PyList_Check(obj) || PyList_Size(obj) != 3)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = PyFloat_AsDouble(PyList_GetItem(obj, 0));
 | 
			
		||||
@@ -597,7 +627,8 @@ Vec3f * Vec3f_ptr_from_PyList( PyObject* obj ) {
 | 
			
		||||
	return new Vec3f(x,y,z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3r * Vec3r_ptr_from_PyList( PyObject* obj ) {
 | 
			
		||||
Vec3r * Vec3r_ptr_from_PyList(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!PyList_Check(obj) || PyList_Size(obj) != 3)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = PyFloat_AsDouble(PyList_GetItem(obj, 0));
 | 
			
		||||
@@ -606,7 +637,8 @@ Vec3r * Vec3r_ptr_from_PyList( PyObject* obj ) {
 | 
			
		||||
	return new Vec3r(x,y,z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec2f * Vec2f_ptr_from_PyTuple( PyObject* obj ) {
 | 
			
		||||
Vec2f * Vec2f_ptr_from_PyTuple(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 2)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = PyFloat_AsDouble(PyTuple_GetItem(obj, 0));
 | 
			
		||||
@@ -614,7 +646,8 @@ Vec2f * Vec2f_ptr_from_PyTuple( PyObject* obj ) {
 | 
			
		||||
	return new Vec2f(x,y);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3f * Vec3f_ptr_from_PyTuple( PyObject* obj ) {
 | 
			
		||||
Vec3f * Vec3f_ptr_from_PyTuple(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 3)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = PyFloat_AsDouble(PyTuple_GetItem(obj, 0));
 | 
			
		||||
@@ -623,7 +656,8 @@ Vec3f * Vec3f_ptr_from_PyTuple( PyObject* obj ) {
 | 
			
		||||
	return new Vec3f(x,y,z);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Vec3r * Vec3r_ptr_from_PyTuple( PyObject* obj ) {
 | 
			
		||||
Vec3r * Vec3r_ptr_from_PyTuple(PyObject* obj)
 | 
			
		||||
{
 | 
			
		||||
	if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 3)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	float x = PyFloat_AsDouble(PyTuple_GetItem(obj, 0));
 | 
			
		||||
@@ -639,19 +673,21 @@ int float_array_from_PyObject(PyObject *obj, float *v, int n)
 | 
			
		||||
	if (VectorObject_Check(obj) && ((VectorObject *)obj)->size == n) {
 | 
			
		||||
		for (int i = 0; i < n; i++)
 | 
			
		||||
			v[i] = ((VectorObject *)obj)->vec[i];
 | 
			
		||||
	} else if (PyList_Check(obj) && PyList_Size(obj) == n) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (PyList_Check(obj) && PyList_Size(obj) == n) {
 | 
			
		||||
		for (int i = 0; i < n; i++)
 | 
			
		||||
			v[i] = PyFloat_AsDouble(PyList_GetItem(obj, i));
 | 
			
		||||
	} else if (PyTuple_Check(obj) && PyTuple_Size(obj) == n) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (PyTuple_Check(obj) && PyTuple_Size(obj) == n) {
 | 
			
		||||
		for (int i = 0; i < n; i++)
 | 
			
		||||
			v[i] = PyFloat_AsDouble(PyTuple_GetItem(obj, i));
 | 
			
		||||
	} else {
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
	return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
///////////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
 
 | 
			
		||||
@@ -139,11 +139,6 @@ static PyObject * FrsMaterial_repr(BPy_FrsMaterial* self)
 | 
			
		||||
	return PyUnicode_FromFormat("Material - address: %p", self->m);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*----------------------FrsMaterial instance definitions ----------------------------*/
 | 
			
		||||
static PyMethodDef BPy_FrsMaterial_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------mathutils callbacks ----------------------------*/
 | 
			
		||||
 | 
			
		||||
/* subtype */
 | 
			
		||||
@@ -441,7 +436,7 @@ PyTypeObject FrsMaterial_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_FrsMaterial_methods,        /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_FrsMaterial_getseters,      /* tp_getset */
 | 
			
		||||
	0,                              /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -129,14 +129,9 @@ static PyObject * Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid)
 | 
			
		||||
			return PyBool_from_bool(!(o1->id->operator<(*(o2->id))));
 | 
			
		||||
			break;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_Id_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------Id get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(Id_first_doc,
 | 
			
		||||
@@ -217,7 +212,7 @@ PyTypeObject Id_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_Id_methods,                 /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_Id_getseters,               /* tp_getset */
 | 
			
		||||
	0,                              /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,6 @@
 | 
			
		||||
#include "UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h"
 | 
			
		||||
#include "UnaryFunction0D/BPy_UnaryFunction0DViewShape.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -65,6 +65,7 @@ int UnaryFunction1D_Init(PyObject *module)
 | 
			
		||||
	UnaryFunction1DVec3f_Init(module);
 | 
			
		||||
	UnaryFunction1DVectorViewShape_Init(module);
 | 
			
		||||
	UnaryFunction1DVoid_Init(module);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -67,9 +67,9 @@
 | 
			
		||||
#include "UnaryFunction1D/BPy_UnaryFunction1DVec3f.h"
 | 
			
		||||
#include "UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// BinaryPredicate0D: __call__
 | 
			
		||||
int Director_BPy_BinaryPredicate0D___call__( BinaryPredicate0D *bp0D, Interface0D& i1, Interface0D& i2 ) {
 | 
			
		||||
int Director_BPy_BinaryPredicate0D___call__(BinaryPredicate0D *bp0D, Interface0D& i1, Interface0D& i2)
 | 
			
		||||
{
 | 
			
		||||
	if (!bp0D->py_bp0D) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_bp0D) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -94,9 +94,9 @@ int Director_BPy_BinaryPredicate0D___call__( BinaryPredicate0D *bp0D, Interface0
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// BinaryPredicate1D: __call__
 | 
			
		||||
int Director_BPy_BinaryPredicate1D___call__( BinaryPredicate1D *bp1D, Interface1D& i1, Interface1D& i2 ) {
 | 
			
		||||
int Director_BPy_BinaryPredicate1D___call__(BinaryPredicate1D *bp1D, Interface1D& i1, Interface1D& i2)
 | 
			
		||||
{
 | 
			
		||||
	if (!bp1D->py_bp1D) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_bp1D) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -121,9 +121,9 @@ int Director_BPy_BinaryPredicate1D___call__( BinaryPredicate1D *bp1D, Interface1
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// UnaryPredicate0D: __call__
 | 
			
		||||
int Director_BPy_UnaryPredicate0D___call__( UnaryPredicate0D *up0D, Interface0DIterator& if0D_it ) {
 | 
			
		||||
int Director_BPy_UnaryPredicate0D___call__(UnaryPredicate0D *up0D, Interface0DIterator& if0D_it)
 | 
			
		||||
{
 | 
			
		||||
	if (!up0D->py_up0D) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_up0D) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -143,9 +143,9 @@ int Director_BPy_UnaryPredicate0D___call__( UnaryPredicate0D *up0D, Interface0DI
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// UnaryPredicate1D: __call__
 | 
			
		||||
int Director_BPy_UnaryPredicate1D___call__( UnaryPredicate1D *up1D, Interface1D& if1D ) {
 | 
			
		||||
int Director_BPy_UnaryPredicate1D___call__(UnaryPredicate1D *up1D, Interface1D& if1D)
 | 
			
		||||
{
 | 
			
		||||
	if (!up1D->py_up1D) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_up1D) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -165,9 +165,9 @@ int Director_BPy_UnaryPredicate1D___call__( UnaryPredicate1D *up1D, Interface1D&
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// StrokeShader: shade
 | 
			
		||||
int Director_BPy_StrokeShader_shade( StrokeShader *ss, Stroke& s ) {
 | 
			
		||||
int Director_BPy_StrokeShader_shade(StrokeShader *ss, Stroke& s)
 | 
			
		||||
{
 | 
			
		||||
	if (!ss->py_ss) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_ss) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -184,7 +184,8 @@ int Director_BPy_StrokeShader_shade( StrokeShader *ss, Stroke& s ) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ChainingIterator: init, traverse
 | 
			
		||||
int Director_BPy_ChainingIterator_init( ChainingIterator *c_it ) {
 | 
			
		||||
int Director_BPy_ChainingIterator_init(ChainingIterator *c_it)
 | 
			
		||||
{
 | 
			
		||||
	if (!c_it->py_c_it) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_c_it) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -196,7 +197,8 @@ int Director_BPy_ChainingIterator_init( ChainingIterator *c_it ) {
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int Director_BPy_ChainingIterator_traverse( ChainingIterator *c_it, AdjacencyIterator& a_it ) {
 | 
			
		||||
int Director_BPy_ChainingIterator_traverse(ChainingIterator *c_it, AdjacencyIterator& a_it)
 | 
			
		||||
{
 | 
			
		||||
	if (!c_it->py_c_it) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_c_it) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -221,10 +223,9 @@ int Director_BPy_ChainingIterator_traverse( ChainingIterator *c_it, AdjacencyIte
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
// BPy_UnaryFunction{0D,1D}: __call__
 | 
			
		||||
int Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0DIterator& if0D_it) {
 | 
			
		||||
 | 
			
		||||
int Director_BPy_UnaryFunction0D___call__(void *uf0D, PyObject *obj, Interface0DIterator& if0D_it)
 | 
			
		||||
{
 | 
			
		||||
	if (!obj) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_uf0D) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -236,55 +237,51 @@ int Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0
 | 
			
		||||
	Py_DECREF(arg);
 | 
			
		||||
	if (!result)
 | 
			
		||||
		return -1;
 | 
			
		||||
	
 | 
			
		||||
	if (BPy_UnaryFunction0DDouble_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<double> *)uf0D)->result = PyFloat_AsDouble(result);
 | 
			
		||||
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DEdgeNature_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DEdgeNature_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<Nature::EdgeNature> *)uf0D)->result = EdgeNature_from_BPy_Nature(result);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DFloat_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DFloat_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<float> *)uf0D)->result = PyFloat_AsDouble(result);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DId_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DId_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<Id> *)uf0D)->result = *(((BPy_Id *)result)->id);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DMaterial_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DMaterial_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<FrsMaterial> *)uf0D)->result = *(((BPy_FrsMaterial *)result)->m);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DUnsigned_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DUnsigned_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<unsigned> *)uf0D)->result = PyLong_AsLong(result);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DVec2f_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DVec2f_Check(obj)) {
 | 
			
		||||
		Vec2f *v = Vec2f_ptr_from_Vector(result);
 | 
			
		||||
		((UnaryFunction0D<Vec2f> *)uf0D)->result = *v;
 | 
			
		||||
		delete v; 
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DVec3f_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DVec3f_Check(obj)) {
 | 
			
		||||
		Vec3f *v = Vec3f_ptr_from_Vector(result);
 | 
			
		||||
		((UnaryFunction0D<Vec3f> *)uf0D)->result = *v;
 | 
			
		||||
		delete v;
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DVectorViewShape_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction0DVectorViewShape_Check(obj)) {
 | 
			
		||||
		vector<ViewShape*> vec;
 | 
			
		||||
		for(int i = 0; i < PyList_Size(result); i++) {
 | 
			
		||||
			ViewShape *b = ((BPy_ViewShape *)PyList_GetItem(result, i))->vs;
 | 
			
		||||
			vec.push_back(b);
 | 
			
		||||
		}
 | 
			
		||||
			
 | 
			
		||||
		((UnaryFunction0D< vector<ViewShape*> > *)uf0D)->result = vec;
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction0DViewShape_Check(obj) ) {
 | 
			
		||||
		((UnaryFunction0D<ViewShape*> *) uf0D)->result = ((BPy_ViewShape *) result)->vs;
 | 
			
		||||
	
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	else if (BPy_UnaryFunction0DViewShape_Check(obj)) {
 | 
			
		||||
		((UnaryFunction0D<ViewShape*> *)uf0D)->result = ((BPy_ViewShape *)result)->vs;
 | 
			
		||||
	}
 | 
			
		||||
	Py_DECREF(result);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1D& if1D) {
 | 
			
		||||
 | 
			
		||||
int Director_BPy_UnaryFunction1D___call__(void *uf1D, PyObject *obj, Interface1D& if1D)
 | 
			
		||||
{
 | 
			
		||||
	if (!obj) { // internal error
 | 
			
		||||
		PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_uf1D) not initialized");
 | 
			
		||||
		return -1;
 | 
			
		||||
@@ -296,40 +293,36 @@ int Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1
 | 
			
		||||
	Py_DECREF(arg);
 | 
			
		||||
	if (!result)
 | 
			
		||||
		return -1;
 | 
			
		||||
	
 | 
			
		||||
	if (BPy_UnaryFunction1DDouble_Check(obj)) {
 | 
			
		||||
		((UnaryFunction1D<double> *)uf1D)->result = PyFloat_AsDouble(result);
 | 
			
		||||
 | 
			
		||||
	} else if ( BPy_UnaryFunction1DEdgeNature_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction1DEdgeNature_Check(obj)) {
 | 
			
		||||
		((UnaryFunction1D<Nature::EdgeNature> *)uf1D)->result = EdgeNature_from_BPy_Nature(result);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction1DFloat_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction1DFloat_Check(obj)) {
 | 
			
		||||
		((UnaryFunction1D<float> *)uf1D)->result = PyFloat_AsDouble(result);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction1DUnsigned_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction1DUnsigned_Check(obj)) {
 | 
			
		||||
		((UnaryFunction1D<unsigned> *)uf1D)->result = PyLong_AsLong(result);
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction1DVec2f_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction1DVec2f_Check(obj)) {
 | 
			
		||||
		Vec2f *v = Vec2f_ptr_from_Vector(result);
 | 
			
		||||
		((UnaryFunction1D<Vec2f> *)uf1D)->result = *v;
 | 
			
		||||
		delete v; 
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction1DVec3f_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction1DVec3f_Check(obj)) {
 | 
			
		||||
		Vec3f *v = Vec3f_ptr_from_Vector(result);
 | 
			
		||||
		((UnaryFunction1D<Vec3f> *)uf1D)->result = *v;
 | 
			
		||||
		delete v;
 | 
			
		||||
	
 | 
			
		||||
	} else if ( BPy_UnaryFunction1DVectorViewShape_Check(obj) ) {
 | 
			
		||||
	}
 | 
			
		||||
	else if (BPy_UnaryFunction1DVectorViewShape_Check(obj)) {
 | 
			
		||||
		vector<ViewShape*> vec;
 | 
			
		||||
		for(int i = 1; i < PyList_Size(result); i++) {
 | 
			
		||||
			ViewShape *b = ((BPy_ViewShape *)PyList_GetItem(result, i))->vs;
 | 
			
		||||
			vec.push_back(b);
 | 
			
		||||
		}
 | 
			
		||||
			
 | 
			
		||||
		((UnaryFunction1D< vector<ViewShape*> > *)uf1D)->result = vec;
 | 
			
		||||
	
 | 
			
		||||
	} 
 | 
			
		||||
 | 
			
		||||
	Py_DECREF(result);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -29,8 +29,8 @@
 | 
			
		||||
 *  \ingroup freestyle
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef  __FREESTYLE_PYTHON_DIRECTOR
 | 
			
		||||
# define __FREESTYLE_PYTHON_DIRECTOR
 | 
			
		||||
#ifndef __FREESTYLE_PYTHON_DIRECTOR_H__
 | 
			
		||||
#define __FREESTYLE_PYTHON_DIRECTOR_H__
 | 
			
		||||
 | 
			
		||||
class UnaryPredicate0D;
 | 
			
		||||
class UnaryPredicate1D;
 | 
			
		||||
@@ -77,4 +77,4 @@ int Director_BPy_StrokeShader_shade(StrokeShader *ss, Stroke& s);
 | 
			
		||||
int Director_BPy_ChainingIterator_init(ChainingIterator *c_it);
 | 
			
		||||
int Director_BPy_ChainingIterator_traverse(ChainingIterator *c_it, AdjacencyIterator& a_it);
 | 
			
		||||
 | 
			
		||||
#endif // __FREESTYLE_PYTHON_DIRECTOR
 | 
			
		||||
#endif // __FREESTYLE_PYTHON_DIRECTOR_H__
 | 
			
		||||
 
 | 
			
		||||
@@ -137,10 +137,6 @@ static int CurvePoint_init(BPy_CurvePoint *self, PyObject *args, PyObject *kwds)
 | 
			
		||||
 | 
			
		||||
///bool 	operator== (const CurvePoint &b)
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_CurvePoint_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------CurvePoint get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(CurvePoint_first_svertex_doc,
 | 
			
		||||
@@ -259,7 +255,7 @@ PyTypeObject CurvePoint_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_CurvePoint_methods,         /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_CurvePoint_getseters,       /* tp_getset */
 | 
			
		||||
	&Interface0D_Type,              /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -107,7 +107,8 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
 | 
			
		||||
	if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &StrokeVertex_Type, &obj1)) {
 | 
			
		||||
		if (!obj1) {
 | 
			
		||||
			self->sv = new StrokeVertex();
 | 
			
		||||
		} else {
 | 
			
		||||
		}
 | 
			
		||||
		else {
 | 
			
		||||
			if (!((BPy_StrokeVertex *)obj1)->sv) {
 | 
			
		||||
				PyErr_SetString(PyExc_TypeError, "argument 1 is an invalid StrokeVertex object");
 | 
			
		||||
				return -1;
 | 
			
		||||
@@ -163,11 +164,6 @@ static int StrokeVertex_init(BPy_StrokeVertex *self, PyObject *args, PyObject *k
 | 
			
		||||
// real 	operator[] (const int i) const
 | 
			
		||||
// real & 	operator[] (const int i)
 | 
			
		||||
 | 
			
		||||
/*----------------------StrokeVertex instance definitions ----------------------------*/
 | 
			
		||||
static PyMethodDef BPy_StrokeVertex_methods[] = {	
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------mathutils callbacks ----------------------------*/
 | 
			
		||||
 | 
			
		||||
static int StrokeVertex_mathutils_check(BaseMathObject *bmo)
 | 
			
		||||
@@ -367,7 +363,7 @@ PyTypeObject StrokeVertex_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_StrokeVertex_methods,       /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_StrokeVertex_getseters,     /* tp_getset */
 | 
			
		||||
	&CurvePoint_Type,               /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -78,10 +78,6 @@ static int NonTVertex_init(BPy_NonTVertex *self, PyObject *args, PyObject *kwds)
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_NonTVertex_methods[] = {	
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------NonTVertex get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(NonTVertex_svertex_doc,
 | 
			
		||||
@@ -141,7 +137,7 @@ PyTypeObject NonTVertex_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_NonTVertex_methods,         /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_NonTVertex_getseters,       /* tp_getset */
 | 
			
		||||
	&ViewVertex_Type,               /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -105,10 +105,6 @@ static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds)
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_FEdge_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------FEdge sequence protocol ----------------------------*/
 | 
			
		||||
 | 
			
		||||
static Py_ssize_t FEdge_sq_length(BPy_FEdge *self)
 | 
			
		||||
@@ -365,7 +361,7 @@ PyTypeObject FEdge_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_FEdge_methods,              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_FEdge_getseters,            /* tp_getset */
 | 
			
		||||
	&Interface1D_Type,              /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -100,10 +100,6 @@ static int FEdgeSharp_init(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds)
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_FEdgeSharp_methods[] = {	
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------mathutils callbacks ----------------------------*/
 | 
			
		||||
 | 
			
		||||
/* subtype */
 | 
			
		||||
@@ -414,7 +410,7 @@ PyTypeObject FEdgeSharp_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_FEdgeSharp_methods,         /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_FEdgeSharp_getseters,       /* tp_getset */
 | 
			
		||||
	&FEdge_Type,                    /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -97,10 +97,6 @@ static int FEdgeSmooth_init(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwd
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_FEdgeSmooth_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------mathutils callbacks ----------------------------*/
 | 
			
		||||
 | 
			
		||||
static int FEdgeSmooth_mathutils_check(BaseMathObject *bmo)
 | 
			
		||||
@@ -269,7 +265,7 @@ PyTypeObject FEdgeSmooth_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_FEdgeSmooth_methods,        /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_FEdgeSmooth_getseters,      /* tp_getset */
 | 
			
		||||
	&FEdge_Type,                    /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -113,10 +113,6 @@ static PyObject * AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
 | 
			
		||||
	return BPy_ViewEdge_from_ViewEdge(*ve);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_AdjacencyIterator_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------AdjacencyIterator get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(AdjacencyIterator_object_doc,
 | 
			
		||||
@@ -129,7 +125,6 @@ static PyObject *AdjacencyIterator_object_get(BPy_AdjacencyIterator *self, void
 | 
			
		||||
	ViewEdge *ve = self->a_it->operator*();
 | 
			
		||||
	if (ve)
 | 
			
		||||
		return BPy_ViewEdge_from_ViewEdge(*ve);
 | 
			
		||||
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -180,7 +175,7 @@ PyTypeObject AdjacencyIterator_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	PyObject_SelfIter,              /* tp_iter */
 | 
			
		||||
	(iternextfunc)AdjacencyIterator_iternext, /* tp_iternext */
 | 
			
		||||
	BPy_AdjacencyIterator_methods,  /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_AdjacencyIterator_getseters, /* tp_getset */
 | 
			
		||||
	&Iterator_Type,                 /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -67,8 +67,7 @@ PyDoc_STRVAR(CurvePointIterator_doc,
 | 
			
		||||
"   :arg step: A resampling resolution with which the curve is resampled.\n"
 | 
			
		||||
"      If zero, no resampling is done (i.e., the iterator iterates over\n"
 | 
			
		||||
"      initial vertices).\n"
 | 
			
		||||
"   :type step: float\n"
 | 
			
		||||
);
 | 
			
		||||
"   :type step: float");
 | 
			
		||||
 | 
			
		||||
static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args, PyObject *kwds)
 | 
			
		||||
{
 | 
			
		||||
@@ -96,10 +95,6 @@ static int CurvePointIterator_init(BPy_CurvePointIterator *self, PyObject *args,
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_CurvePointIterator_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------CurvePointIterator get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(CurvePointIterator_object_doc,
 | 
			
		||||
@@ -169,7 +164,7 @@ PyTypeObject CurvePointIterator_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_CurvePointIterator_methods, /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_CurvePointIterator_getseters, /* tp_getset */
 | 
			
		||||
	&Iterator_Type,                 /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,8 @@ static PyObject * Interface0DIterator_iternext(BPy_Interface0DIterator *self)
 | 
			
		||||
		}
 | 
			
		||||
		self->if0D_it->decrement();
 | 
			
		||||
		if0D = self->if0D_it->operator->();
 | 
			
		||||
	} else {
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		if (self->if0D_it->isEnd()) {
 | 
			
		||||
			PyErr_SetNone(PyExc_StopIteration);
 | 
			
		||||
			return NULL;
 | 
			
		||||
@@ -120,10 +121,6 @@ static PyObject * Interface0DIterator_iternext(BPy_Interface0DIterator *self)
 | 
			
		||||
	return Any_BPy_Interface0D_from_Interface0D(*if0D);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_Interface0DIterator_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------Interface0DIterator get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(Interface0DIterator_object_doc,
 | 
			
		||||
@@ -193,7 +190,7 @@ PyTypeObject Interface0DIterator_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	PyObject_SelfIter,              /* tp_iter */
 | 
			
		||||
	(iternextfunc)Interface0DIterator_iternext, /* tp_iternext */
 | 
			
		||||
	BPy_Interface0DIterator_methods, /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_Interface0DIterator_getseters, /* tp_getset */
 | 
			
		||||
	&Iterator_Type,                 /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -113,10 +113,6 @@ static int SVertexIterator_init(BPy_SVertexIterator *self, PyObject *args, PyObj
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_SVertexIterator_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------SVertexIterator get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(SVertexIterator_object_doc,
 | 
			
		||||
@@ -127,10 +123,8 @@ PyDoc_STRVAR(SVertexIterator_object_doc,
 | 
			
		||||
static PyObject *SVertexIterator_object_get(BPy_SVertexIterator *self, void *UNUSED(closure))
 | 
			
		||||
{
 | 
			
		||||
	SVertex *sv = self->sv_it->operator->();
 | 
			
		||||
 | 
			
		||||
	if (sv)
 | 
			
		||||
		return BPy_SVertex_from_SVertex(*sv);
 | 
			
		||||
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -191,7 +185,7 @@ PyTypeObject SVertexIterator_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	0,                              /* tp_iter */
 | 
			
		||||
	0,                              /* tp_iternext */
 | 
			
		||||
	BPy_SVertexIterator_methods,    /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_SVertexIterator_getseters,  /* tp_getset */
 | 
			
		||||
	&Iterator_Type,                 /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -95,7 +95,8 @@ static PyObject * StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self)
 | 
			
		||||
		}
 | 
			
		||||
		self->sv_it->decrement();
 | 
			
		||||
		sv = self->sv_it->operator->();
 | 
			
		||||
	} else {
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		if (self->sv_it->isEnd()) {
 | 
			
		||||
			PyErr_SetNone(PyExc_StopIteration);
 | 
			
		||||
			return NULL;
 | 
			
		||||
@@ -106,10 +107,6 @@ static PyObject * StrokeVertexIterator_iternext(BPy_StrokeVertexIterator *self)
 | 
			
		||||
	return BPy_StrokeVertex_from_StrokeVertex(*sv);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_StrokeVertexIterator_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------StrokeVertexIterator get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(StrokeVertexIterator_object_doc,
 | 
			
		||||
@@ -121,11 +118,9 @@ static PyObject *StrokeVertexIterator_object_get(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);
 | 
			
		||||
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -186,7 +181,7 @@ PyTypeObject StrokeVertexIterator_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	PyObject_SelfIter,              /* tp_iter */
 | 
			
		||||
	(iternextfunc)StrokeVertexIterator_iternext, /* tp_iternext */
 | 
			
		||||
	BPy_StrokeVertexIterator_methods, /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_StrokeVertexIterator_getseters, /* tp_getset */
 | 
			
		||||
	&Iterator_Type,                 /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,6 @@
 | 
			
		||||
#include "../BPy_Convert.h"
 | 
			
		||||
#include "../Interface1D/BPy_ViewEdge.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
@@ -112,7 +111,6 @@ PyDoc_STRVAR(ViewEdgeIterator_change_orientation_doc,
 | 
			
		||||
static PyObject *ViewEdgeIterator_change_orientation(BPy_ViewEdgeIterator *self)
 | 
			
		||||
{
 | 
			
		||||
	self->ve_it->changeOrientation();
 | 
			
		||||
	
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -133,7 +131,6 @@ static PyObject *ViewEdgeIterator_object_get(BPy_ViewEdgeIterator *self, void *U
 | 
			
		||||
	ViewEdge *ve = self->ve_it->operator*();
 | 
			
		||||
	if (ve)
 | 
			
		||||
		return BPy_ViewEdge_from_ViewEdge(*ve);
 | 
			
		||||
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -147,7 +144,6 @@ static PyObject *ViewEdgeIterator_current_edge_get(BPy_ViewEdgeIterator *self, v
 | 
			
		||||
	ViewEdge *ve = self->ve_it->getCurrentEdge();
 | 
			
		||||
	if (ve)
 | 
			
		||||
		return BPy_ViewEdge_from_ViewEdge(*ve);
 | 
			
		||||
 | 
			
		||||
	Py_RETURN_NONE;}
 | 
			
		||||
 | 
			
		||||
static int ViewEdgeIterator_current_edge_set(BPy_ViewEdgeIterator *self, PyObject *value, void *UNUSED(closure))
 | 
			
		||||
@@ -194,7 +190,6 @@ static PyObject *ViewEdgeIterator_begin_get(BPy_ViewEdgeIterator *self, void *UN
 | 
			
		||||
	ViewEdge *ve = self->ve_it->getBegin();
 | 
			
		||||
	if (ve)
 | 
			
		||||
		return BPy_ViewEdge_from_ViewEdge(*ve);
 | 
			
		||||
 | 
			
		||||
	Py_RETURN_NONE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,8 @@ static PyObject * orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator
 | 
			
		||||
		}
 | 
			
		||||
		self->ove_it->decrement();
 | 
			
		||||
		dve = self->ove_it->operator->();
 | 
			
		||||
	} else {
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		if (self->ove_it->isEnd()) {
 | 
			
		||||
			PyErr_SetNone(PyExc_StopIteration);
 | 
			
		||||
			return NULL;
 | 
			
		||||
@@ -98,10 +99,6 @@ static PyObject * orientedViewEdgeIterator_iternext(BPy_orientedViewEdgeIterator
 | 
			
		||||
	return BPy_directedViewEdge_from_directedViewEdge(*dve);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyMethodDef BPy_orientedViewEdgeIterator_methods[] = {
 | 
			
		||||
	{NULL, NULL, 0, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*----------------------orientedViewEdgeIterator get/setters ----------------------------*/
 | 
			
		||||
 | 
			
		||||
PyDoc_STRVAR(orientedViewEdgeIterator_object_doc,
 | 
			
		||||
@@ -114,7 +111,6 @@ PyDoc_STRVAR(orientedViewEdgeIterator_object_doc,
 | 
			
		||||
static PyObject *orientedViewEdgeIterator_object_get(BPy_orientedViewEdgeIterator *self, void *UNUSED(closure))
 | 
			
		||||
{
 | 
			
		||||
	return BPy_directedViewEdge_from_directedViewEdge(self->ove_it->operator*());
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static PyGetSetDef BPy_orientedViewEdgeIterator_getseters[] = {
 | 
			
		||||
@@ -152,7 +148,7 @@ PyTypeObject orientedViewEdgeIterator_Type = {
 | 
			
		||||
	0,                              /* tp_weaklistoffset */
 | 
			
		||||
	PyObject_SelfIter,              /* tp_iter */
 | 
			
		||||
	(iternextfunc)orientedViewEdgeIterator_iternext, /* tp_iternext */
 | 
			
		||||
	BPy_orientedViewEdgeIterator_methods, /* tp_methods */
 | 
			
		||||
	0,                              /* tp_methods */
 | 
			
		||||
	0,                              /* tp_members */
 | 
			
		||||
	BPy_orientedViewEdgeIterator_getseters, /* tp_getset */
 | 
			
		||||
	&Iterator_Type,                 /* tp_base */
 | 
			
		||||
 
 | 
			
		||||
@@ -60,18 +60,18 @@ static char TextureAssignerShader___doc__[] =
 | 
			
		||||
"   texture and blending mode to use among a set of predefined\n"
 | 
			
		||||
"   textures.  Here are the different presets:\n"
 | 
			
		||||
"\n"
 | 
			
		||||
"   * 0: `/brushes/charcoalAlpha.bmp`, `MediumType.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 1: `/brushes/washbrushAlpha.bmp`, `MediumType.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 2: `/brushes/oil.bmp`, `MediumType.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 3: `/brushes/oilnoblend.bmp`, `MediumType.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 4: `/brushes/charcoalAlpha.bmp`, `MediumType.DRY_MEDIUM`\n"
 | 
			
		||||
"   * 5: `/brushes/washbrushAlpha.bmp`, `MediumType.DRY_MEDIUM`\n"
 | 
			
		||||
"   * 6: `/brushes/opaqueDryBrushAlpha.bmp`, `MediumType.OPAQUE_MEDIUM`\n"
 | 
			
		||||
"   * 7: `/brushes/opaqueBrushAlpha.bmp`, `MediumType.OPAQUE_MEDIUM`\n"
 | 
			
		||||
"   * 0: `/brushes/charcoalAlpha.bmp`, `Stroke.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 1: `/brushes/washbrushAlpha.bmp`, `Stroke.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 2: `/brushes/oil.bmp`, `Stroke.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 3: `/brushes/oilnoblend.bmp`, `Stroke.HUMID_MEDIUM`\n"
 | 
			
		||||
"   * 4: `/brushes/charcoalAlpha.bmp`, `Stroke.DRY_MEDIUM`\n"
 | 
			
		||||
"   * 5: `/brushes/washbrushAlpha.bmp`, `Stroke.DRY_MEDIUM`\n"
 | 
			
		||||
"   * 6: `/brushes/opaqueDryBrushAlpha.bmp`, `Stroke.OPAQUE_MEDIUM`\n"
 | 
			
		||||
"   * 7: `/brushes/opaqueBrushAlpha.bmp`, `Stroke.OPAQUE_MEDIUM`\n"
 | 
			
		||||
"\n"
 | 
			
		||||
"   Any other value will lead to the following preset:\n"
 | 
			
		||||
"\n"
 | 
			
		||||
"   * Default: `/brushes/smoothAlpha.bmp`, `MediumType.OPAQUE_MEDIUM`\n"
 | 
			
		||||
"   * Default: `/brushes/smoothAlpha.bmp`, `Stroke.OPAQUE_MEDIUM`\n"
 | 
			
		||||
"\n"
 | 
			
		||||
"   :arg stroke: A Stroke object.\n"
 | 
			
		||||
"   :type stroke: :class:`Stroke`\n";
 | 
			
		||||
 
 | 
			
		||||
@@ -45,8 +45,8 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
//-------------------MODULE INITIALIZATION--------------------------------
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DVec2f_Init(PyObject *module) {
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DVec2f_Init(PyObject *module)
 | 
			
		||||
{
 | 
			
		||||
	if (module == NULL)
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,8 +44,8 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
//-------------------MODULE INITIALIZATION--------------------------------
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DVec3f_Init(PyObject *module) {
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DVec3f_Init(PyObject *module)
 | 
			
		||||
{
 | 
			
		||||
	if (module == NULL)
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,8 +44,8 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
//-------------------MODULE INITIALIZATION--------------------------------
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DVectorViewShape_Init(PyObject *module) {
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DVectorViewShape_Init(PyObject *module)
 | 
			
		||||
{
 | 
			
		||||
	if (module == NULL)
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -45,8 +45,8 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
//-------------------MODULE INITIALIZATION--------------------------------
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DViewShape_Init(PyObject *module) {
 | 
			
		||||
 | 
			
		||||
int UnaryFunction0DViewShape_Init(PyObject *module)
 | 
			
		||||
{
 | 
			
		||||
	if (module == NULL)
 | 
			
		||||
		return -1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -50,7 +50,6 @@
 | 
			
		||||
#include "UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h"
 | 
			
		||||
#include "UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,6 @@ static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
 | 
			
		||||
	UnaryFunction1D_Type.tp_dealloc((PyObject*)self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
 | 
			
		||||
{
 | 
			
		||||
	return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec3f);
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,6 @@ static int DensityF1D___init__(BPy_DensityF1D* self, PyObject *args, PyObject *k
 | 
			
		||||
	IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
 | 
			
		||||
	self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d,t,f);
 | 
			
		||||
	return 0;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*-----------------------BPy_DensityF1D type definition ------------------------------*/
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,6 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D* self, PyObject *args,
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*-----------------------BPy_GetProjectedXF1D type definition ------------------------------*/
 | 
			
		||||
 | 
			
		||||
PyTypeObject GetProjectedXF1D_Type = {
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,6 @@ static int GetXF1D___init__(BPy_GetXF1D* self, PyObject *args, PyObject *kwds)
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*-----------------------BPy_GetXF1D type definition ------------------------------*/
 | 
			
		||||
 | 
			
		||||
PyTypeObject GetXF1D_Type = {
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,6 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D* self, PyObject *arg
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/
 | 
			
		||||
 | 
			
		||||
PyTypeObject ZDiscontinuityF1D_Type = {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user