diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-29 21:57:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-29 22:05:22 +0300 |
commit | f874aeef70f2f315c3062d9694ae816674d0cdd0 (patch) | |
tree | e2c8ddb8ecfc415d89225a081ae8755f355993bd /source/blender/editors/animation | |
parent | 6ecab6dd8e48d564a2b43e0e81e79d079e8b4c77 (diff) | |
parent | bf7d7bc323d5505b78688af2df1f66e1053f62e1 (diff) |
Merge branch 'master' into blender2.8
Please **DO NOT** add changes from master when it's totally uneeded!
Changes to BLI_ area most certainly shall *always* be done in master,
there is absolutely no point in adding more diff between the two
branches than needed, will only makes merging more cumbersome!
Conflicts:
CMakeLists.txt
source/blender/blenlib/intern/math_vector_inline.c
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 437dd2b2de2..cc77a321a89 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -309,6 +309,28 @@ static void animchan_sync_fcurve(bAnimContext *ac, bAnimListElem *ale, FCurve ** } } +/* perform syncing updates for GPencil Layers */ +static void animchan_sync_gplayer(bAnimContext *UNUSED(ac), bAnimListElem *ale) +{ + bGPDlayer *gpl = (bGPDlayer *)ale->data; + + /* Make sure the selection flags agree with the "active" flag. + * The selection flags are used in the Dopesheet only, whereas + * the active flag is used everywhere else. Hence, we try to + * sync these here so that it all seems to be have as the user + * expects - T50184 + * + * Assume that we only really do this when the active status changes. + * (NOTE: This may prove annoying if it means selection is always lost) + */ + if (gpl->flag & GP_LAYER_ACTIVE) { + gpl->flag |= GP_LAYER_SELECT; + } + else { + gpl->flag &= ~GP_LAYER_SELECT; + } +} + /* ---------------- */ /* Main call to be exported to animation editors */ @@ -343,6 +365,10 @@ void ANIM_sync_animchannels_to_data(const bContext *C) case ANIMTYPE_FCURVE: animchan_sync_fcurve(&ac, ale, &active_fcurve); break; + + case ANIMTYPE_GPLAYER: + animchan_sync_gplayer(&ac, ale); + break; } } |