Made the Freestyle Python API compatible with Python 3.
[blender.git] / source / blender / freestyle / intern / python / UnaryPredicate1D / BPy_QuantitativeInvisibilityUP1D.cpp
1 #include "BPy_QuantitativeInvisibilityUP1D.h"
2
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 ///////////////////////////////////////////////////////////////////////////////////////////
8
9 /*---------------  Python API function prototypes for QuantitativeInvisibilityUP1D instance  -----------*/
10 static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D* self, PyObject *args );
11
12 /*-----------------------BPy_QuantitativeInvisibilityUP1D type definition ------------------------------*/
13
14 PyTypeObject QuantitativeInvisibilityUP1D_Type = {
15         PyObject_HEAD_INIT(NULL)
16         "QuantitativeInvisibilityUP1D", /* tp_name */
17         sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */
18         0,                              /* tp_itemsize */
19         0,                              /* tp_dealloc */
20         0,                              /* tp_print */
21         0,                              /* tp_getattr */
22         0,                              /* tp_setattr */
23         0,                              /* tp_reserved */
24         0,                              /* tp_repr */
25         0,                              /* tp_as_number */
26         0,                              /* tp_as_sequence */
27         0,                              /* tp_as_mapping */
28         0,                              /* tp_hash  */
29         0,                              /* tp_call */
30         0,                              /* tp_str */
31         0,                              /* tp_getattro */
32         0,                              /* tp_setattro */
33         0,                              /* tp_as_buffer */
34         Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
35         "QuantitativeInvisibilityUP1D objects", /* tp_doc */
36         0,                              /* tp_traverse */
37         0,                              /* tp_clear */
38         0,                              /* tp_richcompare */
39         0,                              /* tp_weaklistoffset */
40         0,                              /* tp_iter */
41         0,                              /* tp_iternext */
42         0,                              /* tp_methods */
43         0,                              /* tp_members */
44         0,                              /* tp_getset */
45         &UnaryPredicate1D_Type,         /* tp_base */
46         0,                              /* tp_dict */
47         0,                              /* tp_descr_get */
48         0,                              /* tp_descr_set */
49         0,                              /* tp_dictoffset */
50         (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */
51         0,                              /* tp_alloc */
52         0,                              /* tp_new */
53 };
54
55 //------------------------INSTANCE METHODS ----------------------------------
56
57 int QuantitativeInvisibilityUP1D___init__( BPy_QuantitativeInvisibilityUP1D* self, PyObject *args )
58 {
59         int i = 0;
60
61         if( !PyArg_ParseTuple(args, "|i", &i) )
62                 return -1;
63         
64         self->py_up1D.up1D = new Predicates1D::QuantitativeInvisibilityUP1D(i);
65         return 0;
66 }
67
68 ///////////////////////////////////////////////////////////////////////////////////////////
69
70 #ifdef __cplusplus
71 }
72 #endif