From fe6be70875bca64e555d1cbedf1c2160493cf0e2 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 5 Jun 2020 08:41:09 +0200 Subject: CleanUp: Introduce BKE_fcurve_create --- source/blender/editors/animation/drivers.c | 2 +- source/blender/editors/animation/keyframing.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 82e24eaa6e3..f7416ce7566 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -110,7 +110,7 @@ struct FCurve *alloc_driver_fcurve(const char rna_path[], const int array_index, eDriverFCurveCreationMode creation_mode) { - FCurve *fcu = MEM_callocN(sizeof(FCurve), "FCurve"); + FCurve *fcu = BKE_fcurve_create(); fcu->flag = (FCURVE_VISIBLE | FCURVE_SELECTED); fcu->auto_smoothing = U.auto_smoothing_new; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 0e9b870df88..b3b818fafa9 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -214,7 +214,7 @@ FCurve *ED_action_fcurve_ensure(struct Main *bmain, if (fcu == NULL) { /* use default settings to make a F-Curve */ - fcu = MEM_callocN(sizeof(FCurve), "FCurve"); + fcu = BKE_fcurve_create(); fcu->flag = (FCURVE_VISIBLE | FCURVE_SELECTED); fcu->auto_smoothing = U.auto_smoothing_new; -- cgit v1.2.3