Timeline: Make GPencil keyframes slightly taller than normal keyframes to make them easier to distinguish

This commit makes GPencil keyframes in the timeline slightly taller (80% height
vs 60% height) so that they will not be that easily confused.
This commit is contained in:
Joshua Leung 2015-08-07 01:23:58 +12:00
parent 03b2bccca8
commit c587302ea1
1 changed files with 5 additions and 1 deletions

View File

@ -295,8 +295,12 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
bDopeSheet ads = {NULL};
DLRBT_Tree keys;
ActKeyColumn *ak;
float fac1 = (GS(id->name) == ID_GD) ? 0.8f : 0.6f; /* draw GPencil keys taller, to help distinguish them */
float fac2 = 1.0f - fac1;
float ymin = v2d->tot.ymin;
float ymax = v2d->tot.ymax * 0.6f + ymin * 0.4f;
float ymax = v2d->tot.ymax * fac1 + ymin * fac2;
/* init binarytree-list for getting keyframes */
BLI_dlrbTree_init(&keys);