Blender V5.0
BPy_ColorNoiseShader.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
8
10
12
13using namespace Freestyle;
14
16
17//------------------------INSTANCE METHODS ----------------------------------
18
20 /* Wrap. */
21 ColorNoiseShader___doc__,
22 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`ColorNoiseShader`\n"
23 "\n"
24 "[Color shader]\n"
25 "\n"
26 ".. method:: __init__(amplitude, period)\n"
27 "\n"
28 " Builds a ColorNoiseShader object.\n"
29 "\n"
30 " :arg amplitude: The amplitude of the noise signal.\n"
31 " :type amplitude: float\n"
32 " :arg period: The period of the noise signal.\n"
33 " :type period: float\n"
34 "\n"
35 ".. method:: shade(stroke)\n"
36 "\n"
37 " Shader to add noise to the stroke colors.\n"
38 "\n"
39 " :arg stroke: A Stroke object.\n"
40 " :type stroke: :class:`freestyle.types.Stroke`\n");
41static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args, PyObject *kwds)
42{
43 static const char *kwlist[] = {"amplitude", "period", nullptr};
44 float f1, f2;
45
46 if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
47 return -1;
48 }
49 self->py_ss.ss = new StrokeShaders::ColorNoiseShader(f1, f2);
50 return 0;
51}
52
53/*-----------------------BPy_ColorNoiseShader type definition ------------------------------*/
54
55PyTypeObject ColorNoiseShader_Type = {
56 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
57 /*tp_name*/ "ColorNoiseShader",
58 /*tp_basicsize*/ sizeof(BPy_ColorNoiseShader),
59 /*tp_itemsize*/ 0,
60 /*tp_dealloc*/ nullptr,
61 /*tp_vectorcall_offset*/ 0,
62 /*tp_getattr*/ nullptr,
63 /*tp_setattr*/ nullptr,
64 /*tp_as_async*/ nullptr,
65 /*tp_repr*/ nullptr,
66 /*tp_as_number*/ nullptr,
67 /*tp_as_sequence*/ nullptr,
68 /*tp_as_mapping*/ nullptr,
69 /*tp_hash*/ nullptr,
70 /*tp_call*/ nullptr,
71 /*tp_str*/ nullptr,
72 /*tp_getattro*/ nullptr,
73 /*tp_setattro*/ nullptr,
74 /*tp_as_buffer*/ nullptr,
75 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
76 /*tp_doc*/ ColorNoiseShader___doc__,
77 /*tp_traverse*/ nullptr,
78 /*tp_clear*/ nullptr,
79 /*tp_richcompare*/ nullptr,
80 /*tp_weaklistoffset*/ 0,
81 /*tp_iter*/ nullptr,
82 /*tp_iternext*/ nullptr,
83 /*tp_methods*/ nullptr,
84 /*tp_members*/ nullptr,
85 /*tp_getset*/ nullptr,
86 /*tp_base*/ &StrokeShader_Type,
87 /*tp_dict*/ nullptr,
88 /*tp_descr_get*/ nullptr,
89 /*tp_descr_set*/ nullptr,
90 /*tp_dictoffset*/ 0,
91 /*tp_init*/ (initproc)ColorNoiseShader___init__,
92 /*tp_alloc*/ nullptr,
93 /*tp_new*/ nullptr,
94};
95
static int ColorNoiseShader___init__(BPy_ColorNoiseShader *self, PyObject *args, PyObject *kwds)
PyTypeObject ColorNoiseShader_Type
PyDoc_STRVAR(ColorNoiseShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`ColorNoiseShader`\n" "\n" "[Color shader]\n" "\n" ".. method:: __init__(amplitude, period)\n" "\n" " Builds a ColorNoiseShader object.\n" "\n" " :arg amplitude: The amplitude of the noise signal.\n" " :type amplitude: float\n" " :arg period: The period of the noise signal.\n" " :type period: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Shader to add noise to the stroke colors.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20