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