Pose: optimize pose rebuild for copy-on-write.
Ref T55442.
This commit is contained in:
parent
691471fe22
commit
9520fc0ff7
Notes:
blender-bot
2023-02-14 05:44:21 +01:00
Referenced by issue #55442, slow translate/rotate manipulator
|
@ -426,7 +426,7 @@ bPoseChannel *BKE_pose_channel_verify(bPose *pose, const char *name)
|
|||
return NULL;
|
||||
|
||||
/* See if this channel exists */
|
||||
chan = BLI_findstring(&pose->chanbase, name, offsetof(bPoseChannel, name));
|
||||
chan = BKE_pose_channel_find_name(pose, name);
|
||||
if (chan) {
|
||||
return chan;
|
||||
}
|
||||
|
@ -454,7 +454,9 @@ bPoseChannel *BKE_pose_channel_verify(bPose *pose, const char *name)
|
|||
chan->protectflag = OB_LOCK_ROT4D; /* lock by components by default */
|
||||
|
||||
BLI_addtail(&pose->chanbase, chan);
|
||||
BKE_pose_channels_hash_free(pose);
|
||||
if (pose->chanhash) {
|
||||
BLI_ghash_insert(pose->chanhash, chan->name, chan);
|
||||
}
|
||||
|
||||
return chan;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue