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