Blender V5.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
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 " :param 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 " :param 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,
55 kwds,
56 "f" /* `offset` */
57 ":__init__",
58 (char **)kwlist,
59 &f))
60 {
61 return -1;
62 }
64 return 0;
65}
66
67/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/
68
70 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
71 /*tp_name*/ "GuidingLinesShader",
72 /*tp_basicsize*/ sizeof(BPy_GuidingLinesShader),
73 /*tp_itemsize*/ 0,
74 /*tp_dealloc*/ nullptr,
75 /*tp_vectorcall_offset*/ 0,
76 /*tp_getattr*/ nullptr,
77 /*tp_setattr*/ nullptr,
78 /*tp_as_async*/ nullptr,
79 /*tp_repr*/ nullptr,
80 /*tp_as_number*/ nullptr,
81 /*tp_as_sequence*/ nullptr,
82 /*tp_as_mapping*/ nullptr,
83 /*tp_hash*/ nullptr,
84 /*tp_call*/ nullptr,
85 /*tp_str*/ nullptr,
86 /*tp_getattro*/ nullptr,
87 /*tp_setattro*/ nullptr,
88 /*tp_as_buffer*/ nullptr,
89 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
90 /*tp_doc*/ GuidingLinesShader___doc__,
91 /*tp_traverse*/ nullptr,
92 /*tp_clear*/ nullptr,
93 /*tp_richcompare*/ nullptr,
94 /*tp_weaklistoffset*/ 0,
95 /*tp_iter*/ nullptr,
96 /*tp_iternext*/ nullptr,
97 /*tp_methods*/ nullptr,
98 /*tp_members*/ nullptr,
99 /*tp_getset*/ nullptr,
100 /*tp_base*/ &StrokeShader_Type,
101 /*tp_dict*/ nullptr,
102 /*tp_descr_get*/ nullptr,
103 /*tp_descr_set*/ nullptr,
104 /*tp_dictoffset*/ 0,
105 /*tp_init*/ (initproc)GuidingLinesShader___init__,
106 /*tp_alloc*/ nullptr,
107 /*tp_new*/ nullptr,
108};
109
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")
PyTypeObject GuidingLinesShader_Type
static int GuidingLinesShader___init__(BPy_GuidingLinesShader *self, PyObject *args, PyObject *kwds)
PyTypeObject StrokeShader_Type
Class gathering basic stroke shaders.
inherits from class Rep
Definition AppCanvas.cpp:20
PyObject_HEAD Freestyle::StrokeShader * ss