forked from bartvdbraak/blender
Python API
---------- Bugfix #7877: fix for lamp.setMode() and lamp.setType(): need to build tuples instead of just int or float objects.
This commit is contained in:
parent
37d11907d0
commit
3bbf0736b2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user