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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-03 02:21:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-03 02:21:45 +0400
commit7bb1279279a07a5606e710dd7777c540e24b8549 (patch)
tree4475d4931de1b98ac53b8329df6ac680540e5436 /source
parent0c004723fe60fa93947d9c7ca4ec119a30a32372 (diff)
fix [#35489] mode_set() not working in background mode, Scene change doesn't change mode either
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/object/object_edit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 714de5251c6..0a69306928a 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -382,6 +382,11 @@ void ED_object_editmode_exit(bContext *C, int flag)
if (flag & EM_WAITCURSOR) waitcursor(1);
if (ED_object_editmode_load_ex(obedit, freedata) == false) {
+ /* in rare cases (background mode) its possible active object
+ * is flagged for editmode, without 'obedit' being set [#35489] */
+ if (UNLIKELY(scene->basact && (scene->basact->object->mode & OB_MODE_EDIT))) {
+ scene->basact->object->mode &= ~OB_MODE_EDIT;
+ }
if (flag & EM_WAITCURSOR) waitcursor(0);
return;
}