Fix T42780: Object linking allows to have linked armatures in pose mode

This isn't so bad for until one goes re-posing the armature and then uses undo.

It is the same issue as with edit mode which was solved back in the days.
This commit is contained in:
Sergey Sharybin 2014-12-30 21:33:15 +05:00
parent cefb764269
commit 016bbc8793
Notes: blender-bot 2023-02-14 10:14:07 +01:00
Referenced by issue #42780, Undo inserted keyframes of Linked Objects Closes Blender
1 changed files with 4 additions and 2 deletions

View File

@ -4910,9 +4910,11 @@ static void direct_link_object(FileData *fd, Object *ob)
/* loading saved files with editmode enabled works, but for undo we like
* to stay in object mode during undo presses so keep editmode disabled.
*
* Also when linking in a file don't allow editmode: [#34776] */
* Also when linking in a file don't allow edit and pose modes.
* See [#34776, #42780] for more information.
*/
if (fd->memfile || (ob->id.flag & (LIB_EXTERN | LIB_INDIRECT))) {
ob->mode &= ~(OB_MODE_EDIT | OB_MODE_PARTICLE_EDIT);
ob->mode &= ~(OB_MODE_EDIT | OB_MODE_PARTICLE_EDIT | OB_MODE_POSE);
}
ob->adt = newdataadr(fd, ob->adt);