Blender V4.3
BPy_UnaryFunction0D.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26using namespace Freestyle;
27
29
30//-------------------MODULE INITIALIZATION--------------------------------
55
56//------------------------INSTANCE METHODS ----------------------------------
57
59 /* Wrap. */
60 UnaryFunction0D___doc__,
61 "Base class for Unary Functions (functors) working on\n"
62 ":class:`Interface0DIterator`. A unary function will be used by\n"
63 "invoking __call__() on an Interface0DIterator. In Python, several\n"
64 "different subclasses of UnaryFunction0D are used depending on the\n"
65 "types of functors' return values. For example, you would inherit from\n"
66 "a :class:`UnaryFunction0DDouble` if you wish to define a function that\n"
67 "returns a double value. Available UnaryFunction0D subclasses are:\n"
68 "\n"
69 "* :class:`UnaryFunction0DDouble`\n"
70 "* :class:`UnaryFunction0DEdgeNature`\n"
71 "* :class:`UnaryFunction0DFloat`\n"
72 "* :class:`UnaryFunction0DId`\n"
73 "* :class:`UnaryFunction0DMaterial`\n"
74 "* :class:`UnaryFunction0DUnsigned`\n"
75 "* :class:`UnaryFunction0DVec2f`\n"
76 "* :class:`UnaryFunction0DVec3f`\n"
77 "* :class:`UnaryFunction0DVectorViewShape`\n"
78 "* :class:`UnaryFunction0DViewShape`\n");
79
81{
82 Py_TYPE(self)->tp_free((PyObject *)self);
83}
84
86{
87 return PyUnicode_FromString("UnaryFunction0D");
88}
89
90/*----------------------UnaryFunction0D get/setters ----------------------------*/
91
93 /* Wrap. */
94 UnaryFunction0D_name_doc,
95 "The name of the unary 0D function.\n"
96 "\n"
97 ":type: str");
98
99static PyObject *UnaryFunction0D_name_get(BPy_UnaryFunction0D *self, void * /*closure*/)
100{
101 return PyUnicode_FromString(Py_TYPE(self)->tp_name);
102}
103
104static PyGetSetDef BPy_UnaryFunction0D_getseters[] = {
105 {"name",
107 (setter) nullptr,
108 UnaryFunction0D_name_doc,
109 nullptr},
110 {nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
111};
112
113/*-----------------------BPy_UnaryFunction0D type definition ------------------------------*/
114
115PyTypeObject UnaryFunction0D_Type = {
116 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
117 /*tp_name*/ "UnaryFunction0D",
118 /*tp_basicsize*/ sizeof(BPy_UnaryFunction0D),
119 /*tp_itemsize*/ 0,
120 /*tp_dealloc*/ (destructor)UnaryFunction0D___dealloc__,
121 /*tp_vectorcall_offset*/ 0,
122 /*tp_getattr*/ nullptr,
123 /*tp_setattr*/ nullptr,
124 /*tp_as_async*/ nullptr,
125 /*tp_repr*/ (reprfunc)UnaryFunction0D___repr__,
126 /*tp_as_number*/ nullptr,
127 /*tp_as_sequence*/ nullptr,
128 /*tp_as_mapping*/ nullptr,
129 /*tp_hash*/ nullptr,
130 /*tp_call*/ nullptr,
131 /*tp_str*/ nullptr,
132 /*tp_getattro*/ nullptr,
133 /*tp_setattro*/ nullptr,
134 /*tp_as_buffer*/ nullptr,
135 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
136 /*tp_doc*/ UnaryFunction0D___doc__,
137 /*tp_traverse*/ nullptr,
138 /*tp_clear*/ nullptr,
139 /*tp_richcompare*/ nullptr,
140 /*tp_weaklistoffset*/ 0,
141 /*tp_iter*/ nullptr,
142 /*tp_iternext*/ nullptr,
143 /*tp_methods*/ nullptr,
144 /*tp_members*/ nullptr,
145 /*tp_getset*/ BPy_UnaryFunction0D_getseters,
146 /*tp_base*/ nullptr,
147 /*tp_dict*/ nullptr,
148 /*tp_descr_get*/ nullptr,
149 /*tp_descr_set*/ nullptr,
150 /*tp_dictoffset*/ 0,
151 /*tp_init*/ nullptr,
152 /*tp_alloc*/ nullptr,
153 /*tp_new*/ PyType_GenericNew,
154};
155
157
158#ifdef __cplusplus
159}
160#endif
int UnaryFunction0DDouble_Init(PyObject *module)
int UnaryFunction0DEdgeNature_Init(PyObject *module)
int UnaryFunction0DFloat_Init(PyObject *module)
int UnaryFunction0DId_Init(PyObject *module)
int UnaryFunction0DMaterial_Init(PyObject *module)
int UnaryFunction0DUnsigned_Init(PyObject *module)
int UnaryFunction0DVec2f_Init(PyObject *module)
int UnaryFunction0DVec3f_Init(PyObject *module)
int UnaryFunction0DVectorViewShape_Init(PyObject *module)
int UnaryFunction0DViewShape_Init(PyObject *module)
PyTypeObject UnaryFunction0D_Type
PyDoc_STRVAR(UnaryFunction0D___doc__, "Base class for Unary Functions (functors) working on\n" ":class:`Interface0DIterator`. A unary function will be used by\n" "invoking __call__() on an Interface0DIterator. In Python, several\n" "different subclasses of UnaryFunction0D are used depending on the\n" "types of functors' return values. For example, you would inherit from\n" "a :class:`UnaryFunction0DDouble` if you wish to define a function that\n" "returns a double value. Available UnaryFunction0D subclasses are:\n" "\n" "* :class:`UnaryFunction0DDouble`\n" "* :class:`UnaryFunction0DEdgeNature`\n" "* :class:`UnaryFunction0DFloat`\n" "* :class:`UnaryFunction0DId`\n" "* :class:`UnaryFunction0DMaterial`\n" "* :class:`UnaryFunction0DUnsigned`\n" "* :class:`UnaryFunction0DVec2f`\n" "* :class:`UnaryFunction0DVec3f`\n" "* :class:`UnaryFunction0DVectorViewShape`\n" "* :class:`UnaryFunction0DViewShape`\n")
static PyGetSetDef BPy_UnaryFunction0D_getseters[]
static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self)
static PyObject * UnaryFunction0D___repr__(BPy_UnaryFunction0D *)
static PyObject * UnaryFunction0D_name_get(BPy_UnaryFunction0D *self, void *)
int UnaryFunction0D_Init(PyObject *module)
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20
static struct PyModuleDef module
Definition python.cpp:991