From e8b8e16b24ade2ca0861cb40a8b4e800a3fb0729 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 5 Jun 2020 09:30:15 +0200 Subject: Code Cleanup: fcurve function naming --- source/blender/editors/space_graph/graph_buttons.c | 2 +- source/blender/editors/space_graph/graph_draw.c | 2 +- source/blender/editors/space_graph/graph_edit.c | 9 +++++---- source/blender/editors/space_graph/graph_utils.c | 4 ++-- source/blender/editors/space_graph/space_graph.c | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 185bf029f1a..179d73a38ba 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -1284,7 +1284,7 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *panel) FCurve *fcu; bool driven, special; - fcu = rna_get_fcurve_context_ui( + fcu = BKE_fcurve_find_by_rna_context_ui( (bContext *)C, &ptr, prop, index, NULL, NULL, &driven, &special); /* Hack: Force all buttons in this panel to be able to know the driver button diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 68fef5e921f..f2071d292ca 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1159,7 +1159,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, shor * we must obey this. */ if (!(sipo->flag & SIPO_SELCUVERTSONLY) || (fcu->flag & FCURVE_SELECTED)) { - if (!fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) { + if (!BKE_fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) { /* only draw controls if this is the active modifier */ if ((fcu->flag & FCURVE_ACTIVE) && (fcm)) { switch (fcm->type) { diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 06da4416f04..03151da8d4d 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -126,7 +126,8 @@ void get_graph_keyframe_extents(bAnimContext *ac, float unitFac, offset; /* get range */ - if (calc_fcurve_bounds(fcu, &txmin, &txmax, &tymin, &tymax, do_sel_only, include_handles)) { + if (BKE_fcurve_calc_bounds( + fcu, &txmin, &txmax, &tymin, &tymax, do_sel_only, include_handles)) { short mapping_flag = ANIM_get_normalization_flags(ac); /* apply NLA scaling */ @@ -409,7 +410,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) int filter; /* free existing ghost curves */ - free_fcurves(&sipo->runtime.ghost_curves); + BKE_fcurves_free(&sipo->runtime.ghost_curves); /* sanity check */ if (start >= end) { @@ -536,7 +537,7 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } /* free ghost curves */ - free_fcurves(&sipo->runtime.ghost_curves); + BKE_fcurves_free(&sipo->runtime.ghost_curves); /* update this editor only */ ED_area_tag_redraw(CTX_wm_area(C)); @@ -806,7 +807,7 @@ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op) /* when there are F-Modifiers on the curve, only allow adding * keyframes if these will be visible after doing so... */ - if (fcurve_is_keyframable(fcu)) { + if (BKE_fcurve_is_keyframable(fcu)) { ListBase anim_data; ToolSettings *ts = ac.scene->toolsettings; diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 575cba07f04..03ed8870d67 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -171,7 +171,7 @@ bool graphop_visible_keyframes_poll(bContext *C) if (fcu->bezt == NULL) { continue; } - if (fcurve_are_keyframes_usable(fcu)) { + if (BKE_fcurve_are_keyframes_usable(fcu)) { found = 1; break; } @@ -225,7 +225,7 @@ bool graphop_editable_keyframes_poll(bContext *C) if (fcu->bezt == NULL) { continue; } - if (fcurve_is_keyframable(fcu)) { + if (BKE_fcurve_is_keyframable(fcu)) { found = 1; break; } diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index bd82b8ecf2e..b9c7c529620 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -145,7 +145,7 @@ static void graph_free(SpaceLink *sl) } if (si->runtime.ghost_curves.first) { - free_fcurves(&si->runtime.ghost_curves); + BKE_fcurves_free(&si->runtime.ghost_curves); } } -- cgit v1.2.3