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:
authorBastien Montagne <bastien@blender.org>2020-10-02 16:38:02 +0300
committerBastien Montagne <bastien@blender.org>2020-10-02 18:40:51 +0300
commit619e52eb82744c9dc2a403a0aa12fa9e9141fe3b (patch)
tree0c90ad430006df4f502a35fd32ef474b20fa8c8f
parent5fc992e76aeeedf1955c9d7c561fb8b7c8a398a5 (diff)
Fix T81345: Part one: Missing handling of ID pointers from EditBone IDProperties.
So far data management code would simply fully ignore potential ID pointers in custom properties of edit bones (which are a copy of those from regular `Bone`). This would lead to all kind of issues, among which refcounting inconsistencies, missing clearing of data uppon deletion, etc.
-rw-r--r--source/blender/blenkernel/intern/armature.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 49ca25aca29..af9ce7c34ac 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -160,12 +160,24 @@ static void armature_foreach_id_bone(Bone *bone, LibraryForeachIDData *data)
}
}
+static void armature_foreach_id_editbone(EditBone *edit_bone, LibraryForeachIDData *data)
+{
+ IDP_foreach_property(
+ edit_bone->prop, IDP_TYPE_FILTER_ID, BKE_lib_query_idpropertiesForeachIDLink_callback, data);
+}
+
static void armature_foreach_id(ID *id, LibraryForeachIDData *data)
{
bArmature *arm = (bArmature *)id;
LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) {
armature_foreach_id_bone(bone, data);
}
+
+ if (arm->edbo != NULL) {
+ LISTBASE_FOREACH (EditBone *, edit_bone, arm->edbo) {
+ armature_foreach_id_editbone(edit_bone, data);
+ }
+ }
}
static void write_bone(BlendWriter *writer, Bone *bone)