From bb5ae49992ba1b68d8c041699b12689e56442295 Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Sun, 21 Aug 2005 15:00:17 +0000 Subject: A large collection of fixes from Ken Hughes including: - corrections to constants - parameter type checking - correct use of METH_VARARGS vs METH_NOARGS - return objects instead of strings in Scene.getChildren() as per doc. - correct logical operators Thanks, Ken! --- source/blender/python/api2_2x/Texture.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/python/api2_2x/Texture.c') diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c index a342494d63f..86e6ecc63ee 100644 --- a/source/blender/python/api2_2x/Texture.c +++ b/source/blender/python/api2_2x/Texture.c @@ -1068,9 +1068,9 @@ static PyObject *Texture_setContrast( BPy_Texture * self, PyObject * args ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected a float" ); - if( contrast < 0 || contrast > 2 ) + if( contrast < 0.01 || contrast > 5.0 ) return EXPP_ReturnPyObjError( PyExc_ValueError, - "contrast must be in range [0,2]" ); + "contrast must be in range [0.01,5.0]" ); self->texture->contrast = contrast; @@ -1637,9 +1637,9 @@ static PyObject *Texture_setExp( BPy_Texture * self, PyObject * args ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected a float" ); - if( vn_mexp < 0 || vn_mexp > 10 ) + if( vn_mexp < 0.01 || vn_mexp > 10.0 ) return EXPP_ReturnPyObjError( PyExc_ValueError, - "Exp must be in range [0,10]" ); + "Exp must be in range [0.01,10.0]" ); self->texture->vn_mexp = vn_mexp; -- cgit v1.2.3