Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-10-16 11:37:18 +0300
committerAntonioya <blendergit@gmail.com>2018-10-16 11:37:18 +0300
commitf807371c3e2d344375f10c3d3e330128598f5314 (patch)
tree3174844dad2816e2c5442e797451842dd81dd669 /source/blender
parent0b5786e96c9f967b4e28a36974fd0400c06b7ab4 (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')
-rw-r--r--source/blender/editors/animation/anim_filter.c4
-rw-r--r--source/blender/editors/animation/keyframes_draw.c2
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);