Blender V5.0
BPy_IncreasingThicknessShader.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 IncreasingThicknessShader___doc__,
22 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`IncreasingThicknessShader`\n"
23 "\n"
24 "[Thickness shader]\n"
25 "\n"
26 ".. method:: __init__(thickness_A, thickness_B)\n"
27 "\n"
28 " Builds an IncreasingThicknessShader object.\n"
29 "\n"
30 " :arg thickness_A: The first thickness value.\n"
31 " :type thickness_A: float\n"
32 " :arg thickness_B: The second thickness value.\n"
33 " :type thickness_B: float\n"
34 "\n"
35 ".. method:: shade(stroke)\n"
36 "\n"
37 " Assigns thicknesses values such as the thickness increases from a\n"
38 " thickness value A to a thickness value B between the first vertex\n"
39 " to the midpoint vertex and then decreases from B to a A between\n"
40 " this midpoint vertex and the last vertex. The thickness is\n"
41 " linearly interpolated from A to B.\n"
42 "\n"
43 " :arg stroke: A Stroke object.\n"
44 " :type stroke: :class:`freestyle.types.Stroke`\n");
46 PyObject *args,
47 PyObject *kwds)
48{
49 static const char *kwlist[] = {"thickness_A", "thickness_B", nullptr};
50 float f1, f2;
51
52 if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2)) {
53 return -1;
54 }
55 self->py_ss.ss = new StrokeShaders::IncreasingThicknessShader(f1, f2);
56 return 0;
57}
58
59/*-----------------------BPy_IncreasingThicknessShader type definition --------------------------*/
60
62 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
63 /*tp_name*/ "IncreasingThicknessShader",
64 /*tp_basicsize*/ sizeof(BPy_IncreasingThicknessShader),
65 /*tp_itemsize*/ 0,
66 /*tp_dealloc*/ nullptr,
67 /*tp_vectorcall_offset*/ 0,
68 /*tp_getattr*/ nullptr,
69 /*tp_setattr*/ nullptr,
70 /*tp_as_async*/ nullptr,
71 /*tp_repr*/ nullptr,
72 /*tp_as_number*/ nullptr,
73 /*tp_as_sequence*/ nullptr,
74 /*tp_as_mapping*/ nullptr,
75 /*tp_hash*/ nullptr,
76 /*tp_call*/ nullptr,
77 /*tp_str*/ nullptr,
78 /*tp_getattro*/ nullptr,
79 /*tp_setattro*/ nullptr,
80 /*tp_as_buffer*/ nullptr,
81 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
82 /*tp_doc*/ IncreasingThicknessShader___doc__,
83 /*tp_traverse*/ nullptr,
84 /*tp_clear*/ nullptr,
85 /*tp_richcompare*/ nullptr,
86 /*tp_weaklistoffset*/ 0,
87 /*tp_iter*/ nullptr,
88 /*tp_iternext*/ nullptr,
89 /*tp_methods*/ nullptr,
90 /*tp_members*/ nullptr,
91 /*tp_getset*/ nullptr,
92 /*tp_base*/ &StrokeShader_Type,
93 /*tp_dict*/ nullptr,
94 /*tp_descr_get*/ nullptr,
95 /*tp_descr_set*/ nullptr,
96 /*tp_dictoffset*/ 0,
97 /*tp_init*/ (initproc)IncreasingThicknessShader___init__,
98 /*tp_alloc*/ nullptr,
99 /*tp_new*/ nullptr,
100};
101
PyDoc_STRVAR(IncreasingThicknessShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`IncreasingThicknessShader`\n" "\n" "[Thickness shader]\n" "\n" ".. method:: __init__(thickness_A, thickness_B)\n" "\n" " Builds an IncreasingThicknessShader object.\n" "\n" " :arg thickness_A: The first thickness value.\n" " :type thickness_A: float\n" " :arg thickness_B: The second thickness value.\n" " :type thickness_B: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Assigns thicknesses values such as the thickness increases from a\n" " thickness value A to a thickness value B between the first vertex\n" " to the midpoint vertex and then decreases from B to a A between\n" " this midpoint vertex and the last vertex. The thickness is\n" " linearly interpolated from A to B.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
PyTypeObject IncreasingThicknessShader_Type
static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader *self, PyObject *args, PyObject *kwds)
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20