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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-25 16:22:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-25 16:29:20 +0300
commitcc7460eaa491ed020acdc8f863cd521688fad01c (patch)
tree4879ad6b846217936c41c47aa4014be7f2a08646 /source/blender/editors/util
parent4b8d7a143e491611581dc1e749e34eaec67e4377 (diff)
Fix multi-edit mode on file load
Setting up the initial object mode would change objects which were already moved into their mode along with the active object.
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 d3a9c22bc73..61a70d2da42 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -56,6 +56,7 @@
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_multires.h"
+#include "BKE_object.h"
#include "BKE_packedFile.h"
#include "BKE_paint.h"
#include "BKE_screen.h"
@@ -113,7 +114,8 @@ void ED_editors_init(bContext *C)
if (mode == OB_MODE_OBJECT) {
/* pass */
}
- else {
+ else if (!BKE_object_has_mode_data(ob, mode)) {
+ /* For multi-edit mode we may already have mode data. */
ID *data = ob->data;
ob->mode = OB_MODE_OBJECT;
if ((ob == obact) && !ID_IS_LINKED(ob) && !(data && ID_IS_LINKED(data))) {