From 4af9004efaab812c17ab5450da67e9ac0c6e9f42 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 26 Mar 2013 23:46:54 +0000 Subject: fix [#34776] Linking the group in this .blend causes crash with this starting scene disallow linked objects to be in editmode. --- source/blender/blenloader/intern/readfile.c | 9 ++++++--- 1 file 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; -- cgit v1.2.3