diff options
author | Bastien Montagne <bastien@blender.org> | 2020-08-27 17:50:01 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-08-28 15:53:22 +0300 |
commit | df8a63bb9c0a7090562e3f33c5da80d5dafa386d (patch) | |
tree | 22953a4bdce37c0cc0dbb0294d9651861ef328bf /source/blender/blenkernel/intern/lib_remap.c | |
parent | 65dcf812a5e33285fb0726ca478210cf4e565a93 (diff) |
Fix T80078: Overrides: Crash with animated IK control on linked armature.
Issue was with our dear posebones again... when applying overrides we
keep the same address/pointer for the IDs themselves, (which avoids us
the need to remap their usages), but their inner data is often
re-allocated.
Therefore, we need once again to go over armature objects and invalidate
their posebone pointers.
This should also be back-ported to Blender LTS 2.83.
Maniphest Tasks: T80078
Differential Revision: https://developer.blender.org/D8734
Diffstat (limited to 'source/blender/blenkernel/intern/lib_remap.c')
-rw-r--r-- | source/blender/blenkernel/intern/lib_remap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c index d4246056efe..c88513ec2af 100644 --- a/source/blender/blenkernel/intern/lib_remap.c +++ b/source/blender/blenkernel/intern/lib_remap.c @@ -244,17 +244,17 @@ static void libblock_remap_data_preprocess(IDRemap *r_id_remap_data) ID *old_id = r_id_remap_data->old_id; if (!old_id || GS(old_id->name) == ID_AR) { Object *ob = (Object *)r_id_remap_data->id_owner; - /* Object's pose holds reference to armature bones... sic */ - /* Note that in theory, we should have to bother about - * linked/non-linked/never-null/etc. flags/states. + /* Object's pose holds reference to armature bones. sic */ + /* Note that in theory, we should have to bother about linked/non-linked/never-null/etc. + * flags/states. * Fortunately, this is just a tag, so we can accept to 'over-tag' a bit for pose recalc, * and avoid another complex and risky condition nightmare like the one we have in - * foreach_libblock_remap_callback()... */ + * foreach_libblock_remap_callback(). */ if (ob->pose && (!old_id || ob->data == old_id)) { BLI_assert(ob->type == OB_ARMATURE); ob->pose->flag |= POSE_RECALC; - /* We need to clear pose bone pointers immediately, things like undo writefile may be - * called before pose is actually recomputed, can lead to segfault... */ + /* We need to clear pose bone pointers immediately, some code may access those before + * pose is actually recomputed, which can lead to segfault. */ BKE_pose_clear_pointers(ob->pose); } } |