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