56 PyModule_AddObjectRef(
87 PyModule_AddObjectRef(
93 PyModule_AddObjectRef(
module,
94 "ConstrainedIncreasingThicknessShader",
110 PyModule_AddObjectRef(
116 PyModule_AddObjectRef(
137 PyModule_AddObjectRef(
157 StrokeShader___doc__,
158 "Base class for stroke shaders. Any stroke shader must inherit from\n"
159 "this class and overload the shade() method. A StrokeShader is\n"
160 "designed to modify stroke attributes such as thickness, color,\n"
161 "geometry, texture, blending mode, and so on. The basic way for this\n"
162 "operation is to iterate over the stroke vertices of the :class:`Stroke`\n"
163 "and to modify the :class:`StrokeAttribute` of each vertex. Here is a\n"
164 "code example of such an iteration::\n"
166 " it = ioStroke.strokeVerticesBegin()\n"
167 " while not it.is_end:\n"
168 " att = it.object.attribute\n"
169 " ## perform here any attribute modification\n"
172 ".. method:: __init__()\n"
174 " Default constructor.\n");
178 static const char *kwlist[] = {
nullptr};
180 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
191 Py_TYPE(
self)->tp_free((PyObject *)
self);
196 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->ss);
201 StrokeShader_shade___doc__,
202 ".. method:: shade(stroke)\n"
204 " The shading method. Must be overloaded by inherited classes.\n"
206 " :arg stroke: A Stroke object.\n"
207 " :type stroke: :class:`Stroke`\n");
211 static const char *kwlist[] = {
"stroke",
nullptr};
212 PyObject *py_s =
nullptr;
214 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Stroke_Type, &py_s)) {
219 PyErr_SetString(PyExc_TypeError,
"shade method not properly overridden");
223 if (!PyErr_Occurred()) {
224 string class_name(Py_TYPE(
self)->tp_name);
225 PyErr_SetString(PyExc_RuntimeError, (class_name +
" shade method failed").c_str());
235 METH_VARARGS | METH_KEYWORDS,
236 StrokeShader_shade___doc__},
237 {
nullptr,
nullptr, 0,
nullptr},
244 StrokeShader_name_doc,
245 "The name of the stroke shader.\n"
251 return PyUnicode_FromString(Py_TYPE(
self)->tp_name);
256 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
262 PyVarObject_HEAD_INIT(
nullptr, 0)
281 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
282 StrokeShader___doc__,
PyTypeObject BackboneStretcherShader_Type
PyTypeObject BezierCurveShader_Type
PyTypeObject BlenderTextureShader_Type
PyTypeObject CalligraphicShader_Type
PyTypeObject ColorNoiseShader_Type
PyTypeObject ConstantColorShader_Type
PyTypeObject ConstantThicknessShader_Type
PyTypeObject ConstrainedIncreasingThicknessShader_Type
PyTypeObject GuidingLinesShader_Type
PyTypeObject IncreasingColorShader_Type
PyTypeObject IncreasingThicknessShader_Type
PyTypeObject PolygonalizationShader_Type
PyTypeObject SamplingShader_Type
PyTypeObject SmoothingShader_Type
PyTypeObject SpatialNoiseShader_Type
PyTypeObject StrokeShader_Type
static PyGetSetDef BPy_StrokeShader_getseters[]
static PyObject * StrokeShader___repr__(BPy_StrokeShader *self)
static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds)
static PyObject * StrokeShader_name_get(BPy_StrokeShader *self, void *)
static PyObject * StrokeShader_shade(BPy_StrokeShader *self, PyObject *args, PyObject *kwds)
static void StrokeShader___dealloc__(BPy_StrokeShader *self)
int StrokeShader_Init(PyObject *module)
PyDoc_STRVAR(StrokeShader___doc__, "Base class for stroke shaders. Any stroke shader must inherit from\n" "this class and overload the shade() method. A StrokeShader is\n" "designed to modify stroke attributes such as thickness, color,\n" "geometry, texture, blending mode, and so on. The basic way for this\n" "operation is to iterate over the stroke vertices of the :class:`Stroke`\n" "and to modify the :class:`StrokeAttribute` of each vertex. Here is a\n" "code example of such an iteration::\n" "\n" " it = ioStroke.strokeVerticesBegin()\n" " while not it.is_end:\n" " att = it.object.attribute\n" " ## perform here any attribute modification\n" " it.increment()\n" "\n" ".. method:: __init__()\n" "\n" " Default constructor.\n")
static PyMethodDef BPy_StrokeShader_methods[]
PyTypeObject StrokeTextureStepShader_Type
PyTypeObject ThicknessNoiseShader_Type
PyTypeObject TipRemoverShader_Type
static struct PyModuleDef module