diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-01 19:53:19 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-01 19:53:19 +0300 |
commit | 2110e271f52f641d98fc4f92afc0988b29806479 (patch) | |
tree | 545a6bb349c693d10dd672bc76b0d0df7410451a /source/blender/editors/util | |
parent | 32b33e91ebfa0629277ba28490ba9a842b0265ab (diff) | |
parent | 2bd71b49e79325863bfe3c561fa03653231c9914 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/ed_util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 0320a2a9a1a..e86392e47ab 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -47,6 +47,8 @@ #include "DEG_depsgraph.h" +#include "DNA_gpencil_types.h" + #include "ED_armature.h" #include "ED_asset.h" #include "ED_image.h" @@ -117,6 +119,10 @@ void ED_editors_init(bContext *C) /* 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 grease-pencil edit mode. */ if (ob != obact) { + bGPdata *gpd = (bGPdata *)ob->data; + gpd->flag &= ~(GP_DATA_STROKE_PAINTMODE | GP_DATA_STROKE_EDITMODE | + GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE | + GP_DATA_STROKE_VERTEXMODE); ob->mode = OB_MODE_OBJECT; DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); } |