GP: Hide dummy and cursor in drawing mode

This commit is contained in:
Antonio Vazquez 2018-10-03 20:25:14 +02:00
parent 9c09998530
commit 5f4d2be735
2 changed files with 11 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}