2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* ***** END GPL LICENSE BLOCK *****
21
/** \file source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp
25
#include "BPy_fstreamShader.h"
27
#include "../../stroke/AdvancedStrokeShaders.h"
33
///////////////////////////////////////////////////////////////////////////////////////////
35
//------------------------INSTANCE METHODS ----------------------------------
37
static char fstreamShader___doc__[] =
38
"Class hierarchy: :class:`StrokeShader` > :class:`fstreamShader`\n"
42
".. method:: __init__(filename)\n"
44
" Builds a fstreamShader object.\n"
46
" :arg filename: The output file name.\n"
47
" :type filename: str\n"
49
".. method:: shade(stroke)\n"
51
" Streams the Stroke in a file.\n"
53
" :arg stroke: A Stroke object.\n"
54
" :type stroke: :class:`Stroke`\n";
56
static int fstreamShader___init__(BPy_fstreamShader *self, PyObject *args, PyObject *kwds)
58
static const char *kwlist[] = {"filename", NULL};
61
if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &s))
63
self->py_ss.ss = new StrokeShaders::fstreamShader(s);
67
/*-----------------------BPy_fstreamShader type definition ------------------------------*/
69
PyTypeObject fstreamShader_Type = {
70
PyVarObject_HEAD_INIT(NULL, 0)
71
"fstreamShader", /* tp_name */
72
sizeof(BPy_fstreamShader), /* tp_basicsize */
81
0, /* tp_as_sequence */
82
0, /* tp_as_mapping */
89
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
90
fstreamShader___doc__, /* tp_doc */
93
0, /* tp_richcompare */
94
0, /* tp_weaklistoffset */
100
&StrokeShader_Type, /* tp_base */
102
0, /* tp_descr_get */
103
0, /* tp_descr_set */
104
0, /* tp_dictoffset */
105
(initproc)fstreamShader___init__, /* tp_init */
110
///////////////////////////////////////////////////////////////////////////////////////////