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