From 9afe662c125fec5cf62b3976bf32194838f0d740 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Dec 2006 05:04:20 +0000 Subject: 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 --- source/blender/python/api2_2x/NLA.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'source/blender/python/api2_2x/NLA.c') diff --git a/source/blender/python/api2_2x/NLA.c b/source/blender/python/api2_2x/NLA.c index f729d2cf99b..61d5c447418 100644 --- a/source/blender/python/api2_2x/NLA.c +++ b/source/blender/python/api2_2x/NLA.c @@ -260,7 +260,6 @@ static PyObject *Action_getName( BPy_Action * self ) static PyObject *Action_setName( BPy_Action * self, PyObject * args ) { char *name; - char buf[21]; if( !self->action ) ( EXPP_ReturnPyObjError( PyExc_RuntimeError, @@ -271,8 +270,7 @@ static PyObject *Action_setName( BPy_Action * self, PyObject * args ) "expected string argument" ) ); /*change name*/ - PyOS_snprintf( buf, sizeof( buf ), "%s", name ); - rename_id( &self->action->id, buf); + rename_id( &self->action->id, name); Py_RETURN_NONE; } @@ -371,8 +369,7 @@ static PyObject *Action_verifyChannel( BPy_Action * self, PyObject * args ) chan = verify_action_channel(self->action, chanName); - Py_INCREF( Py_None ); - return Py_None; + Py_RETURN_NONE; } @@ -400,8 +397,7 @@ static PyObject *Action_removeChannel( BPy_Action * self, PyObject * args ) /*remove channel*/ BLI_freelinkN( &self->action->chanbase, chan ); - Py_INCREF( Py_None ); - return ( Py_None ); + Py_RETURN_NONE; } static PyObject *Action_getAllChannelIpos( BPy_Action * self ) -- cgit v1.2.3