Blender V4.5
BPy_IncreasingColorShader.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2023 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 IncreasingColorShader___doc__,
22 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`IncreasingColorShader`\n"
23 "\n"
24 "[Color shader]\n"
25 "\n"
26 ".. method:: __init__(red_min, green_min, blue_min, alpha_min, red_max, green_max, blue_max, "
27 "alpha_max)\n"
28 "\n"
29 " Builds an IncreasingColorShader object.\n"
30 "\n"
31 " :arg red_min: The first color red component.\n"
32 " :type red_min: float\n"
33 " :arg green_min: The first color green component.\n"
34 " :type green_min: float\n"
35 " :arg blue_min: The first color blue component.\n"
36 " :type blue_min: float\n"
37 " :arg alpha_min: The first color alpha value.\n"
38 " :type alpha_min: float\n"
39 " :arg red_max: The second color red component.\n"
40 " :type red_max: float\n"
41 " :arg green_max: The second color green component.\n"
42 " :type green_max: float\n"
43 " :arg blue_max: The second color blue component.\n"
44 " :type blue_max: float\n"
45 " :arg alpha_max: The second color alpha value.\n"
46 " :type alpha_max: float\n"
47 "\n"
48 ".. method:: shade(stroke)\n"
49 "\n"
50 " Assigns a varying color to the stroke. The user specifies two\n"
51 " colors A and B. The stroke color will change linearly from A to B\n"
52 " between the first and the last vertex.\n"
53 "\n"
54 " :arg stroke: A Stroke object.\n"
55 " :type stroke: :class:`freestyle.types.Stroke`\n");
56
58 PyObject *args,
59 PyObject *kwds)
60{
61 static const char *kwlist[] = {
62 "red_min",
63 "green_min",
64 "blue_min",
65 "alpha_min",
66 "red_max",
67 "green_max",
68 "blue_max",
69 "alpha_max",
70 nullptr,
71 };
72 float f1, f2, f3, f4, f5, f6, f7, f8;
73
74 if (!PyArg_ParseTupleAndKeywords(
75 args, kwds, "ffffffff", (char **)kwlist, &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8))
76 {
77 return -1;
78 }
79 self->py_ss.ss = new StrokeShaders::IncreasingColorShader(f1, f2, f3, f4, f5, f6, f7, f8);
80 return 0;
81}
82
83/*-----------------------BPy_IncreasingColorShader type definition ------------------------------*/
84
86 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
87 /*tp_name*/ "IncreasingColorShader",
88 /*tp_basicsize*/ sizeof(BPy_IncreasingColorShader),
89 /*tp_itemsize*/ 0,
90 /*tp_dealloc*/ nullptr,
91 /*tp_vectorcall_offset*/ 0,
92 /*tp_getattr*/ nullptr,
93 /*tp_setattr*/ nullptr,
94 /*tp_as_async*/ nullptr,
95 /*tp_repr*/ nullptr,
96 /*tp_as_number*/ nullptr,
97 /*tp_as_sequence*/ nullptr,
98 /*tp_as_mapping*/ nullptr,
99 /*tp_hash*/ nullptr,
100 /*tp_call*/ nullptr,
101 /*tp_str*/ nullptr,
102 /*tp_getattro*/ nullptr,
103 /*tp_setattro*/ nullptr,
104 /*tp_as_buffer*/ nullptr,
105 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
106 /*tp_doc*/ IncreasingColorShader___doc__,
107 /*tp_traverse*/ nullptr,
108 /*tp_clear*/ nullptr,
109 /*tp_richcompare*/ nullptr,
110 /*tp_weaklistoffset*/ 0,
111 /*tp_iter*/ nullptr,
112 /*tp_iternext*/ nullptr,
113 /*tp_methods*/ nullptr,
114 /*tp_members*/ nullptr,
115 /*tp_getset*/ nullptr,
116 /*tp_base*/ &StrokeShader_Type,
117 /*tp_dict*/ nullptr,
118 /*tp_descr_get*/ nullptr,
119 /*tp_descr_set*/ nullptr,
120 /*tp_dictoffset*/ 0,
121 /*tp_init*/ (initproc)IncreasingColorShader___init__,
122 /*tp_alloc*/ nullptr,
123 /*tp_new*/ nullptr,
124};
125
PyDoc_STRVAR(IncreasingColorShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`IncreasingColorShader`\n" "\n" "[Color shader]\n" "\n" ".. method:: __init__(red_min, green_min, blue_min, alpha_min, red_max, green_max, blue_max, " "alpha_max)\n" "\n" " Builds an IncreasingColorShader object.\n" "\n" " :arg red_min: The first color red component.\n" " :type red_min: float\n" " :arg green_min: The first color green component.\n" " :type green_min: float\n" " :arg blue_min: The first color blue component.\n" " :type blue_min: float\n" " :arg alpha_min: The first color alpha value.\n" " :type alpha_min: float\n" " :arg red_max: The second color red component.\n" " :type red_max: float\n" " :arg green_max: The second color green component.\n" " :type green_max: float\n" " :arg blue_max: The second color blue component.\n" " :type blue_max: float\n" " :arg alpha_max: The second color alpha value.\n" " :type alpha_max: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Assigns a varying color to the stroke. The user specifies two\n" " colors A and B. The stroke color will change linearly from A to B\n" " between the first and the last vertex.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
PyTypeObject IncreasingColorShader_Type
static int IncreasingColorShader___init__(BPy_IncreasingColorShader *self, PyObject *args, PyObject *kwds)
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20