99 "ConstrainedIncreasingThicknessShader",
169 "Base class for stroke shaders. Any stroke shader must inherit from\n"
170 "this class and overload the shade() method. A StrokeShader is\n"
171 "designed to modify stroke attributes such as thickness, color,\n"
172 "geometry, texture, blending mode, and so on. The basic way for this\n"
173 "operation is to iterate over the stroke vertices of the :class:`Stroke`\n"
174 "and to modify the :class:`StrokeAttribute` of each vertex. Here is a\n"
175 "code example of such an iteration::\n"
177 " it = ioStroke.strokeVerticesBegin()\n"
178 " while not it.is_end:\n"
179 " att = it.object.attribute\n"
180 " ## perform here any attribute modification\n"
183 ".. method:: __init__()\n"
185 " Default constructor.\n";
189 static const char *kwlist[] = {
nullptr};
191 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
195 self->ss->py_ss = (PyObject *)
self;
202 Py_TYPE(
self)->tp_free((PyObject *)
self);
207 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->ss);
211 ".. method:: shade(stroke)\n"
213 " The shading method. Must be overloaded by inherited classes.\n"
215 " :arg stroke: A Stroke object.\n"
216 " :type stroke: :class:`Stroke`\n";
220 static const char *kwlist[] = {
"stroke",
nullptr};
221 PyObject *py_s =
nullptr;
223 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Stroke_Type, &py_s)) {
228 PyErr_SetString(PyExc_TypeError,
"shade method not properly overridden");
232 if (!PyErr_Occurred()) {
233 string class_name(Py_TYPE(
self)->tp_name);
234 PyErr_SetString(PyExc_RuntimeError, (class_name +
" shade method failed").c_str());
244 METH_VARARGS | METH_KEYWORDS,
246 {
nullptr,
nullptr, 0,
nullptr},
252 "The name of the stroke shader.\n"
258 return PyUnicode_FromString(Py_TYPE(
self)->tp_name);
263 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
269 PyVarObject_HEAD_INIT(
nullptr, 0)
"StrokeShader",
287 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
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_shade(BPy_StrokeShader *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(StrokeShader_name_doc, "The name of the stroke shader.\n" "\n" ":type: str")
static PyObject * StrokeShader___repr__(BPy_StrokeShader *self)
static PyObject * StrokeShader_name_get(BPy_StrokeShader *self, void *UNUSED(closure))
static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds)
static char StrokeShader___doc__[]
static void StrokeShader___dealloc__(BPy_StrokeShader *self)
int StrokeShader_Init(PyObject *module)
static char StrokeShader_shade___doc__[]
static PyMethodDef BPy_StrokeShader_methods[]
PyTypeObject StrokeTextureStepShader_Type
PyTypeObject ThicknessNoiseShader_Type
PyTypeObject TipRemoverShader_Type
static struct PyModuleDef module