[Bf-blender-cvs] [7037ff92044] master: Partial fix to T66126: Non-Active Grease Pencil object stuck in drawmode
Dalai Felinto
noreply at git.blender.org
Tue Jun 25 23:03:30 CEST 2019
Commit: 7037ff9204475ae4dd19926b55382d558fc12a62
Author: Dalai Felinto
Date: Tue Jun 25 18:00:33 2019 -0300
Branches: master
https://developer.blender.org/rB7037ff9204475ae4dd19926b55382d558fc12a62
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(),
...
===================================================================
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 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;
}
More information about the Bf-blender-cvs
mailing list