Blender  V2.93
BPy_MediumType.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "BPy_MediumType.h"
22 
23 #include "BPy_Convert.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 using namespace Freestyle;
30 
32 
33 /*-----------------------BPy_MediumType type definition ------------------------------*/
34 
35 PyDoc_STRVAR(MediumType_doc,
36  "Class hierarchy: int > :class:`MediumType`\n"
37  "\n"
38  "The different blending modes available to similate the interaction\n"
39  "media-medium:\n"
40  "\n"
41  "* Stroke.DRY_MEDIUM: To simulate a dry medium such as Pencil or Charcoal.\n"
42  "* Stroke.HUMID_MEDIUM: To simulate ink painting (color subtraction blending).\n"
43  "* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...).");
44 
45 PyTypeObject MediumType_Type = {
46  PyVarObject_HEAD_INIT(nullptr, 0) "MediumType", /* tp_name */
47  sizeof(PyLongObject), /* tp_basicsize */
48  0, /* tp_itemsize */
49  nullptr, /* tp_dealloc */
50  0, /* tp_vectorcall_offset */
51  nullptr, /* tp_getattr */
52  nullptr, /* tp_setattr */
53  nullptr, /* tp_reserved */
54  nullptr, /* tp_repr */
55  nullptr, /* tp_as_number */
56  nullptr, /* tp_as_sequence */
57  nullptr, /* tp_as_mapping */
58  nullptr, /* tp_hash */
59  nullptr, /* tp_call */
60  nullptr, /* tp_str */
61  nullptr, /* tp_getattro */
62  nullptr, /* tp_setattro */
63  nullptr, /* tp_as_buffer */
64  Py_TPFLAGS_DEFAULT, /* tp_flags */
65  MediumType_doc, /* tp_doc */
66  nullptr, /* tp_traverse */
67  nullptr, /* tp_clear */
68  nullptr, /* tp_richcompare */
69  0, /* tp_weaklistoffset */
70  nullptr, /* tp_iter */
71  nullptr, /* tp_iternext */
72  nullptr, /* tp_methods */
73  nullptr, /* tp_members */
74  nullptr, /* tp_getset */
75  &PyLong_Type, /* tp_base */
76  nullptr, /* tp_dict */
77  nullptr, /* tp_descr_get */
78  nullptr, /* tp_descr_set */
79  0, /* tp_dictoffset */
80  nullptr, /* tp_init */
81  nullptr, /* tp_alloc */
82  nullptr, /* tp_new */
83 };
84 
85 /*-----------------------BPy_IntegrationType instance definitions -------------------------*/
86 
88  PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::DRY_MEDIUM},
89 };
91  PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::HUMID_MEDIUM},
92 };
94  PyVarObject_HEAD_INIT(&MediumType_Type, 1){Stroke::OPAQUE_MEDIUM},
95 };
96 
97 //-------------------MODULE INITIALIZATION--------------------------------
98 
99 int MediumType_Init(PyObject *module)
100 {
101  if (module == nullptr) {
102  return -1;
103  }
104 
105  if (PyType_Ready(&MediumType_Type) < 0) {
106  return -1;
107  }
108  Py_INCREF(&MediumType_Type);
109  PyModule_AddObject(module, "MediumType", (PyObject *)&MediumType_Type);
110 
111  return 0;
112 }
113 
115 
116 #ifdef __cplusplus
117 }
118 #endif
PyLongObject _BPy_MediumType_DRY_MEDIUM
int MediumType_Init(PyObject *module)
PyLongObject _BPy_MediumType_OPAQUE_MEDIUM
PyTypeObject MediumType_Type
PyLongObject _BPy_MediumType_HUMID_MEDIUM
PyDoc_STRVAR(MediumType_doc, "Class hierarchy: int > :class:`MediumType`\n" "\n" "The different blending modes available to similate the interaction\n" "media-medium:\n" "\n" "* Stroke.DRY_MEDIUM: To simulate a dry medium such as Pencil or Charcoal.\n" "* Stroke.HUMID_MEDIUM: To simulate ink painting (color subtraction blending).\n" "* Stroke.OPAQUE_MEDIUM: To simulate an opaque medium (oil, spray...).")
static struct PyModuleDef module
inherits from class Rep
Definition: AppCanvas.cpp:32