diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-03 23:56:03 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-03 23:56:23 +0300 |
commit | 204ad852a64072f008050b66e65ff197258ffa2e (patch) | |
tree | 5f20c58b521a4addf926a0d8ac9bb050dd1332b6 /source/blender/draw/modes/object_mode.c | |
parent | c52485c16ac44ffdf39195034e85181fb2346311 (diff) |
GP: Hide different UI elements depending of mode
The 3D Cursor, origin and dummy are hidden depending of the mode to get a cleaner drawing space.
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 5ba576985af..3b95f0b86d0 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -2374,9 +2374,11 @@ static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, ViewL return; } - /* grease pencil in draw mode hide always */ + /* grease pencil in some modes hide always */ if ((OBACT(view_layer)) && - (OBACT(view_layer)->mode == OB_MODE_GPENCIL_PAINT)) + ((OBACT(view_layer)->mode == OB_MODE_GPENCIL_PAINT) || + (OBACT(view_layer)->mode == OB_MODE_GPENCIL_SCULPT) || + (OBACT(view_layer)->mode == OB_MODE_GPENCIL_WEIGHT))) { return; } @@ -2760,9 +2762,9 @@ 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 */ + /* in all modes except object mode hide always */ if ((OBACT(view_layer)) && - (OBACT(view_layer)->mode == OB_MODE_GPENCIL_PAINT)) + (OBACT(view_layer)->mode != OB_MODE_OBJECT)) { break; } |