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/UnaryPredicate1D/BPy_ShapeUP1D.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/UnaryPredicate1D/BPy_ShapeUP1D.cpp')
-rw-r--r--source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
index 9e6e57c8d94..8af592b8923 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
@@ -11,14 +11,14 @@ extern "C" {
static char ShapeUP1D___doc__[] =
"Class hierarchy: :class:`UnaryPredicate1D` > :class:`ShapeUP1D`\n"
"\n"
-".. method:: __init__(idFirst, idSecond=0)\n"
+".. method:: __init__(first, second=0)\n"
"\n"
" Builds a ShapeUP1D object.\n"
"\n"
-" :arg idFirst: The first Id component.\n"
-" :type idFirst: int\n"
-" :arg idSecond: The second Id component.\n"
-" :type idSecond: int\n"
+" :arg first: The first Id component.\n"
+" :type first: int\n"
+" :arg second: The second Id component.\n"
+" :type second: int\n"
"\n"
".. method:: __call__(inter)\n"
"\n"
@@ -31,14 +31,14 @@ static char ShapeUP1D___doc__[] =
" user-specified Id.\n"
" :rtype: bool\n";
-static int ShapeUP1D___init__( BPy_ShapeUP1D* self, PyObject *args )
+static int ShapeUP1D___init__(BPy_ShapeUP1D* self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"first", "second", NULL};
unsigned u1, u2 = 0;
- if( !PyArg_ParseTuple(args, "I|I", &u1, &u2) )
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "I|I", (char **)kwlist, &u1, &u2))
return -1;
-
- self->py_up1D.up1D = new Predicates1D::ShapeUP1D(u1,u2);
+ self->py_up1D.up1D = new Predicates1D::ShapeUP1D(u1, u2);
return 0;
}