Commit: 9a7891da900262a9fb67cad1b9e2e3605d8bdedd Author: Sergey Sharybin Date: Fri Sep 16 15:56:09 2016 +0200 Branches: master https://developer.blender.org/rB9a7891da900262a9fb67cad1b9e2e3605d8bdedd
Tweak for pinned/always visible curves in Graph Editor Allow such kind of pin for armature bones. =================================================================== M source/blender/editors/animation/anim_channels_defines.c M source/blender/editors/animation/anim_filter.c =================================================================== diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index be92b03..e60cb3f 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -851,7 +851,7 @@ static bool acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale) return (ac->spacetype == SPACE_IPO); case ACHANNEL_SETTING_ALWAYS_VISIBLE: - return false; + return (ac->spacetype == SPACE_IPO); default: /* always supported */ return true; @@ -892,7 +892,10 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin case ACHANNEL_SETTING_VISIBLE: /* visibility - graph editor */ *neg = 1; return AGRP_NOTVISIBLE; - + + case ACHANNEL_SETTING_ALWAYS_VISIBLE: + return ADT_CURVES_ALWAYS_VISIBLE; + default: /* this shouldn't happen */ return 0; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 5cee414..72c20c0 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -478,7 +478,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) #define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \ { \ if ((id)->adt) { \ - if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) { \ + if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE) || 1) { \ if (filter_mode & ANIMFILTER_ANIMDATA) { \ adtOk \ } \ @@ -952,6 +952,9 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne */ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id, int filter_mode) { + if (fcu->grp != NULL && fcu->grp->flag & ADT_CURVES_ALWAYS_VISIBLE) { + return false; + } /* hidden items should be skipped if we only care about visible data, but we aren't interested in hidden stuff */ const bool skip_hidden = (filter_mode & ANIMFILTER_DATA_VISIBLE) && !(ads->filterflag & ADS_FILTER_INCL_HIDDEN); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs