Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenkernel/intern/armature.c8
-rw-r--r--source/blender/editors/armature/armature_utils.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index d7ed92b69b7..975190f0fb5 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -141,7 +141,7 @@ typedef struct PoseTree {
struct bArmature *BKE_armature_add(struct Main *bmain, const char *name);
struct bArmature *BKE_armature_from_object(struct Object *ob);
int BKE_armature_bonelist_count(struct ListBase *lb);
-void BKE_armature_bonelist_free(struct ListBase *lb);
+void BKE_armature_bonelist_free(struct ListBase *lb, const bool do_id_user);
struct bArmature *BKE_armature_copy(struct Main *bmain, const struct bArmature *arm);
void BKE_armature_copy_bone_transforms(struct bArmature *armature_dst,
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index af9ce7c34ac..3d91d22e139 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -139,7 +139,7 @@ static void armature_free_data(struct ID *id)
bArmature *armature = (bArmature *)id;
BKE_armature_bone_hash_free(armature);
- BKE_armature_bonelist_free(&armature->bonebase);
+ BKE_armature_bonelist_free(&armature->bonebase, false);
/* free editmode data */
if (armature->edbo) {
@@ -357,15 +357,15 @@ int BKE_armature_bonelist_count(ListBase *lb)
return i;
}
-void BKE_armature_bonelist_free(ListBase *lb)
+void BKE_armature_bonelist_free(ListBase *lb, const bool do_id_user)
{
Bone *bone;
for (bone = lb->first; bone; bone = bone->next) {
if (bone->prop) {
- IDP_FreeProperty(bone->prop);
+ IDP_FreeProperty_ex(bone->prop, do_id_user);
}
- BKE_armature_bonelist_free(&bone->childbase);
+ BKE_armature_bonelist_free(&bone->childbase, do_id_user);
}
BLI_freelistN(lb);
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index 1c8c5ba9d94..29df8b31819 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -695,7 +695,7 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm)
/* armature bones */
BKE_armature_bone_hash_free(arm);
- BKE_armature_bonelist_free(&arm->bonebase);
+ BKE_armature_bonelist_free(&arm->bonebase, true);
arm->act_bone = NULL;
/* remove zero sized bones, this gives unstable restposes */