diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-02-23 05:12:23 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-02-23 05:12:23 +0400 |
commit | 68b0a8e39026ea2b391751406dc4bdb0a4ed958c (patch) | |
tree | cdf8a143a6cf2b832f49a31c2d3b7003f92eaa43 /source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp | |
parent | 0fb83d78faa99a8ea3fd396887b2b31a6a36a8cd (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_WithinImageBoundaryUP1D.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp index 9beae103113..14cc70917df 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp @@ -28,11 +28,12 @@ static char WithinImageBoundaryUP1D___doc__[] = "\n" " Returns true if the Interface1D intersects with image boundary.\n"; -static int WithinImageBoundaryUP1D___init__( BPy_WithinImageBoundaryUP1D* self, PyObject *args ) +static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D* self, PyObject *args, PyObject *kwds) { + static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", NULL}; double xmin, ymin, xmax, ymax; - if(!( PyArg_ParseTuple(args, "dddd", &xmin, &ymin, &xmax, &ymax) )) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax)) return -1; self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax); return 0; |