Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-23 05:12:23 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-23 05:12:23 +0400
commit68b0a8e39026ea2b391751406dc4bdb0a4ed958c (patch)
treecdf8a143a6cf2b832f49a31c2d3b7003f92eaa43 /source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
parent0fb83d78faa99a8ea3fd396887b2b31a6a36a8cd (diff)
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.
Diffstat (limited to 'source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp')
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
index 398587df23e..fe051ebaed4 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp
@@ -15,16 +15,16 @@ static char IncreasingThicknessShader___doc__[] =
"\n"
"[Thickness shader]\n"
"\n"
-".. method:: __init__(iThicknessA, iThicknessB)\n"
+".. method:: __init__(thickness_A, thickness_B)\n"
"\n"
" Builds an IncreasingThicknessShader object.\n"
"\n"
-" :arg iThicknessA: The first thickness value.\n"
-" :type iThicknessA: float\n"
-" :arg iThicknessB: The second thickness value.\n"
-" :type iThicknessB: float\n"
+" :arg thickness_A: The first thickness value.\n"
+" :type thickness_A: float\n"
+" :arg thickness_B: The second thickness value.\n"
+" :type thickness_B: float\n"
"\n"
-".. method:: shade(s)\n"
+".. method:: shade(stroke)\n"
"\n"
" Assigns thicknesses values such as the thickness increases from a\n"
" thickness value A to a thickness value B between the first vertex\n"
@@ -32,16 +32,16 @@ static char IncreasingThicknessShader___doc__[] =
" this midpoint vertex and the last vertex. The thickness is\n"
" linearly interpolated from A to B.\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 IncreasingThicknessShader___init__( BPy_IncreasingThicknessShader* self, PyObject *args)
+static int IncreasingThicknessShader___init__(BPy_IncreasingThicknessShader* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"thickness_A", "thickness_B", NULL};
float f1, f2;
- if(!( PyArg_ParseTuple(args, "ff", &f1, &f2) ))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ff", (char **)kwlist, &f1, &f2))
return -1;
-
self->py_ss.ss = new StrokeShaders::IncreasingThicknessShader(f1, f2);
return 0;
}