Blender V4.3
BPy_StrokeTextureStepShader.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 StrokeTextureStepShader___doc__,
26 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`StrokeTextureStepShader`\n"
27 "\n"
28 "[Texture shader]\n"
29 "\n"
30 ".. method:: __init__(step)\n"
31 "\n"
32 " Builds a StrokeTextureStepShader object.\n"
33 "\n"
34 " :arg step: The spacing along the stroke.\n"
35 " :type step: float\n"
36 "\n"
37 ".. method:: shade(stroke)\n"
38 "\n"
39 " Assigns a spacing factor to the texture coordinates of the Stroke.\n"
40 "\n"
41 " :arg stroke: A Stroke object.\n"
42 " :type stroke: :class:`freestyle.types.Stroke`\n");
43
45 PyObject *args,
46 PyObject *kwds)
47{
48 static const char *kwlist[] = {"step", nullptr};
49 float step = 0.1;
50
51 if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &step)) {
52 return -1;
53 }
54 self->py_ss.ss = new StrokeShaders::StrokeTextureStepShader(step);
55 return 0;
56}
57
58/*-----------------------BPy_StrokeTextureStepShader type definition ----------------------------*/
59
61 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
62 /*tp_name*/ "StrokeTextureStepShader",
63 /*tp_basicsize*/ sizeof(BPy_StrokeTextureStepShader),
64 /*tp_itemsize*/ 0,
65 /*tp_dealloc*/ nullptr,
66 /*tp_vectorcall_offset*/ 0,
67 /*tp_getattr*/ nullptr,
68 /*tp_setattr*/ nullptr,
69 /*tp_as_async*/ nullptr,
70 /*tp_repr*/ nullptr,
71 /*tp_as_number*/ nullptr,
72 /*tp_as_sequence*/ nullptr,
73 /*tp_as_mapping*/ nullptr,
74 /*tp_hash*/ nullptr,
75 /*tp_call*/ nullptr,
76 /*tp_str*/ nullptr,
77 /*tp_getattro*/ nullptr,
78 /*tp_setattro*/ nullptr,
79 /*tp_as_buffer*/ nullptr,
80 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
81 /*tp_doc*/ StrokeTextureStepShader___doc__,
82 /*tp_traverse*/ nullptr,
83 /*tp_clear*/ nullptr,
84 /*tp_richcompare*/ nullptr,
85 /*tp_weaklistoffset*/ 0,
86 /*tp_iter*/ nullptr,
87 /*tp_iternext*/ nullptr,
88 /*tp_methods*/ nullptr,
89 /*tp_members*/ nullptr,
90 /*tp_getset*/ nullptr,
91 /*tp_base*/ &StrokeShader_Type,
92 /*tp_dict*/ nullptr,
93 /*tp_descr_get*/ nullptr,
94 /*tp_descr_set*/ nullptr,
95 /*tp_dictoffset*/ 0,
96 /*tp_init*/ (initproc)StrokeTextureStepShader___init__,
97 /*tp_alloc*/ nullptr,
98 /*tp_new*/ nullptr,
99};
100
102
103#ifdef __cplusplus
104}
105#endif
PyTypeObject StrokeShader_Type
PyTypeObject StrokeTextureStepShader_Type
PyDoc_STRVAR(StrokeTextureStepShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`StrokeTextureStepShader`\n" "\n" "[Texture shader]\n" "\n" ".. method:: __init__(step)\n" "\n" " Builds a StrokeTextureStepShader object.\n" "\n" " :arg step: The spacing along the stroke.\n" " :type step: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Assigns a spacing factor to the texture coordinates of the Stroke.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self, PyObject *args, PyObject *kwds)
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20