diff options
author | Antonioya <blendergit@gmail.com> | 2019-05-16 15:00:31 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-05-16 15:01:48 +0300 |
commit | c0d743238d022e12872549176257db8b9d602e3d (patch) | |
tree | 32b528aac836cf8265a2eee65d7b38f71c246d08 /source/blender/draw | |
parent | 86eefefdc1aae2a3ab4160770032671abf55aa30 (diff) |
GPencil: New filter in Onion by keyframe type
This new filter allows to select only some type of keyframe (keyframe, breakdown, etc).
This was a request of artists that are used to work with other 2D softwares.
Also some cleanup to remove aninmatable option to some properties.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 71e83dac461..7f979c4fed1 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1229,6 +1229,7 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache, int last = gpf->framenum; colflag = (bool)gpd->onion_flag & GP_ONION_GHOST_PREVCOL; + const short onion_keytype = gpd->onion_keytype; /* ------------------------------- * 1) Draw Previous Frames First @@ -1249,6 +1250,10 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache, if ((mode == GP_ONION_MODE_SELECTED) && ((gf->flag & GP_FRAME_SELECT) == 0)) { continue; } + /* verify keyframe type */ + if ((onion_keytype > -1) && (gf->key_type != onion_keytype)) { + continue; + } /* absolute range */ if (mode == GP_ONION_MODE_ABSOLUTE) { if ((gpf->framenum - gf->framenum) > step) { @@ -1305,6 +1310,10 @@ static void gpencil_draw_onionskins(GpencilBatchCache *cache, if ((mode == GP_ONION_MODE_SELECTED) && ((gf->flag & GP_FRAME_SELECT) == 0)) { continue; } + /* verify keyframe type */ + if ((onion_keytype > -1) && (gf->key_type != onion_keytype)) { + continue; + } /* absolute range */ if (mode == GP_ONION_MODE_ABSOLUTE) { if ((gf->framenum - gpf->framenum) > step) { |