Made the Freestyle Python API compatible with Python 3.
[blender.git] / source / blender / freestyle / intern / python / BPy_MediumType.cpp
1 #include "BPy_MediumType.h"
2
3 #include "BPy_Convert.h"
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 ///////////////////////////////////////////////////////////////////////////////////////////
10
11 /*-----------------------BPy_MediumType type definition ------------------------------*/
12
13 PyTypeObject MediumType_Type = {
14         PyObject_HEAD_INIT(NULL)
15         "MediumType",                   /* tp_name */
16         sizeof(PyLongObject),           /* tp_basicsize */
17         0,                              /* tp_itemsize */
18         0,                              /* tp_dealloc */
19         0,                              /* tp_print */
20         0,                              /* tp_getattr */
21         0,                              /* tp_setattr */
22         0,                              /* tp_reserved */
23         0,                              /* tp_repr */
24         0,                              /* tp_as_number */
25         0,                              /* tp_as_sequence */
26         0,                              /* tp_as_mapping */
27         0,                              /* tp_hash  */
28         0,                              /* tp_call */
29         0,                              /* tp_str */
30         0,                              /* tp_getattro */
31         0,                              /* tp_setattro */
32         0,                              /* tp_as_buffer */
33         Py_TPFLAGS_DEFAULT,             /* tp_flags */
34         "MediumType objects",           /* tp_doc */
35         0,                              /* tp_traverse */
36         0,                              /* tp_clear */
37         0,                              /* tp_richcompare */
38         0,                              /* tp_weaklistoffset */
39         0,                              /* tp_iter */
40         0,                              /* tp_iternext */
41         0,                              /* tp_methods */
42         0,                              /* tp_members */
43         0,                              /* tp_getset */
44         &PyLong_Type,                   /* tp_base */
45         0,                              /* tp_dict */
46         0,                              /* tp_descr_get */
47         0,                              /* tp_descr_set */
48         0,                              /* tp_dictoffset */
49         0,                              /* tp_init */
50         0,                              /* tp_alloc */
51         0,                              /* tp_new */
52 };
53
54 /*-----------------------BPy_IntegrationType instance definitions -------------------------*/
55
56 PyLongObject _BPy_MediumType_DRY_MEDIUM = {
57         PyVarObject_HEAD_INIT(&MediumType_Type, 1)
58         { Stroke::DRY_MEDIUM }
59 };
60 PyLongObject _BPy_MediumType_HUMID_MEDIUM = {
61         PyVarObject_HEAD_INIT(&MediumType_Type, 1)
62         { Stroke::HUMID_MEDIUM }
63 };
64 PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = {
65         PyVarObject_HEAD_INIT(&MediumType_Type, 1)
66         { Stroke::OPAQUE_MEDIUM }
67 };
68
69 //-------------------MODULE INITIALIZATION--------------------------------
70
71 int MediumType_Init( PyObject *module )
72 {       
73         if( module == NULL )
74                 return -1;
75
76         if( PyType_Ready( &MediumType_Type ) < 0 )
77                 return -1;
78         Py_INCREF( &MediumType_Type );
79         PyModule_AddObject(module, "MediumType", (PyObject *)&MediumType_Type);
80
81         return 0;
82 }
83
84 ///////////////////////////////////////////////////////////////////////////////////////////
85
86 #ifdef __cplusplus
87 }
88 #endif
89