From e4677c409dcad94e96b2ae765422f91e0b0dd9fd Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 28 Jul 2008 22:53:42 +0000 Subject: soc-2008-mxcurioni: add all predicate subclasses( BinaryPredicate1D, UnaryPredicate{0D,1D} ). There is just one more class remaining to port (and probably the most important): Operators. After that, I'll be able to test whether Freestyle functions well without SWIG. --- .../intern/python/BPy_BinaryPredicate1D.cpp | 34 +++++- .../freestyle/intern/python/BPy_EdgeModifier.cpp | 0 .../intern/python/BPy_UnaryPredicate0D.cpp | 21 +++- .../intern/python/BPy_UnaryPredicate1D.cpp | 55 +++++++++ .../python/BinaryPredicate1D/BPy_FalseBP1D.cpp | 107 ++++++++++++++++-- .../python/BinaryPredicate1D/BPy_FalseBP1D.h | 29 +++++ .../python/BinaryPredicate1D/BPy_Length2DBP1D.cpp | 107 ++++++++++++++++-- .../python/BinaryPredicate1D/BPy_Length2DBP1D.h | 29 +++++ .../BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 107 ++++++++++++++++-- .../python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h | 29 +++++ .../python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 107 ++++++++++++++++-- .../intern/python/BinaryPredicate1D/BPy_TrueBP1D.h | 29 +++++ .../BPy_ViewMapGradientNormBP1D.cpp | 123 ++++++++++++++++++++- .../BPy_ViewMapGradientNormBP1D.h | 29 +++++ .../python/EdgeModifier/BPy_TimestampModifier.cpp | 0 .../python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 107 +++++++++++++++++- .../intern/python/UnaryPredicate0D/BPy_FalseUP0D.h | 29 +++++ .../python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 107 +++++++++++++++++- .../intern/python/UnaryPredicate0D/BPy_TrueUP0D.h | 29 +++++ .../python/UnaryPredicate1D/BPy_ContourUP1D.cpp | 107 ++++++++++++++++-- .../python/UnaryPredicate1D/BPy_ContourUP1D.h | 29 +++++ .../UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp | 116 ++++++++++++++++++- .../UnaryPredicate1D/BPy_DensityLowerThanUP1D.h | 29 +++++ .../BPy_EqualToChainingTimeStampUP1D.cpp | 114 ++++++++++++++++++- .../BPy_EqualToChainingTimeStampUP1D.h | 29 +++++ .../UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp | 114 ++++++++++++++++++- .../UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h | 29 +++++ .../UnaryPredicate1D/BPy_ExternalContourUP1D.cpp | 107 ++++++++++++++++-- .../UnaryPredicate1D/BPy_ExternalContourUP1D.h | 29 +++++ .../python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 107 +++++++++++++++++- .../intern/python/UnaryPredicate1D/BPy_FalseUP1D.h | 29 +++++ .../BPy_QuantitativeInvisibilityUP1D.cpp | 114 ++++++++++++++++++- .../BPy_QuantitativeInvisibilityUP1D.h | 29 +++++ .../python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 114 ++++++++++++++++++- .../intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h | 29 +++++ .../python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 107 +++++++++++++++++- .../intern/python/UnaryPredicate1D/BPy_TrueUP1D.h | 29 +++++ 37 files changed, 2242 insertions(+), 97 deletions(-) delete mode 100644 source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h delete mode 100644 source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h (limited to 'source/blender/freestyle/intern/python') diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 9dd2bd19204..545807fc277 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -3,6 +3,12 @@ #include "BPy_Convert.h" #include "BPy_Interface1D.h" +#include "BinaryPredicate1D/BPy_FalseBP1D.h" +#include "BinaryPredicate1D/BPy_Length2DBP1D.h" +#include "BinaryPredicate1D/BPy_SameShapeIdBP1D.h" +#include "BinaryPredicate1D/BPy_TrueBP1D.h" +#include "BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h" + #ifdef __cplusplus extern "C" { #endif @@ -116,9 +122,35 @@ PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ) if( PyType_Ready( &BinaryPredicate1D_Type ) < 0 ) return; - Py_INCREF( &BinaryPredicate1D_Type ); PyModule_AddObject(module, "BinaryPredicate1D", (PyObject *)&BinaryPredicate1D_Type); + + if( PyType_Ready( &FalseBP1D_Type ) < 0 ) + return; + Py_INCREF( &FalseBP1D_Type ); + PyModule_AddObject(module, "FalseBP1D", (PyObject *)&FalseBP1D_Type); + + if( PyType_Ready( &Length2DBP1D_Type ) < 0 ) + return; + Py_INCREF( &Length2DBP1D_Type ); + PyModule_AddObject(module, "Length2DBP1D", (PyObject *)&Length2DBP1D_Type); + + if( PyType_Ready( &SameShapeIdBP1D_Type ) < 0 ) + return; + Py_INCREF( &SameShapeIdBP1D_Type ); + PyModule_AddObject(module, "SameShapeIdBP1D", (PyObject *)&SameShapeIdBP1D_Type); + + if( PyType_Ready( &TrueBP1D_Type ) < 0 ) + return; + Py_INCREF( &TrueBP1D_Type ); + PyModule_AddObject(module, "TrueBP1D", (PyObject *)&TrueBP1D_Type); + + if( PyType_Ready( &ViewMapGradientNormBP1D_Type ) < 0 ) + return; + Py_INCREF( &ViewMapGradientNormBP1D_Type ); + PyModule_AddObject(module, "ViewMapGradientNormBP1D", (PyObject *)&ViewMapGradientNormBP1D_Type); + + } diff --git a/source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp b/source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 3e5168e7da1..4fef63eae9b 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -2,6 +2,8 @@ #include "BPy_Convert.h" #include "Iterator/BPy_Interface0DIterator.h" +#include "UnaryPredicate0D/BPy_FalseUP0D.h" +#include "UnaryPredicate0D/BPy_TrueUP0D.h" #ifdef __cplusplus extern "C" { @@ -14,13 +16,13 @@ static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D *self); static PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D *self); -static PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args); +static PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self ); static PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args); /*----------------------UnaryPredicate0D instance definitions ----------------------------*/ static PyMethodDef BPy_UnaryPredicate0D_methods[] = { - {"getName", ( PyCFunction ) UnaryPredicate0D_getName, METH_NOARGS, ""}, - {"__call__", ( PyCFunction ) UnaryPredicate0D___call__, METH_VARARGS, "" }, + {"getName", ( PyCFunction ) UnaryPredicate0D_getName, METH_NOARGS, "Returns the string of the name of the UnaryPredicate0D."}, + {"__call__", ( PyCFunction ) UnaryPredicate0D___call__, METH_VARARGS, "The () operator. Must be overload by inherited classes." }, {NULL, NULL, 0, NULL} }; @@ -119,6 +121,17 @@ PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ) return; Py_INCREF( &UnaryPredicate0D_Type ); PyModule_AddObject(module, "UnaryPredicate0D", (PyObject *)&UnaryPredicate0D_Type); + + if( PyType_Ready( &FalseUP0D_Type ) < 0 ) + return; + Py_INCREF( &FalseUP0D_Type ); + PyModule_AddObject(module, "FalseUP0D", (PyObject *)&FalseUP0D_Type); + + if( PyType_Ready( &TrueUP0D_Type ) < 0 ) + return; + Py_INCREF( &TrueUP0D_Type ); + PyModule_AddObject(module, "TrueUP0D", (PyObject *)&TrueUP0D_Type); + } //------------------------INSTANCE METHODS ---------------------------------- @@ -142,7 +155,7 @@ PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D* self) } -PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args) +PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self ) { return PyString_FromString( self->up0D->getName().c_str() ); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 54731d75d7b..a13de77bbe9 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -3,6 +3,16 @@ #include "BPy_Convert.h" #include "BPy_Interface1D.h" +#include "UnaryPredicate1D/BPy_ContourUP1D.h" +#include "UnaryPredicate1D/BPy_DensityLowerThanUP1D.h" +#include "UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h" +#include "UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h" +#include "UnaryPredicate1D/BPy_ExternalContourUP1D.h" +#include "UnaryPredicate1D/BPy_FalseUP1D.h" +#include "UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h" +#include "UnaryPredicate1D/BPy_ShapeUP1D.h" +#include "UnaryPredicate1D/BPy_TrueUP1D.h" + #ifdef __cplusplus extern "C" { #endif @@ -119,6 +129,51 @@ PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ) return; Py_INCREF( &UnaryPredicate1D_Type ); PyModule_AddObject(module, "UnaryPredicate1D", (PyObject *)&UnaryPredicate1D_Type); + + if( PyType_Ready( &ContourUP1D_Type ) < 0 ) + return; + Py_INCREF( &ContourUP1D_Type ); + PyModule_AddObject(module, "ContourUP1D", (PyObject *)&ContourUP1D_Type); + + if( PyType_Ready( &DensityLowerThanUP1D_Type ) < 0 ) + return; + Py_INCREF( &DensityLowerThanUP1D_Type ); + PyModule_AddObject(module, "DensityLowerThanUP1D", (PyObject *)&DensityLowerThanUP1D_Type); + + if( PyType_Ready( &EqualToChainingTimeStampUP1D_Type ) < 0 ) + return; + Py_INCREF( &EqualToChainingTimeStampUP1D_Type ); + PyModule_AddObject(module, "EqualToChainingTimeStampUP1D", (PyObject *)&EqualToChainingTimeStampUP1D_Type); + + if( PyType_Ready( &EqualToTimeStampUP1D_Type ) < 0 ) + return; + Py_INCREF( &EqualToTimeStampUP1D_Type ); + PyModule_AddObject(module, "EqualToTimeStampUP1D", (PyObject *)&EqualToTimeStampUP1D_Type); + + if( PyType_Ready( &ExternalContourUP1D_Type ) < 0 ) + return; + Py_INCREF( &ExternalContourUP1D_Type ); + PyModule_AddObject(module, "ExternalContourUP1D", (PyObject *)&ExternalContourUP1D_Type); + + if( PyType_Ready( &FalseUP1D_Type ) < 0 ) + return; + Py_INCREF( &FalseUP1D_Type ); + PyModule_AddObject(module, "FalseUP1D", (PyObject *)&FalseUP1D_Type); + + if( PyType_Ready( &QuantitativeInvisibilityUP1D_Type ) < 0 ) + return; + Py_INCREF( &QuantitativeInvisibilityUP1D_Type ); + PyModule_AddObject(module, "QuantitativeInvisibilityUP1D", (PyObject *)&QuantitativeInvisibilityUP1D_Type); + + if( PyType_Ready( &ShapeUP1D_Type ) < 0 ) + return; + Py_INCREF( &ShapeUP1D_Type ); + PyModule_AddObject(module, "ShapeUP1D", (PyObject *)&ShapeUP1D_Type); + + if( PyType_Ready( &TrueUP1D_Type ) < 0 ) + return; + Py_INCREF( &TrueUP1D_Type ); + PyModule_AddObject(module, "TrueUP1D", (PyObject *)&TrueUP1D_Type); } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 1f1a1ec840b..dc127051da7 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_FalseBP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_FalseBP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_FalseBP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for FalseBP1D instance -----------*/ + static int FalseBP1D___init__(BPy_FalseBP1D* self); - PyObject *_wrap_new_FalseBP1D(PyObject *self , PyObject *args) { -} +/*-----------------------BPy_FalseBP1D type definition ------------------------------*/ + +PyTypeObject FalseBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FalseBP1D", /* tp_name */ + sizeof( BPy_FalseBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_FalseBP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FalseBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FalseBP1D___init__( BPy_FalseBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::FalseBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h new file mode 100644 index 00000000000..7e090fc92d3 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_FALSEBP1D_H +#define FREESTYLE_PYTHON_FALSEBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FalseBP1D_Type; + +#define BPy_FalseBP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseBP1D_Type) + +/*---------------------------Python BPy_FalseBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_FalseBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FALSEBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 402e59c3f29..4c1e62dc4c1 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_Length2DBP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_Length2DBP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_Length2DBP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for Length2DBP1D instance -----------*/ + static int Length2DBP1D___init__(BPy_Length2DBP1D* self); - PyObject *_wrap_new_Length2DBP1D(PyObject *self , PyObject *args) { -} +/*-----------------------BPy_Length2DBP1D type definition ------------------------------*/ + +PyTypeObject Length2DBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Length2DBP1D", /* tp_name */ + sizeof( BPy_Length2DBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_Length2DBP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Length2DBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Length2DBP1D___init__( BPy_Length2DBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::Length2DBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h new file mode 100644 index 00000000000..e499067d05e --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_LENGTH2DBP1D_H +#define FREESTYLE_PYTHON_LENGTH2DBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Length2DBP1D_Type; + +#define BPy_Length2DBP1D_Check(v) (( (PyObject *) v)->ob_type == &Length2DBP1D_Type) + +/*---------------------------Python BPy_Length2DBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_Length2DBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_LENGTH2DBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index d980750bb33..82d047eba22 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_SameShapeIdBP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for SameShapeIdBP1D instance -----------*/ + static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D* self); - PyObject *_wrap_new_SameShapeIdBP1D(PyObject *self , PyObject *args) { -} +/*-----------------------BPy_SameShapeIdBP1D type definition ------------------------------*/ + +PyTypeObject SameShapeIdBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SameShapeIdBP1D", /* tp_name */ + sizeof( BPy_SameShapeIdBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SameShapeIdBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int SameShapeIdBP1D___init__( BPy_SameShapeIdBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::SameShapeIdBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h new file mode 100644 index 00000000000..31e47040bcb --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_SAMESHAPEIDBP1D_H +#define FREESTYLE_PYTHON_SAMESHAPEIDBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SameShapeIdBP1D_Type; + +#define BPy_SameShapeIdBP1D_Check(v) (( (PyObject *) v)->ob_type == &SameShapeIdBP1D_Type) + +/*---------------------------Python BPy_SameShapeIdBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_SameShapeIdBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SAMESHAPEIDBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index 2afd2e163ea..02bbc20e66c 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_TrueBP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_TrueBP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_TrueBP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for TrueBP1D instance -----------*/ + static int TrueBP1D___init__(BPy_TrueBP1D* self); - PyObject *_wrap_new_TrueBP1D(PyObject *self , PyObject *args) { -} +/*-----------------------BPy_TrueBP1D type definition ------------------------------*/ + +PyTypeObject TrueBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TrueBP1D", /* tp_name */ + sizeof( BPy_TrueBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_TrueBP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TrueBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TrueBP1D___init__( BPy_TrueBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::TrueBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h new file mode 100644 index 00000000000..a975fe0b662 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_TRUEBP1D_H +#define FREESTYLE_PYTHON_TRUEBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TrueBP1D_Type; + +#define BPy_TrueBP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueBP1D_Type) + +/*---------------------------Python BPy_TrueBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_TrueBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TRUEBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 873acd93149..c565daed2e2 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -1,12 +1,125 @@ - PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_ViewMapGradientNormBP1D.h" +#include "../BPy_Convert.h" +#include "../BPy_IntegrationType.h" - PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *self , PyObject *args) { -} +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewMapGradientNormBP1D instance -----------*/ + static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D* self, PyObject *args ); + +/*-----------------------BPy_ViewMapGradientNormBP1D type definition ------------------------------*/ + +PyTypeObject ViewMapGradientNormBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewMapGradientNormBP1D", /* tp_name */ + sizeof( BPy_ViewMapGradientNormBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewMapGradientNormBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +//ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0) + + +int ViewMapGradientNormBP1D___init__( BPy_ViewMapGradientNormBP1D* self, PyObject *args ) +{ + int i; + PyObject *obj; + float f = 2.0; + + if(!( PyArg_ParseTuple(args, "i|Of", &i, &obj) )) { + cout << "ERROR: ViewMapGradientNormBP1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_bp1D.bp1D = new Predicates1D::ViewMapGradientNormBP1D(i,t,f); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h new file mode 100644 index 00000000000..16fe71dee07 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_VIEWMAPGRADIENTNORMBP1D_H +#define FREESTYLE_PYTHON_VIEWMAPGRADIENTNORMBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewMapGradientNormBP1D_Type; + +#define BPy_ViewMapGradientNormBP1D_Check(v) (( (PyObject *) v)->ob_type == &ViewMapGradientNormBP1D_Type) + +/*---------------------------Python BPy_ViewMapGradientNormBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_ViewMapGradientNormBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWMAPGRADIENTNORMBP1D_H */ diff --git a/source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp b/source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index 53930660f3f..f4d48d4d36d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_FalseUP0D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_FalseUP0D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_FalseUP0D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FalseUP0D instance -----------*/ + static int FalseUP0D___init__(BPy_FalseUP0D* self); + +/*-----------------------BPy_FalseUP0D type definition ------------------------------*/ + +PyTypeObject FalseUP0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FalseUP0D", /* tp_name */ + sizeof( BPy_FalseUP0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ - PyObject *_wrap_delete_FalseUP0D(PyObject *self , PyObject *args) { + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FalseUP0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FalseUP0D___init__( BPy_FalseUP0D* self ) +{ + self->py_up0D.up0D = new Predicates0D::FalseUP0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h new file mode 100644 index 00000000000..1cc043791c3 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_FALSEUP0D_H +#define FREESTYLE_PYTHON_FALSEUP0D_H + +#include "../BPy_UnaryPredicate0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FalseUP0D_Type; + +#define BPy_FalseUP0D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP0D_Type) + +/*---------------------------Python BPy_FalseUP0D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate0D py_up0D; +} BPy_FalseUP0D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FALSEUP0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index 776e49b5d77..d0946157987 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_TrueUP0D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_TrueUP0D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_TrueUP0D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TrueUP0D instance -----------*/ + static int TrueUP0D___init__(BPy_TrueUP0D* self); + +/*-----------------------BPy_TrueUP0D type definition ------------------------------*/ + +PyTypeObject TrueUP0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TrueUP0D", /* tp_name */ + sizeof( BPy_TrueUP0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ - PyObject *_wrap_delete_TrueUP0D(PyObject *self , PyObject *args) { + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TrueUP0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TrueUP0D___init__( BPy_TrueUP0D* self ) +{ + self->py_up0D.up0D = new Predicates0D::TrueUP0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h new file mode 100644 index 00000000000..a05bff86a90 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_TRUEUP0D_H +#define FREESTYLE_PYTHON_TRUEUP0D_H + +#include "../BPy_UnaryPredicate0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TrueUP0D_Type; + +#define BPy_TrueUP0D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP0D_Type) + +/*---------------------------Python BPy_TrueUP0D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate0D py_up0D; +} BPy_TrueUP0D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TRUEUP0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 89ba9f3f683..347cf2f56ee 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_ContourUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_ContourUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_ContourUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for ContourUP1D instance -----------*/ + static int ContourUP1D___init__(BPy_ContourUP1D* self); - PyObject *_wrap_new_ContourUP1D(PyObject *self , PyObject *args) { -} +/*-----------------------BPy_ContourUP1D type definition ------------------------------*/ + +PyTypeObject ContourUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ContourUP1D", /* tp_name */ + sizeof( BPy_ContourUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_ContourUP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ContourUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ContourUP1D___init__( BPy_ContourUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::ContourUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h new file mode 100644 index 00000000000..30d71a0cd2c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_CONTOURUP1D_H +#define FREESTYLE_PYTHON_CONTOURUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ContourUP1D_Type; + +#define BPy_ContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ContourUP1D_Type) + +/*---------------------------Python BPy_ContourUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_ContourUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CONTOURUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index 664d73d59c1..04ee0903acd 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -1,12 +1,118 @@ - PyObject *_wrap_DensityLowerThanUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_DensityLowerThanUP1D.h" +#include "../../stroke/AdvancedPredicates1D.h" - PyObject *_wrap_DensityLowerThanUP1D___call__(PyObject *self , PyObject *args) { -} +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for DensityLowerThanUP1D instance -----------*/ + static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D* self, PyObject *args); + +/*-----------------------BPy_DensityLowerThanUP1D type definition ------------------------------*/ + +PyTypeObject DensityLowerThanUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "DensityLowerThanUP1D", /* tp_name */ + sizeof( BPy_DensityLowerThanUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ - PyObject *_wrap_delete_DensityLowerThanUP1D(PyObject *self , PyObject *args) { + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)DensityLowerThanUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int DensityLowerThanUP1D___init__( BPy_DensityLowerThanUP1D* self, PyObject *args ) +{ + double d1, d2 = 2.0; + + if( !PyArg_ParseTuple(args, "d|d", &d1, &d2) ) { + cout << "ERROR: DensityLowerThanUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::DensityLowerThanUP1D(d1,d2); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h new file mode 100644 index 00000000000..a6e6fdcd81f --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_DENSITYLOWERTHANUP1D_H +#define FREESTYLE_PYTHON_DENSITYLOWERTHANUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject DensityLowerThanUP1D_Type; + +#define BPy_DensityLowerThanUP1D_Check(v) (( (PyObject *) v)->ob_type == &DensityLowerThanUP1D_Type) + +/*---------------------------Python BPy_DensityLowerThanUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_DensityLowerThanUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_DENSITYLOWERTHANUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index 7cd9c17a99b..84ce5d39fab 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_EqualToChainingTimeStampUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_EqualToChainingTimeStampUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_EqualToChainingTimeStampUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for EqualToChainingTimeStampUP1D instance -----------*/ + static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1D* self, PyObject *args ); + +/*-----------------------BPy_EqualToChainingTimeStampUP1D type definition ------------------------------*/ + +PyTypeObject EqualToChainingTimeStampUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "EqualToChainingTimeStampUP1D", /* tp_name */ + sizeof( BPy_EqualToChainingTimeStampUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_EqualToChainingTimeStampUP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)EqualToChainingTimeStampUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int EqualToChainingTimeStampUP1D___init__( BPy_EqualToChainingTimeStampUP1D* self, PyObject *args ) +{ + unsigned u; + + if( !PyArg_ParseTuple(args, "I", &u) ) { + cout << "ERROR: EqualToChainingTimeStampUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::EqualToChainingTimeStampUP1D(u); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h new file mode 100644 index 00000000000..fa8d67d0ec6 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_EQUALTOCHAININGTIMESTAMPUP1D_H +#define FREESTYLE_PYTHON_EQUALTOCHAININGTIMESTAMPUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject EqualToChainingTimeStampUP1D_Type; + +#define BPy_EqualToChainingTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToChainingTimeStampUP1D_Type) + +/*---------------------------Python BPy_EqualToChainingTimeStampUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_EqualToChainingTimeStampUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_EQUALTOCHAININGTIMESTAMPUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index d6925dd2b44..2d248257893 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_EqualToTimeStampUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_EqualToTimeStampUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_EqualToTimeStampUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for EqualToTimeStampUP1D instance -----------*/ + static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D* self, PyObject *args ); + +/*-----------------------BPy_EqualToTimeStampUP1D type definition ------------------------------*/ + +PyTypeObject EqualToTimeStampUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "EqualToTimeStampUP1D", /* tp_name */ + sizeof( BPy_EqualToTimeStampUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_EqualToTimeStampUP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)EqualToTimeStampUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int EqualToTimeStampUP1D___init__( BPy_EqualToTimeStampUP1D* self, PyObject *args ) +{ + unsigned u; + + if( !PyArg_ParseTuple(args, "I", &u) ) { + cout << "ERROR: EqualToTimeStampUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::EqualToTimeStampUP1D(u); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h new file mode 100644 index 00000000000..6de9927d7ad --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_EQUALTOTIMESTAMPUP1D_H +#define FREESTYLE_PYTHON_EQUALTOTIMESTAMPUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject EqualToTimeStampUP1D_Type; + +#define BPy_EqualToTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToTimeStampUP1D_Type) + +/*---------------------------Python BPy_EqualToTimeStampUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_EqualToTimeStampUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_EQUALTOTIMESTAMPUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index 9107f0fe326..e3708d43a2c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_ExternalContourUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_ExternalContourUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_ExternalContourUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for ExternalContourUP1D instance -----------*/ + static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D* self); - PyObject *_wrap_new_ExternalContourUP1D(PyObject *self , PyObject *args) { -} +/*-----------------------BPy_ExternalContourUP1D type definition ------------------------------*/ + +PyTypeObject ExternalContourUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ExternalContourUP1D", /* tp_name */ + sizeof( BPy_ExternalContourUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_ExternalContourUP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ExternalContourUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ExternalContourUP1D___init__( BPy_ExternalContourUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::ExternalContourUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h new file mode 100644 index 00000000000..0d35f05bc7b --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_EXTERNALCONTOURUP1D_H +#define FREESTYLE_PYTHON_EXTERNALCONTOURUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ExternalContourUP1D_Type; + +#define BPy_ExternalContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ExternalContourUP1D_Type) + +/*---------------------------Python BPy_ExternalContourUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_ExternalContourUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_EXTERNALCONTOURUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index 6164463a3af..4ad54138002 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_FalseUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_FalseUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_FalseUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FalseUP1D instance -----------*/ + static int FalseUP1D___init__(BPy_FalseUP1D* self); + +/*-----------------------BPy_FalseUP1D type definition ------------------------------*/ + +PyTypeObject FalseUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FalseUP1D", /* tp_name */ + sizeof( BPy_FalseUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ - PyObject *_wrap_delete_FalseUP1D(PyObject *self , PyObject *args) { + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FalseUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FalseUP1D___init__( BPy_FalseUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::FalseUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h new file mode 100644 index 00000000000..c406a926526 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_FALSEUP1D_H +#define FREESTYLE_PYTHON_FALSEUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FalseUP1D_Type; + +#define BPy_FalseUP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP1D_Type) + +/*---------------------------Python BPy_FalseUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_FalseUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FALSEUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index fc538008446..000760b5b00 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_QuantitativeInvisibilityUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_QuantitativeInvisibilityUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_QuantitativeInvisibilityUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for QuantitativeInvisibilityUP1D instance -----------*/ + static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D* self, PyObject *args ); + +/*-----------------------BPy_QuantitativeInvisibilityUP1D type definition ------------------------------*/ + +PyTypeObject QuantitativeInvisibilityUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "QuantitativeInvisibilityUP1D", /* tp_name */ + sizeof( BPy_QuantitativeInvisibilityUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_QuantitativeInvisibilityUP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)QuantitativeInvisibilityUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int QuantitativeInvisibilityUP1D___init__( BPy_QuantitativeInvisibilityUP1D* self, PyObject *args ) +{ + int i = 0; + + if( !PyArg_ParseTuple(args, "|i", &i) ) { + cout << "ERROR: QuantitativeInvisibilityUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::QuantitativeInvisibilityUP1D(i); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h new file mode 100644 index 00000000000..676bfc00715 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYUP1D_H +#define FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject QuantitativeInvisibilityUP1D_Type; + +#define BPy_QuantitativeInvisibilityUP1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityUP1D_Type) + +/*---------------------------Python BPy_QuantitativeInvisibilityUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_QuantitativeInvisibilityUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index 4ec5cc13b3a..9e5312275bf 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_ShapeUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_ShapeUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_ShapeUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ShapeUP1D instance -----------*/ + static int ShapeUP1D___init__(BPy_ShapeUP1D* self, PyObject *args ); + +/*-----------------------BPy_ShapeUP1D type definition ------------------------------*/ + +PyTypeObject ShapeUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ShapeUP1D", /* tp_name */ + sizeof( BPy_ShapeUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - PyObject *_wrap_delete_ShapeUP1D(PyObject *self , PyObject *args) { + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ShapeUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ShapeUP1D___init__( BPy_ShapeUP1D* self, PyObject *args ) +{ + unsigned u1, u2 = 0; + + if( !PyArg_ParseTuple(args, "II", &u1, &u2) ) { + cout << "ERROR: ShapeUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::ShapeUP1D(u1,u2); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h new file mode 100644 index 00000000000..0da88d959bc --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_SHAPEUP1D_H +#define FREESTYLE_PYTHON_SHAPEUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ShapeUP1D_Type; + +#define BPy_ShapeUP1D_Check(v) (( (PyObject *) v)->ob_type == &ShapeUP1D_Type) + +/*---------------------------Python BPy_ShapeUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_ShapeUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SHAPEUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 7c8e0a6239d..a496a85f756 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_TrueUP1D_getName(PyObject *self , PyObject *args) { -} +#include "BPy_TrueUP1D.h" +#ifdef __cplusplus +extern "C" { +#endif - PyObject *_wrap_TrueUP1D___call__(PyObject *self , PyObject *args) { -} +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TrueUP1D instance -----------*/ + static int TrueUP1D___init__(BPy_TrueUP1D* self); + +/*-----------------------BPy_TrueUP1D type definition ------------------------------*/ + +PyTypeObject TrueUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TrueUP1D", /* tp_name */ + sizeof( BPy_TrueUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ - PyObject *_wrap_delete_TrueUP1D(PyObject *self , PyObject *args) { + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TrueUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TrueUP1D___init__( BPy_TrueUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::TrueUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h new file mode 100644 index 00000000000..b30b7232076 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_TRUEUP1D_H +#define FREESTYLE_PYTHON_TRUEUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TrueUP1D_Type; + +#define BPy_TrueUP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP1D_Type) + +/*---------------------------Python BPy_TrueUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_TrueUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TRUEUP1D_H */ -- cgit v1.2.3