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.
This commit is contained in:
parent
c52485c16a
commit
204ad852a6
|
@ -165,8 +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)) {
|
||||
/* grease pencil hide always in some modes */
|
||||
if ((ob) &&
|
||||
((ob->mode == OB_MODE_GPENCIL_PAINT) ||
|
||||
(ob->mode == OB_MODE_GPENCIL_WEIGHT)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue