[Bf-blender-cvs] [f807371c3e2] blender2.8: GP: Set Dopesheet layers in Top-Down order
Antonioya
noreply at git.blender.org
Tue Oct 16 10:37:33 CEST 2018
Commit: f807371c3e2d344375f10c3d3e330128598f5314
Author: Antonioya
Date: Tue Oct 16 10:37:18 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBf807371c3e2d344375f10c3d3e330128598f5314
GP: Set Dopesheet layers in Top-Down order
The layers are Top-Down and the dopesheet must use the same order.
===================================================================
M source/blender/editors/animation/anim_filter.c
M source/blender/editors/animation/keyframes_draw.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list