diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-27 03:46:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-27 03:46:54 +0400 |
commit | 4af9004efaab812c17ab5450da67e9ac0c6e9f42 (patch) | |
tree | 51f2c85f3f2ff151f0d630482f4562fa9ae78d06 | |
parent | 36d25daa096484a99a689d42016f790d4399aa2c (diff) |
fix [#34776] Linking the group in this .blend causes crash with this starting scene
disallow linked objects to be in editmode.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fe7f66e73fa..7399bfec2b5 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4774,11 +4774,14 @@ static void direct_link_object(FileData *fd, Object *ob) /* weak weak... this was only meant as draw flag, now is used in give_base_to_objects too */ ob->flag &= ~OB_FROMGROUP; - + /* loading saved files with editmode enabled works, but for undo we like - * to stay in object mode during undo presses so keep editmode disabled */ - if (fd->memfile) + * to stay in object mode during undo presses so keep editmode disabled. + * + * Also when linking in a file don't allow editmode: [#34776] */ + if (fd->memfile || (ob->id.flag & (LIB_EXTERN | LIB_INDIRECT))) { ob->mode &= ~(OB_MODE_EDIT | OB_MODE_PARTICLE_EDIT); + } ob->disp.first = ob->disp.last = NULL; |