Blender V5.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
8
10
12
13using namespace Freestyle;
14
16
17//------------------------INSTANCE METHODS ----------------------------------
18
20 /* Wrap. */
21 ConstrainedIncreasingThicknessShader___doc__,
22 "Class hierarchy: :class:`freestyle.types.StrokeShader` > "
23 ":class:`ConstrainedIncreasingThicknessShader`\n"
24 "\n"
25 "[Thickness shader]\n"
26 "\n"
27 ".. method:: __init__(thickness_min, thickness_max, ratio)\n"
28 "\n"
29 " Builds a ConstrainedIncreasingThicknessShader object.\n"
30 "\n"
31 " :param thickness_min: The minimum thickness.\n"
32 " :type thickness_min: float\n"
33 " :param thickness_max: The maximum thickness.\n"
34 " :type thickness_max: float\n"
35 " :param ratio: The thickness/length ratio that we don't want to exceed. \n"
36 " :type ratio: float\n"
37 "\n"
38 ".. method:: shade(stroke)\n"
39 "\n"
40 " Same as the :class:`IncreasingThicknessShader`, but here we allow\n"
41 " the user to control the thickness/length ratio so that we don't get\n"
42 " fat short lines.\n"
43 "\n"
44 " :param stroke: A Stroke object.\n"
45 " :type stroke: :class:`freestyle.types.Stroke`\n");
47 BPy_ConstrainedIncreasingThicknessShader *self, PyObject *args, PyObject *kwds)
48{
49 static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", nullptr};
50 float f1, f2, f3;
51
52 if (!PyArg_ParseTupleAndKeywords(args,
53 kwds,
54 "f" /* `thickness_min` */
55 "f" /* `thickness_max` */
56 "f" /* `ratio` */
57 ":__init__",
58 (char **)kwlist,
59 &f1,
60 &f2,
61 &f3))
62 {
63 return -1;
64 }
66 return 0;
67}
68
69/*-----------------------BPy_ConstrainedIncreasingThicknessShader type definition ---------------*/
70
72 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
73 /*tp_name*/ "ConstrainedIncreasingThicknessShader",
74 /*tp_basicsize*/ sizeof(BPy_ConstrainedIncreasingThicknessShader),
75 /*tp_itemsize*/ 0,
76 /*tp_dealloc*/ nullptr,
77 /*tp_vectorcall_offset*/ 0,
78 /*tp_getattr*/ nullptr,
79 /*tp_setattr*/ nullptr,
80 /*tp_as_async*/ nullptr,
81 /*tp_repr*/ nullptr,
82 /*tp_as_number*/ nullptr,
83 /*tp_as_sequence*/ nullptr,
84 /*tp_as_mapping*/ nullptr,
85 /*tp_hash*/ nullptr,
86 /*tp_call*/ nullptr,
87 /*tp_str*/ nullptr,
88 /*tp_getattro*/ nullptr,
89 /*tp_setattro*/ nullptr,
90 /*tp_as_buffer*/ nullptr,
91 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
92 /*tp_doc*/ ConstrainedIncreasingThicknessShader___doc__,
93 /*tp_traverse*/ nullptr,
94 /*tp_clear*/ nullptr,
95 /*tp_richcompare*/ nullptr,
96 /*tp_weaklistoffset*/ 0,
97 /*tp_iter*/ nullptr,
98 /*tp_iternext*/ nullptr,
99 /*tp_methods*/ nullptr,
100 /*tp_members*/ nullptr,
101 /*tp_getset*/ nullptr,
102 /*tp_base*/ &StrokeShader_Type,
103 /*tp_dict*/ nullptr,
104 /*tp_descr_get*/ nullptr,
105 /*tp_descr_set*/ nullptr,
106 /*tp_dictoffset*/ 0,
108 /*tp_alloc*/ nullptr,
109 /*tp_new*/ nullptr,
110};
111
PyTypeObject ConstrainedIncreasingThicknessShader_Type
static int ConstrainedIncreasingThicknessShader___init__(BPy_ConstrainedIncreasingThicknessShader *self, PyObject *args, PyObject *kwds)
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 StrokeShader_Type
Class gathering basic stroke shaders.
inherits from class Rep
Definition AppCanvas.cpp:20
PyObject_HEAD Freestyle::StrokeShader * ss