From 3bbf0736b26e80201dced29dc55f18438fb46e69 Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Thu, 6 Dec 2007 20:15:03 +0000 Subject: [PATCH] Python API ---------- Bugfix #7877: fix for lamp.setMode() and lamp.setType(): need to build tuples instead of just int or float objects. --- source/blender/python/api2_2x/Lamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index d40cc5a2cfc..f864570395a 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -1503,7 +1503,7 @@ static PyObject *Lamp_oldsetType( BPy_Lamp * self, PyObject * value ) /* build tuple, call wrapper */ - arg = PyInt_FromLong( (long)type ); + arg = Py_BuildValue( "(i)", type ); error = EXPP_setterWrapper ( (void *)self, arg, (setter)Lamp_setType ); Py_DECREF ( arg ); return error; @@ -1562,7 +1562,7 @@ static PyObject *Lamp_oldsetMode( BPy_Lamp * self, PyObject * args ) /* build tuple, call wrapper */ - value = PyInt_FromLong( (long)flag ); + value = Py_BuildValue( "(i)", flag ); error = EXPP_setterWrapper ( (void *)self, value, (setter)Lamp_setMode ); Py_DECREF ( value ); return error;