Blender V4.3
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
10
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17using namespace Freestyle;
18
20
21//------------------------INSTANCE METHODS ----------------------------------
22
24 /* Wrap. */
25 GuidingLinesShader___doc__,
26 "Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`GuidingLinesShader`\n"
27 "\n"
28 "[Geometry shader]\n"
29 "\n"
30 ".. method:: __init__(offset)\n"
31 "\n"
32 " Builds a GuidingLinesShader object.\n"
33 "\n"
34 " :arg offset: The line that replaces the stroke is initially in the\n"
35 " middle of the initial stroke bounding box. offset is the value\n"
36 " of the displacement which is applied to this line along its\n"
37 " normal.\n"
38 " :type offset: float\n"
39 "\n"
40 ".. method:: shade(stroke)\n"
41 "\n"
42 " Shader to modify the Stroke geometry so that it corresponds to its\n"
43 " main direction line. This shader must be used together with the\n"
44 " splitting operator using the curvature criterion. Indeed, the\n"
45 " precision of the approximation will depend on the size of the\n"
46 " stroke's pieces. The bigger the pieces are, the rougher the\n"
47 " approximation is.\n"
48 "\n"
49 " :arg stroke: A Stroke object.\n"
50 " :type stroke: :class:`freestyle.types.Stroke`\n");
51
53 PyObject *args,
54 PyObject *kwds)
55{
56 static const char *kwlist[] = {"offset", nullptr};
57 float f;
58
59 if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f)) {
60 return -1;
61 }
62 self->py_ss.ss = new StrokeShaders::GuidingLinesShader(f);
63 return 0;
64}
65
66/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/
67
69 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
70 /*tp_name*/ "GuidingLinesShader",
71 /*tp_basicsize*/ sizeof(BPy_GuidingLinesShader),
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*/ GuidingLinesShader___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)GuidingLinesShader___init__,
105 /*tp_alloc*/ nullptr,
106 /*tp_new*/ nullptr,
107};
108
110
111#ifdef __cplusplus
112}
113#endif
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