From ede921fdfac1c76b8c54cae1723fbe9efd891939 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 2 Jul 2009 01:01:18 +0000 Subject: NLA SoC: Proper poll callbacks for Graph Editor For now, some of these polls may be a bit too restrictive, but at least we have some unified+cleaned bases to work from now (instead of relying on the generic ED_operator_area_active). --- source/blender/editors/space_graph/graph_buttons.c | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'source/blender/editors/space_graph/graph_buttons.c') diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index ea4f017c9bb..f2dcd297866 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -1000,34 +1000,6 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) /* ******************* general ******************************** */ -/* Find 'active' F-Curve. It must be editable, since that's the purpose of these buttons (subject to change). - * We return the 'wrapper' since it contains valuable context info (about hierarchy), which will need to be freed - * when the caller is done with it. - */ -// TODO: move this to anim api with another name? -bAnimListElem *get_active_fcurve_channel (bAnimContext *ac) -{ - ListBase anim_data = {NULL, NULL}; - int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE | ANIMFILTER_CURVESONLY); - int items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); - - /* We take the first F-Curve only, since some other ones may have had 'active' flag set - * if they were from linked data. - */ - if (items) { - bAnimListElem *ale= (bAnimListElem *)anim_data.first; - - /* remove first item from list, then free the rest of the list and return the stored one */ - BLI_remlink(&anim_data, ale); - BLI_freelistN(&anim_data); - - return ale; - } - - /* no active F-Curve */ - return NULL; -} - void graph_buttons_register(ARegionType *art) { PanelType *pt; -- cgit v1.2.3