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/Pose.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/Pose.c')
-rw-r--r-- | source/blender/python/api2_2x/Pose.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/python/api2_2x/Pose.c b/source/blender/python/api2_2x/Pose.c index 39086a14881..76f875650e7 100644 --- a/source/blender/python/api2_2x/Pose.c +++ b/source/blender/python/api2_2x/Pose.c @@ -180,9 +180,9 @@ static PyObject *PoseBonesDict_GetItem(BPy_PoseBonesDict *self, PyObject* key) PyObject *value = NULL; value = PyDict_GetItem(self->bonesMap, key); - if(value == NULL){ - return EXPP_incr_ret(Py_None); - } + if(value == NULL) + Py_RETURN_NONE; + return EXPP_incr_ret(value); } //------------------TYPE_OBECT DEFINITION-------------------------- @@ -290,7 +290,7 @@ static PyObject *Pose_update(BPy_Pose *self) if(daddy) where_is_pose(daddy); - return EXPP_incr_ret(Py_None); + Py_RETURN_NONE; } //------------------------tp_methods //This contains a list of all methods the object contains @@ -513,7 +513,7 @@ static PyObject *PoseBone_insertKey(BPy_PoseBone *self, PyObject *args) //update the IPOs remake_action_ipos (((BPy_Object*)parent_object)->object->action); - return EXPP_incr_ret(Py_None); + Py_RETURN_NONE; AttributeError: return EXPP_objError(PyExc_AttributeError, "%s%s%s", @@ -941,11 +941,10 @@ static int PoseBone_setSelect(BPy_PoseBone *self, PyObject *value, void *closure //Gets the pose bones selection static PyObject *PoseBone_getParent(BPy_PoseBone *self, void *closure) { - if (self->posechannel->parent) { + if (self->posechannel->parent) return PyPoseBone_FromPosechannel(self->posechannel->parent); - } else { - return EXPP_incr_ret(Py_None); - } + else + Py_RETURN_NONE; } //------------------TYPE_OBECT IMPLEMENTATION--------------------------- @@ -1060,7 +1059,7 @@ PyObject *Pose_Init(void) //Initializes TypeObject.ob_type if (PyType_Ready(&Pose_Type) < 0 || PyType_Ready(&PoseBone_Type) < 0 || PyType_Ready(&PoseBonesDict_Type) < 0) { - return EXPP_incr_ret(Py_None); + Py_RETURN_NONE; } //Register the module @@ -1105,7 +1104,7 @@ PyObject *PyPose_FromPose(bPose *pose, char *name) return (PyObject*)py_pose; }else{ - return EXPP_incr_ret(Py_None); + Py_RETURN_NONE; } RuntimeError: @@ -1125,7 +1124,7 @@ PyObject *PyPoseBone_FromPosechannel(bPoseChannel *pchan) py_posechannel->posechannel = pchan; return (PyObject*)py_posechannel; }else{ - return EXPP_incr_ret(Py_None); + Py_RETURN_NONE; } RuntimeError: |