Blender V5.0
BPy_GuidingLinesShader.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 GuidingLinesShader___doc__,
22 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`GuidingLinesShader`\n"
23 "\n"
24 "[Geometry shader]\n"
25 "\n"
26 ".. method:: __init__(offset)\n"
27 "\n"
28 " Builds a GuidingLinesShader object.\n"
29 "\n"
30 " :arg offset: The line that replaces the stroke is initially in the\n"
31 " middle of the initial stroke bounding box. offset is the value\n"
32 " of the displacement which is applied to this line along its\n"
33 " normal.\n"
34 " :type offset: float\n"
35 "\n"
36 ".. method:: shade(stroke)\n"
37 "\n"
38 " Shader to modify the Stroke geometry so that it corresponds to its\n"
39 " main direction line. This shader must be used together with the\n"
40 " splitting operator using the curvature criterion. Indeed, the\n"
41 " precision of the approximation will depend on the size of the\n"
42 " stroke's pieces. The bigger the pieces are, the rougher the\n"
43 " approximation is.\n"
44 "\n"
45 " :arg stroke: A Stroke object.\n"
46 " :type stroke: :class:`freestyle.types.Stroke`\n");
48 PyObject *args,
49 PyObject *kwds)
50{
51 static const char *kwlist[] = {"offset", nullptr};
52 float f;
53
54 if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
55 return -1;
56 }
57 self->py_ss.ss = new StrokeShaders::GuidingLinesShader(f);
58 return 0;
59}
60
61/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/
62
64 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
65 /*tp_name*/ "GuidingLinesShader",
66 /*tp_basicsize*/ sizeof(BPy_GuidingLinesShader),
67 /*tp_itemsize*/ 0,
68 /*tp_dealloc*/ nullptr,
69 /*tp_vectorcall_offset*/ 0,
70 /*tp_getattr*/ nullptr,
71 /*tp_setattr*/ nullptr,
72 /*tp_as_async*/ nullptr,
73 /*tp_repr*/ nullptr,
74 /*tp_as_number*/ nullptr,
75 /*tp_as_sequence*/ nullptr,
76 /*tp_as_mapping*/ nullptr,
77 /*tp_hash*/ nullptr,
78 /*tp_call*/ nullptr,
79 /*tp_str*/ nullptr,
80 /*tp_getattro*/ nullptr,
81 /*tp_setattro*/ nullptr,
82 /*tp_as_buffer*/ nullptr,
83 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
84 /*tp_doc*/ GuidingLinesShader___doc__,
85 /*tp_traverse*/ nullptr,
86 /*tp_clear*/ nullptr,
87 /*tp_richcompare*/ nullptr,
88 /*tp_weaklistoffset*/ 0,
89 /*tp_iter*/ nullptr,
90 /*tp_iternext*/ nullptr,
91 /*tp_methods*/ nullptr,
92 /*tp_members*/ nullptr,
93 /*tp_getset*/ nullptr,
94 /*tp_base*/ &StrokeShader_Type,
95 /*tp_dict*/ nullptr,
96 /*tp_descr_get*/ nullptr,
97 /*tp_descr_set*/ nullptr,
98 /*tp_dictoffset*/ 0,
99 /*tp_init*/ (initproc)GuidingLinesShader___init__,
100 /*tp_alloc*/ nullptr,
101 /*tp_new*/ nullptr,
102};
103
PyTypeObject GuidingLinesShader_Type
PyDoc_STRVAR(GuidingLinesShader___doc__, "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`GuidingLinesShader`\n" "\n" "[Geometry shader]\n" "\n" ".. method:: __init__(offset)\n" "\n" " Builds a GuidingLinesShader object.\n" "\n" " :arg offset: The line that replaces the stroke is initially in the\n" " middle of the initial stroke bounding box. offset is the value\n" " of the displacement which is applied to this line along its\n" " normal.\n" " :type offset: float\n" "\n" ".. method:: shade(stroke)\n" "\n" " Shader to modify the Stroke geometry so that it corresponds to its\n" " main direction line. This shader must be used together with the\n" " splitting operator using the curvature criterion. Indeed, the\n" " precision of the approximation will depend on the size of the\n" " stroke's pieces. The bigger the pieces are, the rougher the\n" " approximation is.\n" "\n" " :arg stroke: A Stroke object.\n" " :type stroke: :class:`freestyle.types.Stroke`\n")
static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self, PyObject *args, PyObject *kwds)
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20