Blender
V3.3
source
blender
freestyle
intern
python
StrokeShader
BPy_StrokeTextureStepShader.cpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
7
#include "
BPy_StrokeTextureStepShader.h
"
8
9
#include "../../stroke/BasicStrokeShaders.h"
10
11
#ifdef __cplusplus
12
extern
"C"
{
13
#endif
14
15
using namespace
Freestyle
;
16
18
19
//------------------------INSTANCE METHODS ----------------------------------
20
21
static
char
StrokeTextureStepShader___doc__
[] =
22
"Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`StrokeTextureStepShader`\n"
23
"\n"
24
"[Texture shader]\n"
25
"\n"
26
".. method:: __init__(step)\n"
27
"\n"
28
" Builds a StrokeTextureStepShader object.\n"
29
"\n"
30
" :arg step: The spacing along the stroke.\n"
31
" :type step: float\n"
32
"\n"
33
".. method:: shade(stroke)\n"
34
"\n"
35
" Assigns a spacing factor to the texture coordinates of the Stroke.\n"
36
"\n"
37
" :arg stroke: A Stroke object.\n"
38
" :type stroke: :class:`freestyle.types.Stroke`\n"
;
39
40
static
int
StrokeTextureStepShader___init__
(
BPy_StrokeTextureStepShader
*
self
,
41
PyObject *args,
42
PyObject *kwds)
43
{
44
static
const
char
*kwlist[] = {
"step"
,
nullptr
};
45
float
step = 0.1;
46
47
if
(!PyArg_ParseTupleAndKeywords(args, kwds,
"f"
, (
char
**)kwlist, &step)) {
48
return
-1;
49
}
50
self
->py_ss.ss =
new
StrokeShaders::StrokeTextureStepShader
(step);
51
return
0;
52
}
53
54
/*-----------------------BPy_StrokeTextureStepShader type definition ----------------------------*/
55
56
PyTypeObject
StrokeTextureStepShader_Type
= {
57
PyVarObject_HEAD_INIT(
nullptr
, 0)
"StrokeTextureStepShader"
,
/* tp_name */
58
sizeof
(
BPy_StrokeTextureStepShader
),
/* tp_basicsize */
59
0,
/* tp_itemsize */
60
nullptr
,
/* tp_dealloc */
61
0,
/* tp_vectorcall_offset */
62
nullptr
,
/* tp_getattr */
63
nullptr
,
/* tp_setattr */
64
nullptr
,
/* tp_reserved */
65
nullptr
,
/* tp_repr */
66
nullptr
,
/* tp_as_number */
67
nullptr
,
/* tp_as_sequence */
68
nullptr
,
/* tp_as_mapping */
69
nullptr
,
/* tp_hash */
70
nullptr
,
/* tp_call */
71
nullptr
,
/* tp_str */
72
nullptr
,
/* tp_getattro */
73
nullptr
,
/* tp_setattro */
74
nullptr
,
/* tp_as_buffer */
75
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
/* tp_flags */
76
StrokeTextureStepShader___doc__
,
/* tp_doc */
77
nullptr
,
/* tp_traverse */
78
nullptr
,
/* tp_clear */
79
nullptr
,
/* tp_richcompare */
80
0,
/* tp_weaklistoffset */
81
nullptr
,
/* tp_iter */
82
nullptr
,
/* tp_iternext */
83
nullptr
,
/* tp_methods */
84
nullptr
,
/* tp_members */
85
nullptr
,
/* tp_getset */
86
&
StrokeShader_Type
,
/* tp_base */
87
nullptr
,
/* tp_dict */
88
nullptr
,
/* tp_descr_get */
89
nullptr
,
/* tp_descr_set */
90
0,
/* tp_dictoffset */
91
(initproc)
StrokeTextureStepShader___init__
,
/* tp_init */
92
nullptr
,
/* tp_alloc */
93
nullptr
,
/* tp_new */
94
};
95
97
98
#ifdef __cplusplus
99
}
100
#endif
StrokeShader_Type
PyTypeObject StrokeShader_Type
Definition:
BPy_StrokeShader.cpp:268
StrokeTextureStepShader_Type
PyTypeObject StrokeTextureStepShader_Type
Definition:
BPy_StrokeTextureStepShader.cpp:56
StrokeTextureStepShader___doc__
static char StrokeTextureStepShader___doc__[]
Definition:
BPy_StrokeTextureStepShader.cpp:21
StrokeTextureStepShader___init__
static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self, PyObject *args, PyObject *kwds)
Definition:
BPy_StrokeTextureStepShader.cpp:40
BPy_StrokeTextureStepShader.h
Freestyle::StrokeShaders::StrokeTextureStepShader
Definition:
BasicStrokeShaders.h:622
Freestyle
inherits from class Rep
Definition:
AppCanvas.cpp:18
BPy_StrokeTextureStepShader
Definition:
BPy_StrokeTextureStepShader.h:25
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1