Blender V4.3
BPy_PolygonalizationShader.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 PolygonalizationShader___doc__,
26 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`PolygonalizationShader`\n"
27 "\n"
28 "[Geometry shader]\n"
29 "\n"
30 ".. method:: __init__(error)\n"
31 "\n"
32 " Builds a PolygonalizationShader object.\n"
33 "\n"
34 " :arg error: The error we want our polygonal approximation to have\n"
35 " with respect to the original geometry. The smaller, the closer\n"
36 " the new stroke is to the original one. This error corresponds to\n"
37 " the maximum distance between the new stroke and the old one.\n"
38 " :type error: float\n"
39 "\n"
40 ".. method:: shade(stroke)\n"
41 "\n"
42 " Modifies the Stroke geometry so that it looks more \"polygonal\".\n"
43 " The basic idea is to start from the minimal stroke approximation\n"
44 " consisting in a line joining the first vertex to the last one and\n"
45 " to subdivide using the original stroke vertices until a certain\n"
46 " error is reached.\n"
47 "\n"
48 " :arg stroke: A Stroke object.\n"
49 " :type stroke: :class:`freestyle.types.Stroke`\n");
50
52 PyObject *args,
53 PyObject *kwds)
54{
55 static const char *kwlist[] = {"error", nullptr};
56 float f;
57
58 if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
59 return -1;
60 }
62 return 0;
63}
64
65/*-----------------------BPy_PolygonalizationShader type definition -----------------------------*/
66
68 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
69 /*tp_name*/ "PolygonalizationShader",
70 /*tp_basicsize*/ sizeof(BPy_PolygonalizationShader),
71 /*tp_itemsize*/ 0,
72 /*tp_dealloc*/ nullptr,
73 /*tp_vectorcall_offset*/ 0,
74 /*tp_getattr*/ nullptr,
75 /*tp_setattr*/ nullptr,
76 /*tp_as_async*/ nullptr,
77 /*tp_repr*/ nullptr,
78 /*tp_as_number*/ nullptr,
79 /*tp_as_sequence*/ nullptr,
80 /*tp_as_mapping*/ nullptr,
81 /*tp_hash*/ nullptr,
82 /*tp_call*/ nullptr,
83 /*tp_str*/ nullptr,
84 /*tp_getattro*/ nullptr,
85 /*tp_setattro*/ nullptr,
86 /*tp_as_buffer*/ nullptr,
87 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
88 /*tp_doc*/ PolygonalizationShader___doc__,
89 /*tp_traverse*/ nullptr,
90 /*tp_clear*/ nullptr,
91 /*tp_richcompare*/ nullptr,
92 /*tp_weaklistoffset*/ 0,
93 /*tp_iter*/ nullptr,
94 /*tp_iternext*/ nullptr,
95 /*tp_methods*/ nullptr,
96 /*tp_members*/ nullptr,
97 /*tp_getset*/ nullptr,
98 /*tp_base*/ &StrokeShader_Type,
99 /*tp_dict*/ nullptr,
100 /*tp_descr_get*/ nullptr,
101 /*tp_descr_set*/ nullptr,
102 /*tp_dictoffset*/ 0,
103 /*tp_init*/ (initproc)PolygonalizationShader___init__,
104 /*tp_alloc*/ nullptr,
105 /*tp_new*/ nullptr,
106};
107
109
110#ifdef __cplusplus
111}
112#endif
PyDoc_STRVAR(PolygonalizationShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`PolygonalizationShader`\n" "\n" "[Geometry shader]\n" "\n" ".. method:: __init__(error)\n" "\n" " Builds a PolygonalizationShader object.\n" "\n" " :arg error: The error we want our polygonal approximation to have\n" " with respect to the original geometry. The smaller, the closer\n" " the new stroke is to the original one. This error corresponds to\n" " the maximum distance between the new stroke and the old one.\n" " :type error: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Modifies the Stroke geometry so that it looks more \"polygonal\".\n" " The basic idea is to start from the minimal stroke approximation\n" " consisting in a line joining the first vertex to the last one and\n" " to subdivide using the original stroke vertices until a certain\n" " error is reached.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
static int PolygonalizationShader___init__(BPy_PolygonalizationShader *self, PyObject *args, PyObject *kwds)
PyTypeObject PolygonalizationShader_Type
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20