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