From 6ba34d18b55bedbddb750e5231a2aec9a1fbbac0 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 14 Mar 2009 13:27:41 +0000 Subject: Fixed incorrect argument checking. --- .../intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python/BinaryPredicate1D') diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index c565daed2e2..f49908b0d8d 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -108,12 +108,12 @@ int ViewMapGradientNormBP1D___init__( BPy_ViewMapGradientNormBP1D* self, PyObjec PyObject *obj; float f = 2.0; - if(!( PyArg_ParseTuple(args, "i|Of", &i, &obj) )) { + if(!( PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) )) { cout << "ERROR: ViewMapGradientNormBP1D___init__" << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_bp1D.bp1D = new Predicates1D::ViewMapGradientNormBP1D(i,t,f); return 0; } -- cgit v1.2.3