Fix crash happening in some cases with MakeLocal operator.
Culprit here was once more proxies. Think what was happening here was: 1) Both proxy and proxified armatures' PoseChannels were cleared (needed after remapping due to Bone pointers being stored in pchans). 2) Proxy PoseChannels got rebuilt in `BKE_pose_rebuild_ex()`, which ends, in proxy cases, by actually replacing rebuilt pchans by those from the proxified object... which has not yet been rebuilt. Fixed the issue by merely adding bone pointer to data copied from original pchan into new 'from proxy' one... Sounds much, much safer and sanier anyway, that way we can be sure bone pointer is actually pointing to a bone of the object's armature (this is supposed to be the same Armature datablock between proxy and proxified objects, but that may not be always true especially during makelocal process).
This commit is contained in:
parent
7d33d4439f
commit
ed957768a0
|
@ -1795,6 +1795,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
|
|||
|
||||
/* copy posechannel to temp, but restore important pointers */
|
||||
pchanw = *pchanp;
|
||||
pchanw.bone = pchan->bone;
|
||||
pchanw.prev = pchan->prev;
|
||||
pchanw.next = pchan->next;
|
||||
pchanw.parent = pchan->parent;
|
||||
|
|
Loading…
Reference in New Issue