From ba26adee0c5caa6d4f3ffbda9c7038e807e3f9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 16 Mar 2020 16:16:35 +0100 Subject: 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()`. --- source/blender/blenkernel/BKE_gpencil.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_gpencil.h') diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index 128d5807ca3..5d23029df9e 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -193,6 +193,7 @@ void BKE_gpencil_layer_mask_remove_ref(struct bGPdata *gpd, const char *name); struct bGPDlayer_Mask *BKE_gpencil_layer_mask_named_get(struct bGPDlayer *gpl, const char *name); void BKE_gpencil_layer_mask_sort(struct bGPdata *gpd, struct bGPDlayer *gpl); void BKE_gpencil_layer_mask_sort_all(struct bGPdata *gpd); +void BKE_gpencil_layer_frames_sort(struct bGPDlayer *gpl, bool *r_has_duplicate_frames); /* Brush */ struct Material *BKE_gpencil_brush_material_get(struct Brush *brush); -- cgit v1.2.3