From a0dfa320cddd8396911058bae7c3a0eb52e7f2ee Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 19 Oct 2018 18:55:19 +0300 Subject: Dope Sheet: new option to display keyframe interpolation mode and extremes. With the new automatic handle algorithm, it is possible to do a lot of the animation via keyframes without touching the curves. It is however necessary to change the keyframe interpolation and handle types in certain cases. Currently the dopesheet/action editor allows changing the types, but does not show them in any way. To fix, add a new menu option to display this information. For handle type, it is represented using the shape of the key icons: diamond for Free, clipped diamond for Aligned, square for Vector, circle for Auto Clamp, and cirle with dot for Automatic. Non-bezier interpolation is a property of intervals between keys, so it is marked by drawing lines, similar to holds. In this initial version, only the fact of non-bezier interpolation is displayed, without distinguishing types. For summaries, the line is drawn at half alpha if not all curves in the group are non-bezier. In addition, it is sometimes helpful to know the general direction of change of the curve, and which keys are extremes. This commit also adds an option to highlight extremes, based on comparing the keyed values with adjacent keys. Half-intensity display is used for overshot bezier extremes, or non-uniform summaries. Reviewers: brecht, aligorith, billreynish Differential Revision: https://developer.blender.org/D3788 --- source/blender/blenkernel/intern/anim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/anim.c') diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index d70f3459324..89291b158b7 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -65,8 +65,8 @@ // XXX bad level call... extern short compare_ak_cfraPtr(void *node, void *data); -extern void agroup_to_keylist(struct AnimData *adt, struct bActionGroup *agrp, struct DLRBT_Tree *keys); -extern void action_to_keylist(struct AnimData *adt, struct bAction *act, struct DLRBT_Tree *keys); +extern void agroup_to_keylist(struct AnimData *adt, struct bActionGroup *agrp, struct DLRBT_Tree *keys, int saction_flag); +extern void action_to_keylist(struct AnimData *adt, struct bAction *act, struct DLRBT_Tree *keys, int saction_flag); /* --------------------- */ /* forward declarations */ @@ -485,11 +485,11 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, bActionGroup *agrp = BKE_action_group_find_name(adt->action, mpt->pchan->name); if (agrp) { - agroup_to_keylist(adt, agrp, &mpt->keys); + agroup_to_keylist(adt, agrp, &mpt->keys, 0); } } else { - action_to_keylist(adt, adt->action, &mpt->keys); + action_to_keylist(adt, adt->action, &mpt->keys, 0); } } } -- cgit v1.2.3