40 if (module ==
nullptr) {
52 PyModule_AddObjectRef(
83 PyModule_AddObjectRef(
89 PyModule_AddObjectRef(module,
90 "ConstrainedIncreasingThicknessShader",
106 PyModule_AddObjectRef(
112 PyModule_AddObjectRef(
133 PyModule_AddObjectRef(
153 StrokeShader___doc__,
154 "Base class for stroke shaders. Any stroke shader must inherit from\n"
155 "this class and overload the shade() method. A StrokeShader is\n"
156 "designed to modify stroke attributes such as thickness, color,\n"
157 "geometry, texture, blending mode, and so on. The basic way for this\n"
158 "operation is to iterate over the stroke vertices of the :class:`Stroke`\n"
159 "and to modify the :class:`StrokeAttribute` of each vertex. Here is a\n"
160 "code example of such an iteration::\n"
162 " it = ioStroke.strokeVerticesBegin()\n"
163 " while not it.is_end:\n"
164 " att = it.object.attribute\n"
165 " ## perform here any attribute modification\n"
168 ".. method:: __init__()\n"
170 " Default constructor.\n");
173 static const char *kwlist[] = {
nullptr};
175 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"", (
char **)kwlist)) {
179 self->
ss->
py_ss = (PyObject *)self;
186 Py_TYPE(self)->tp_free((PyObject *)self);
191 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(self)->tp_name, self->
ss);
196 StrokeShader_shade___doc__,
197 ".. method:: shade(stroke)\n"
199 " The shading method. Must be overloaded by inherited classes.\n"
201 " :param stroke: A Stroke object.\n"
202 " :type stroke: :class:`Stroke`\n");
205 static const char *kwlist[] = {
"stroke",
nullptr};
206 PyObject *py_s =
nullptr;
208 if (!PyArg_ParseTupleAndKeywords(args,
220 PyErr_SetString(PyExc_TypeError,
"shade method not properly overridden");
224 if (!PyErr_Occurred()) {
225 string class_name(Py_TYPE(self)->tp_name);
226 PyErr_SetString(PyExc_RuntimeError, (class_name +
" shade method failed").c_str());
235# pragma clang diagnostic push
236# pragma clang diagnostic ignored "-Wcast-function-type"
238# pragma GCC diagnostic push
239# pragma GCC diagnostic ignored "-Wcast-function-type"
246 METH_VARARGS | METH_KEYWORDS,
247 StrokeShader_shade___doc__},
248 {
nullptr,
nullptr, 0,
nullptr},
253# pragma clang diagnostic pop
255# pragma GCC diagnostic pop
263 StrokeShader_name_doc,
264 "The name of the stroke shader.\n"
269 return PyUnicode_FromString(Py_TYPE(self)->tp_name);
274 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
280 PyVarObject_HEAD_INIT(
nullptr, 0)
299 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
300 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
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :param inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :param inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
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)
static PyMethodDef BPy_StrokeShader_methods[]
PyTypeObject StrokeTextureStepShader_Type
PyTypeObject ThicknessNoiseShader_Type
PyTypeObject TipRemoverShader_Type
virtual int shade(Stroke &ioStroke) const
PyObject_HEAD Freestyle::StrokeShader * ss