Blender V4.5
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");
40
41static int TipRemoverShader___init__(BPy_TipRemoverShader *self, PyObject *args, PyObject *kwds)
42{
43 static const char *kwlist[] = {"tip_length", nullptr};
44 double d;
45
46 if (!PyArg_ParseTupleAndKeywords(args, kwds, "d", (char **)kwlist, &d)) {
47 return -1;
48 }
49 self->py_ss.ss = new StrokeShaders::TipRemoverShader(d);
50 return 0;
51}
52
53/*-----------------------BPy_TipRemoverShader type definition ------------------------------*/
54
55PyTypeObject TipRemoverShader_Type = {
56 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
57 /*tp_name*/ "TipRemoverShader",
58 /*tp_basicsize*/ sizeof(BPy_TipRemoverShader),
59 /*tp_itemsize*/ 0,
60 /*tp_dealloc*/ nullptr,
61 /*tp_vectorcall_offset*/ 0,
62 /*tp_getattr*/ nullptr,
63 /*tp_setattr*/ nullptr,
64 /*tp_as_async*/ nullptr,
65 /*tp_repr*/ nullptr,
66 /*tp_as_number*/ nullptr,
67 /*tp_as_sequence*/ nullptr,
68 /*tp_as_mapping*/ nullptr,
69 /*tp_hash*/ nullptr,
70 /*tp_call*/ nullptr,
71 /*tp_str*/ nullptr,
72 /*tp_getattro*/ nullptr,
73 /*tp_setattro*/ nullptr,
74 /*tp_as_buffer*/ nullptr,
75 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
76 /*tp_doc*/ TipRemoverShader___doc__,
77 /*tp_traverse*/ nullptr,
78 /*tp_clear*/ nullptr,
79 /*tp_richcompare*/ nullptr,
80 /*tp_weaklistoffset*/ 0,
81 /*tp_iter*/ nullptr,
82 /*tp_iternext*/ nullptr,
83 /*tp_methods*/ nullptr,
84 /*tp_members*/ nullptr,
85 /*tp_getset*/ nullptr,
86 /*tp_base*/ &StrokeShader_Type,
87 /*tp_dict*/ nullptr,
88 /*tp_descr_get*/ nullptr,
89 /*tp_descr_set*/ nullptr,
90 /*tp_dictoffset*/ 0,
91 /*tp_init*/ (initproc)TipRemoverShader___init__,
92 /*tp_alloc*/ nullptr,
93 /*tp_new*/ nullptr,
94};
95
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