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_ConstrainedIncreasingThicknessShader.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_ConstrainedIncreasingThicknessShader.cpp')
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
index 3892ccca37b..3abf2716695 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp
@@ -15,33 +15,33 @@ static char ConstrainedIncreasingThicknessShader___doc__[] =
"\n"
"[Thickness shader]\n"
"\n"
-".. method:: __init__(iThicknessMin, iThicknessMax, iRatio)\n"
+".. method:: __init__(thickness_min, thickness_max, ratio)\n"
"\n"
" Builds a ConstrainedIncreasingThicknessShader object.\n"
"\n"
-" :arg iThicknessMin: The minimum thickness.\n"
-" :type iThicknessMin: float\n"
-" :arg iThicknessMax: The maximum thickness.\n"
-" :type iThicknessMax: float\n"
-" :arg iRatio: The thickness/length ratio that we don't want to exceed. \n"
-" :type iRatio: float\n"
+" :arg thickness_min: The minimum thickness.\n"
+" :type thickness_min: float\n"
+" :arg thickness_max: The maximum thickness.\n"
+" :type thickness_max: float\n"
+" :arg ratio: The thickness/length ratio that we don't want to exceed. \n"
+" :type ratio: float\n"
"\n"
-".. method:: shade(s)\n"
+".. method:: shade(stroke)\n"
"\n"
" Same as the :class:`IncreasingThicknessShader`, but here we allow\n"
" the user to control the thickness/length ratio so that we don't get\n"
" fat short lines.\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 ConstrainedIncreasingThicknessShader___init__( BPy_ConstrainedIncreasingThicknessShader* self, PyObject *args)
+static int ConstrainedIncreasingThicknessShader___init__(BPy_ConstrainedIncreasingThicknessShader* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"thickness_min", "thickness_max", "ratio", NULL};
float f1, f2, f3;
- if(!( PyArg_ParseTuple(args, "fff", &f1, &f2, &f3) ))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "fff", (char **)kwlist, &f1, &f2, &f3))
return -1;
-
self->py_ss.ss = new StrokeShaders::ConstrainedIncreasingThicknessShader(f1, f2, f3);
return 0;
}