[Bf-blender-cvs] [619e52eb827] master: Fix T81345: Part one: Missing handling of ID pointers from EditBone IDProperties.
Bastien Montagne
noreply at git.blender.org
Fri Oct 2 17:46:30 CEST 2020
Commit: 619e52eb82744c9dc2a403a0aa12fa9e9141fe3b
Author: Bastien Montagne
Date: Fri Oct 2 15:38:02 2020 +0200
Branches: master
https://developer.blender.org/rB619e52eb82744c9dc2a403a0aa12fa9e9141fe3b
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.
===================================================================
M source/blender/blenkernel/intern/armature.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list