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