Freestyle Python API improvements - part 7.

Fix for PyGetSetDef and proper handling of keyword arguments were done in
UnaryPredicate0D, UnaryPredicate1D, BinaryPredicate1D, and StrokeShader classes.
Style modules were updated accordingly.  Additional code clean-up was also made.
This commit is contained in:
2013-02-23 01:12:23 +00:00
parent 0fb83d78fa
commit 68b0a8e390
51 changed files with 654 additions and 615 deletions

View File

@@ -22,20 +22,20 @@ static char SamplingShader___doc__[] =
" :arg sampling: The sampling to use for the stroke resampling.\n"
" :type sampling: float\n"
"\n"
".. method:: shade(s)\n"
".. method:: shade(stroke)\n"
"\n"
" Resamples the stroke.\n"
"\n"
" :arg s: A Stroke object.\n"
" :type s: :class:`Stroke`\n";
" :arg stroke: A Stroke object.\n"
" :type stroke: :class:`Stroke`\n";
static int SamplingShader___init__( BPy_SamplingShader* self, PyObject *args)
static int SamplingShader___init__(BPy_SamplingShader* self, PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"sampling", NULL};
float f;
if(!( PyArg_ParseTuple(args, "f", &f) ))
if (!PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist, &f))
return -1;
self->py_ss.ss = new StrokeShaders::SamplingShader(f);
return 0;
}