diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-08-18 01:36:56 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-08-18 01:36:56 +0400 |
commit | 66bd3fbd1873745ffe234078aa0282a3b675010e (patch) | |
tree | 9b775db76d8e426dda580d5992538c0ca616b2d3 /source/blender/python/api2_2x/Armature.c | |
parent | 40ef1c9f96f4b62cf50dc8b983c316ca39f68dd2 (diff) |
===Python API===
Bugfix #4886: deleting a bone would disconnect bones when it shouldn't have.
Thanks to Michael Ward (easybreasy) for locating the problem.
Diffstat (limited to 'source/blender/python/api2_2x/Armature.c')
-rw-r--r-- | source/blender/python/api2_2x/Armature.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c index e7cb301b64d..c7886340dc7 100644 --- a/source/blender/python/api2_2x/Armature.c +++ b/source/blender/python/api2_2x/Armature.c @@ -324,12 +324,12 @@ static int BonesDict_SetItem(BPy_BonesDict *self, PyObject *key, PyObject *value /*this is ugly but you have to set the parent to NULL for else editbones_to_armature will crash looking for this bone*/ for (editbone = self->editbones.first; editbone; editbone = editbone->next){ - if (editbone->parent == editbone_for_deletion->editbone) + if (editbone->parent == editbone_for_deletion->editbone) { editbone->parent = NULL; - /*any parent's were connected to this we must remove the flag - or else the 'root' ball doesn't get draw*/ - if (editbone->flag & BONE_CONNECTED) - editbone->flag &= ~BONE_CONNECTED; + /* remove the connected flag or else the 'root' ball + * doesn't get drawn */ + editbone->flag &= ~BONE_CONNECTED; + } } BLI_freelinkN(&self->editbones, editbone_for_deletion->editbone); if(PyDict_DelItem(self->editbonesMap, key) == -1) @@ -1263,7 +1263,7 @@ static PyObject *M_Armature_New(PyObject * self, PyObject * args) armature= add_armature(); armature->id.us = 0; - obj = PyArmature_FromArmature(armature); //*new* + obj = (BPy_Armature *)PyArmature_FromArmature(armature); /*new*/ if( !obj ) return EXPP_ReturnPyObjError( PyExc_RuntimeError, |