diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-12-27 08:04:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-12-27 08:04:20 +0300 |
commit | 9afe662c125fec5cf62b3976bf32194838f0d740 (patch) | |
tree | 97fc847b9379eef836801dcafad0cd92e38cb371 /source/blender/python/api2_2x/Lamp.c | |
parent | ed2f161c72722b90a1c4e15f998ca678b79e94b0 (diff) |
renameing datablocks was imposing a name limit on the python side.
This isnt needed because the limit is alredy being set by rename_id()
some other minor changed- use None returning maro
Diffstat (limited to 'source/blender/python/api2_2x/Lamp.c')
-rw-r--r-- | source/blender/python/api2_2x/Lamp.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index 8ee188f2f2d..0ccc408e434 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -653,10 +653,8 @@ static PyObject *M_Lamp_New( PyObject * self, PyObject * args, if( strcmp( name_str, "LampData" ) == 0 ) return ( PyObject * ) py_lamp; - else { /* user gave us a name for the lamp, use it */ - PyOS_snprintf( buf, sizeof( buf ), "%s", name_str ); - rename_id( &bl_lamp->id, buf ); - } + else /* user gave us a name for the lamp, use it */ + rename_id( &bl_lamp->id, name_str ); return ( PyObject * ) py_lamp; } @@ -1448,10 +1446,8 @@ static PyObject *Lamp_getIpo( BPy_Lamp * self ) { struct Ipo *ipo = self->lamp->ipo; - if( !ipo ) { - Py_INCREF( Py_None ); - return Py_None; - } + if( !ipo ) + Py_RETURN_NONE; return Ipo_CreatePyObject( ipo ); } @@ -1547,7 +1543,7 @@ static PyObject *Lamp_insertIpoKey( BPy_Lamp * self, PyObject * args ) EXPP_allqueue(REDRAWACTION, 0); EXPP_allqueue(REDRAWNLA, 0); - return EXPP_incr_ret( Py_None ); + Py_RETURN_NONE; } static PyObject *Lamp_getModesConst( void ) |