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