[Bf-blender-cvs] [5c18393c8ee] blender2.8: Fix T57656: Keyframes cannot be selected in Grease Pencil Dopesheet.
Alexander Gavrilov
noreply at git.blender.org
Tue Nov 6 20:36:31 CET 2018
Commit: 5c18393c8ee9d72e1fe5e8fc6edac569d0a4f13a
Author: Alexander Gavrilov
Date: Tue Nov 6 22:31:57 2018 +0300
Branches: blender2.8
https://developer.blender.org/rB5c18393c8ee9d72e1fe5e8fc6edac569d0a4f13a
Fix T57656: Keyframes cannot be selected in Grease Pencil Dopesheet.
Partial revert of rBf250f9256e065: GP and masks use integer
frames, so float code isn't working or even needed.
===================================================================
M source/blender/editors/animation/keyframes_draw.c
===================================================================
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 3eb73b9eef2..09f81042a47 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -245,9 +245,15 @@ static void nupdate_ak_bezt(void *node, void *data)
/* Comparator callback used for ActKeyColumns and GPencil frame */
static short compare_ak_gpframe(void *node, void *data)
{
+ ActKeyColumn *ak = (ActKeyColumn *)node;
bGPDframe *gpf = (bGPDframe *)data;
- return compare_ak_cfraPtr(node, &gpf->framenum);
+ if (gpf->framenum < ak->cfra)
+ return -1;
+ else if (gpf->framenum > ak->cfra)
+ return 1;
+ else
+ return 0;
}
/* New node callback used for building ActKeyColumns from GPencil frames */
@@ -289,9 +295,15 @@ static void nupdate_ak_gpframe(void *node, void *data)
/* Comparator callback used for ActKeyColumns and GPencil frame */
static short compare_ak_masklayshape(void *node, void *data)
{
+ ActKeyColumn *ak = (ActKeyColumn *)node;
MaskLayerShape *masklay_shape = (MaskLayerShape *)data;
- return compare_ak_cfraPtr(node, &masklay_shape->frame);
+ if (masklay_shape->frame < ak->cfra)
+ return -1;
+ else if (masklay_shape->frame > ak->cfra)
+ return 1;
+ else
+ return 0;
}
/* New node callback used for building ActKeyColumns from GPencil frames */
More information about the Bf-blender-cvs
mailing list