Blender V4.3
BPy_ConstrainedIncreasingThicknessShader.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 ConstrainedIncreasingThicknessShader___doc__,
26 "Class hierarchy: :class:`freestyle.types.StrokeShader` > "
27 ":class:`ConstrainedIncreasingThicknessShader`\n"
28 "\n"
29 "[Thickness shader]\n"
30 "\n"
31 ".. method:: __init__(thickness_min, thickness_max, ratio)\n"
32 "\n"
33 " Builds a ConstrainedIncreasingThicknessShader object.\n"
34 "\n"
35 " :arg thickness_min: The minimum thickness.\n"
36 " :type thickness_min: float\n"
37 " :arg thickness_max: The maximum thickness.\n"
38 " :type thickness_max: float\n"
39 " :arg ratio: The thickness/length ratio that we don't want to exceed. \n"
40 " :type ratio: float\n"
41 "\n"
42 ".. method:: shade(stroke)\n"
43 "\n"
44 " Same as the :class:`IncreasingThicknessShader`, but here we allow\n"
45 " the user to control the thickness/length ratio so that we don't get\n"
46 " fat short lines.\n"
47 "\n"
48 " :arg stroke: A Stroke object.\n"
49 " :type stroke: :class:`freestyle.types.Stroke`\n");
50
52 BPy_ConstrainedIncreasingThicknessShader *self, PyObject *args, PyObject *kwds)
53{
54 static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", nullptr};
55 float f1, f2, f3;
56
57 if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff", (char **)kwlist, &f1, &f2, &f3)) {
58 return -1;
59 }
61 return 0;
62}
63
64/*-----------------------BPy_ConstrainedIncreasingThicknessShader type definition ---------------*/
65
67 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
68 /*tp_name*/ "ConstrainedIncreasingThicknessShader",
69 /*tp_basicsize*/ sizeof(BPy_ConstrainedIncreasingThicknessShader),
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*/ ConstrainedIncreasingThicknessShader___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,
103 /*tp_alloc*/ nullptr,
104 /*tp_new*/ nullptr,
105};
106
108
109#ifdef __cplusplus
110}
111#endif
PyDoc_STRVAR(ConstrainedIncreasingThicknessShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > " ":class:`ConstrainedIncreasingThicknessShader`\n" "\n" "[Thickness shader]\n" "\n" ".. method:: __init__(thickness_min, thickness_max, ratio)\n" "\n" " Builds a ConstrainedIncreasingThicknessShader object.\n" "\n" " :arg thickness_min: The minimum thickness.\n" " :type thickness_min: float\n" " :arg thickness_max: The maximum thickness.\n" " :type thickness_max: float\n" " :arg ratio: The thickness/length ratio that we don't want to exceed. \n" " :type ratio: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Same as the :class:`IncreasingThicknessShader`, but here we allow\n" " the user to control the thickness/length ratio so that we don't get\n" " fat short lines.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
PyTypeObject ConstrainedIncreasingThicknessShader_Type
static int ConstrainedIncreasingThicknessShader___init__(BPy_ConstrainedIncreasingThicknessShader *self, PyObject *args, PyObject *kwds)
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20