Commit: cc7460eaa491ed020acdc8f863cd521688fad01c
Author: Campbell Barton
Date:   Wed Apr 25 15:22:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBcc7460eaa491ed020acdc8f863cd521688fad01c

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.

===================================================================

M       source/blender/editors/util/ed_util.c

===================================================================

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))) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to