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