diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-03 21:25:14 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-03 21:25:14 +0300 |
commit | 5f4d2be7352963f48add549dadd33724d3aa83dd (patch) | |
tree | 2400be725daf05d074beb615e868ee17b7f80c87 | |
parent | 9c09998530041744a183dfae3da435806272623b (diff) |
GP: Hide dummy and cursor in drawing mode
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 5 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 31a79bcda94..0444e298044 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -165,6 +165,11 @@ static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, Vie return false; } + /* grease pencil draw mode hide always */ + if ((ob) && (ob->mode == OB_MODE_GPENCIL_PAINT)) { + return false; + } + return true; } diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 2c1dc47a48c..aa42320afde 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -2753,6 +2753,12 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) DRW_shgroup_empty(sgl, ob, view_layer); break; case OB_GPENCIL: + /* in draw mode hide always */ + if ((OBACT(view_layer)) && + (OBACT(view_layer)->mode == OB_MODE_GPENCIL_PAINT)) + { + break; + } if (hide_object_extra) { break; } |