diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-08-06 16:23:58 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-08-06 16:48:26 +0300 |
commit | c587302ea14debaa109800de36e90f9d578a658b (patch) | |
tree | 42d563556b3e719361507253c7a9e6cf6d45fe67 /source/blender/editors/space_time | |
parent | 03b2bccca84c72500ca530273e001e5a39e5b028 (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 91a09708e1d..9ecea7462ff 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -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); |