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:
authorDalai Felinto <dfelinto@gmail.com>2019-06-26 00:00:33 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-06-26 00:03:18 +0300
commit7037ff9204475ae4dd19926b55382d558fc12a62 (patch)
tree284fc8594cba07598d12fa6b1b8cdb2d740fd61c /source/blender/editors/util
parentf24f70b16252c09507e2ce41391935472ea1b8f0 (diff)
Partial fix to T66126: Non-Active Grease Pencil object stuck in drawmode
This only handles the issue after file load. To make it an all-around solution we need to deal with this in ed_object_select_pick, do_outliner_item_activate_tree_element(), ...
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/ed_util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index e751c7263cb..1ee8ff6966c 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -126,8 +126,12 @@ void ED_editors_init(bContext *C)
continue;
}
else if (ob->type == OB_GPENCIL) {
- /* For multi-edit mode we may already have mode data.
- * (grease pencil does not need it) */
+ /* For multi-edit mode we may already have mode data (grease pencil does not need it).
+ * However we may have a non-active object stuck in a greasepencil edit mode. */
+ if (ob != obact) {
+ ob->mode = OB_MODE_OBJECT;
+ DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
+ }
continue;
}