diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-16 11:37:18 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-16 11:37:18 +0300 |
commit | f807371c3e2d344375f10c3d3e330128598f5314 (patch) | |
tree | 3174844dad2816e2c5442e797451842dd81dd669 /source/blender/editors/animation | |
parent | 0b5786e96c9f967b4e28a36974fd0400c06b7ab4 (diff) |
GP: Set Dopesheet layers in Top-Down order
The layers are Top-Down and the dopesheet must use the same order.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 4 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 556e88cdf8f..e59f563c261 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1625,8 +1625,8 @@ static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data, bDopeShee bGPDlayer *gpl; size_t items = 0; - /* loop over layers as the conditions are acceptable */ - for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { + /* loop over layers as the conditions are acceptable (top-Down order) */ + for (gpl = gpd->layers.last; gpl; gpl = gpl->prev) { /* only if selected */ if (ANIMCHANNEL_SELOK(SEL_GPL(gpl)) ) { /* only if editable */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 1941e98b865..e6245fffe47 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -1033,7 +1033,7 @@ void gpencil_to_keylist(bDopeSheet *ads, bGPdata *gpd, DLRBT_Tree *keys, const b if (gpd && keys) { /* for now, just aggregate out all the frames, but only for visible layers */ - for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { + for (gpl = gpd->layers.last; gpl; gpl = gpl->prev) { if ((gpl->flag & GP_LAYER_HIDE) == 0) { if ((!active) || ((active) && (gpl->flag & GP_LAYER_SELECT))) { gpl_to_keylist(ads, gpl, keys); |