Blender
V2.93
source
blender
freestyle
intern
python
StrokeShader
BPy_StrokeTextureStepShader.cpp
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*/
16
21
#include "
BPy_StrokeTextureStepShader.h
"
22
23
#include "../../stroke/BasicStrokeShaders.h"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
using namespace
Freestyle
;
30
32
33
//------------------------INSTANCE METHODS ----------------------------------
34
35
static
char
StrokeTextureStepShader___doc__
[] =
36
"Class hierarchy: :class:`freestyle.types.StrokeShader` > :class:`StrokeTextureStepShader`\n"
37
"\n"
38
"[Texture shader]\n"
39
"\n"
40
".. method:: __init__(step)\n"
41
"\n"
42
" Builds a StrokeTextureStepShader object.\n"
43
"\n"
44
" :arg step: The spacing along the stroke.\n"
45
" :type step: float\n"
46
"\n"
47
".. method:: shade(stroke)\n"
48
"\n"
49
" Assigns a spacing factor to the texture coordinates of the Stroke.\n"
50
"\n"
51
" :arg stroke: A Stroke object.\n"
52
" :type stroke: :class:`freestyle.types.Stroke`\n"
;
53
54
static
int
StrokeTextureStepShader___init__
(
BPy_StrokeTextureStepShader
*
self
,
55
PyObject *args,
56
PyObject *kwds)
57
{
58
static
const
char
*kwlist[] = {
"step"
,
nullptr
};
59
float
step = 0.1;
60
61
if
(!PyArg_ParseTupleAndKeywords(args, kwds,
"f"
, (
char
**)kwlist, &step)) {
62
return
-1;
63
}
64
self
->py_ss.ss =
new
StrokeShaders::StrokeTextureStepShader
(step);
65
return
0;
66
}
67
68
/*-----------------------BPy_StrokeTextureStepShader type definition ----------------------------*/
69
70
PyTypeObject
StrokeTextureStepShader_Type
= {
71
PyVarObject_HEAD_INIT(
nullptr
, 0)
"StrokeTextureStepShader"
,
/* tp_name */
72
sizeof
(
BPy_StrokeTextureStepShader
),
/* tp_basicsize */
73
0,
/* tp_itemsize */
74
nullptr
,
/* tp_dealloc */
75
0,
/* tp_vectorcall_offset */
76
nullptr
,
/* tp_getattr */
77
nullptr
,
/* tp_setattr */
78
nullptr
,
/* tp_reserved */
79
nullptr
,
/* tp_repr */
80
nullptr
,
/* tp_as_number */
81
nullptr
,
/* tp_as_sequence */
82
nullptr
,
/* tp_as_mapping */
83
nullptr
,
/* tp_hash */
84
nullptr
,
/* tp_call */
85
nullptr
,
/* tp_str */
86
nullptr
,
/* tp_getattro */
87
nullptr
,
/* tp_setattro */
88
nullptr
,
/* tp_as_buffer */
89
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
/* tp_flags */
90
StrokeTextureStepShader___doc__
,
/* tp_doc */
91
nullptr
,
/* tp_traverse */
92
nullptr
,
/* tp_clear */
93
nullptr
,
/* tp_richcompare */
94
0,
/* tp_weaklistoffset */
95
nullptr
,
/* tp_iter */
96
nullptr
,
/* tp_iternext */
97
nullptr
,
/* tp_methods */
98
nullptr
,
/* tp_members */
99
nullptr
,
/* tp_getset */
100
&
StrokeShader_Type
,
/* tp_base */
101
nullptr
,
/* tp_dict */
102
nullptr
,
/* tp_descr_get */
103
nullptr
,
/* tp_descr_set */
104
0,
/* tp_dictoffset */
105
(initproc)
StrokeTextureStepShader___init__
,
/* tp_init */
106
nullptr
,
/* tp_alloc */
107
nullptr
,
/* tp_new */
108
};
109
111
112
#ifdef __cplusplus
113
}
114
#endif
StrokeShader_Type
PyTypeObject StrokeShader_Type
Definition:
BPy_StrokeShader.cpp:282
StrokeTextureStepShader_Type
PyTypeObject StrokeTextureStepShader_Type
Definition:
BPy_StrokeTextureStepShader.cpp:70
StrokeTextureStepShader___doc__
static char StrokeTextureStepShader___doc__[]
Definition:
BPy_StrokeTextureStepShader.cpp:35
StrokeTextureStepShader___init__
static int StrokeTextureStepShader___init__(BPy_StrokeTextureStepShader *self, PyObject *args, PyObject *kwds)
Definition:
BPy_StrokeTextureStepShader.cpp:54
BPy_StrokeTextureStepShader.h
Freestyle::StrokeShaders::StrokeTextureStepShader
Definition:
BasicStrokeShaders.h:636
Freestyle
inherits from class Rep
Definition:
AppCanvas.cpp:32
BPy_StrokeTextureStepShader
Definition:
BPy_StrokeTextureStepShader.h:39
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1