[ #3712 ] Calling makeEditable() and update() on an armature twice duplicates bones
authorJoseph Gilbert <ascotan@gmail.com>
Wed, 4 Jan 2006 15:07:15 +0000 (15:07 +0000)
committerJoseph Gilbert <ascotan@gmail.com>
Wed, 4 Jan 2006 15:07:15 +0000 (15:07 +0000)
* fixes bug where editbones are not freed on calling update()

source/blender/python/api2_2x/Armature.c

index 2154b28988af678e9ea5d9f1474ed29591b6b751..13e2f230100070d2c2909bc17cc28474a13c9028 100644 (file)
@@ -465,6 +465,7 @@ static PyObject *Armature_update(BPy_Armature *self)
                if (!BonesDict_InitBones(self->Bones))
                        return NULL;
                self->Bones->editmode_flag = 0;
+               BLI_freelistN(&self->Bones->editbones);
        }else{
                goto AttributeError;
        }