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. --- .../UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp') diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index 7691cda9a30..6b0cd9d73a2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp @@ -106,12 +106,12 @@ int GetDirectionalViewMapDensityF1D___init__( BPy_GetDirectionalViewMapDensityF1 unsigned int u1, u2; float f = 2.0; - if( !PyArg_ParseTuple(args, "II|Of", &u1, &u2, &obj, &f) ) { + if( !PyArg_ParseTuple(args, "II|O!f", &u1, &u2, &IntegrationType_Type, &obj, &f) ) { cout << "ERROR: GetDirectionalViewMapDensityF1D___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_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(u1, u2, t, f); return 0; -- cgit v1.2.3