Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-05 17:14:14 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-05 17:14:14 +0400
commitd89d1aa09810a95fe2968a76393a102fabe8a146 (patch)
treeb77a30cd6117ca4bede5aff8e4179bc90bab0568 /source/blender/editors/util
parentfeefb4d2d25a1e09faaebadf53151ce8810eca04 (diff)
Fix #21992: linked objects could be in edit/particle/paint/sculpt mode,
not allowed, so disable mode on append and don't enable it on load.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/ed_util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 0c9ce9648c7..fbf2051f962 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -56,6 +56,7 @@ void ED_editors_init(bContext *C)
Main *bmain= CTX_data_main(C);
Scene *sce= CTX_data_scene(C);
Object *ob, *obact= (sce && sce->basact)? sce->basact->object: NULL;
+ ID *data;
/* toggle on modes for objects that were saved with these enabled. for
e.g. linked objects we have to ensure that they are actually the
@@ -65,8 +66,9 @@ void ED_editors_init(bContext *C)
if(mode && (mode != OB_MODE_POSE)) {
ob->mode= 0;
+ data= ob->data;
- if(ob == obact)
+ if(ob == obact && !ob->id.lib && !(data && data->lib))
ED_object_toggle_modes(C, mode);
}
}