diff options
author | Bastien Montagne <bastien@blender.org> | 2020-10-02 18:38:28 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-10-02 18:40:51 +0300 |
commit | 0db98b214d468864630fc9bba72be4ff9b2548e5 (patch) | |
tree | 5aaef5682703c722d4827616eb160656aff05f68 /source/blender/editors/armature/editarmature_undo.c | |
parent | 4b36552967bf55b1bf707acd3917280b42b12c52 (diff) |
Fix T81345: part four, fix handling of IDProperties in edit armature undo.
Specific armature editing undo code would duplicate and store a list of
editbones. However, those are not linked to main data storage and should
therefore never affect ID usercounting.
Diffstat (limited to 'source/blender/editors/armature/editarmature_undo.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_undo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/armature/editarmature_undo.c b/source/blender/editors/armature/editarmature_undo.c index bdb08abbf2c..c217b615db6 100644 --- a/source/blender/editors/armature/editarmature_undo.c +++ b/source/blender/editors/armature/editarmature_undo.c @@ -64,8 +64,8 @@ static void undoarm_to_editarm(UndoArmature *uarm, bArmature *arm) { EditBone *ebone; - ED_armature_ebone_listbase_free(arm->edbo); - ED_armature_ebone_listbase_copy(arm->edbo, &uarm->lb); + ED_armature_ebone_listbase_free(arm->edbo, true); + ED_armature_ebone_listbase_copy(arm->edbo, &uarm->lb, true); /* active bone */ if (uarm->act_edbone) { @@ -86,7 +86,7 @@ static void *undoarm_from_editarm(UndoArmature *uarm, bArmature *arm) /* TODO: include size of ID-properties. */ uarm->undo_size = 0; - ED_armature_ebone_listbase_copy(&uarm->lb, arm->edbo); + ED_armature_ebone_listbase_copy(&uarm->lb, arm->edbo, false); /* active bone */ if (arm->act_edbone) { @@ -105,7 +105,7 @@ static void *undoarm_from_editarm(UndoArmature *uarm, bArmature *arm) static void undoarm_free_data(UndoArmature *uarm) { - ED_armature_ebone_listbase_free(&uarm->lb); + ED_armature_ebone_listbase_free(&uarm->lb, false); } static Object *editarm_object_from_context(bContext *C) |