diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-03-16 18:16:35 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-03-16 18:23:12 +0300 |
commit | ba26adee0c5caa6d4f3ffbda9c7038e807e3f9d2 (patch) | |
tree | 735f0f44a9ee5dfd4f213e436e3b014b2cf879e6 /source/blender/editors/animation | |
parent | f0856b1fdad2e4a65cfdcffd01ee581ed07c2d93 (diff) |
Fix T61234 Mirroring Grease Pencil keyframes in the Dopesheet fails
`ANIM_animdata_update()` did not sort grease pencil frames. A
pre-existing comment stated this wouldn't be necessary as
`posttrans_gpd_clean()` already does this. However, this is only
applicable when the change is performed via the transform system. The
mirror operator doesn't call `posttrans_gpd_clean()`, invalidating the
assumption in the comment.
I moved the sorting code into `BKE_gpencil_layer_frames_sort()`, which
is now called from both `ANIM_animdata_update()` and
`posttrans_gpd_clean()`.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 98fcb9c5ce5..439b8071deb 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -368,9 +368,7 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) if (ale->update & ANIM_UPDATE_ORDER) { ale->update &= ~ANIM_UPDATE_ORDER; if (gpl) { - /* While correct & we could enable it: 'posttrans_gpd_clean' currently - * both sorts and removes doubles, so this is not necessary here. */ - // gpencil_sort_frames(gpl); + BKE_gpencil_layer_frames_sort(gpl, NULL); } } |