diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2020-06-05 09:41:09 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2020-06-05 09:41:35 +0300 |
commit | fe6be70875bca64e555d1cbedf1c2160493cf0e2 (patch) | |
tree | 96a78a9737f091dfc884a232f28d8e0f33337967 /source/blender/io | |
parent | e3a32a22bf9dbed18d7718ea4a0d66759c933a3b (diff) |
CleanUp: Introduce BKE_fcurve_create
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/collada/AnimationImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/io/collada/BCAnimationCurve.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp index 2511d3c287d..0e5fa5ec161 100644 --- a/source/blender/io/collada/AnimationImporter.cpp +++ b/source/blender/io/collada/AnimationImporter.cpp @@ -57,7 +57,7 @@ template<class T> static const char *bc_get_joint_name(T *node) FCurve *AnimationImporter::create_fcurve(int array_index, const char *rna_path) { - FCurve *fcu = (FCurve *)MEM_callocN(sizeof(FCurve), "FCurve"); + FCurve *fcu = BKE_fcurve_create(); fcu->flag = (FCURVE_VISIBLE | FCURVE_AUTO_HANDLES | FCURVE_SELECTED); fcu->rna_path = BLI_strdupn(rna_path, strlen(rna_path)); fcu->array_index = array_index; @@ -100,7 +100,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) case 16: /* matrix */ { for (i = 0; i < dim; i++) { - FCurve *fcu = (FCurve *)MEM_callocN(sizeof(FCurve), "FCurve"); + FCurve *fcu = BKE_fcurve_create(); fcu->flag = (FCURVE_VISIBLE | FCURVE_AUTO_HANDLES | FCURVE_SELECTED); fcu->array_index = 0; diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp index 98eb12f738e..67b96230b02 100644 --- a/source/blender/io/collada/BCAnimationCurve.cpp +++ b/source/blender/io/collada/BCAnimationCurve.cpp @@ -94,7 +94,7 @@ void BCAnimationCurve::delete_fcurve(FCurve *fcu) FCurve *BCAnimationCurve::create_fcurve(int array_index, const char *rna_path) { - FCurve *fcu = (FCurve *)MEM_callocN(sizeof(FCurve), "FCurve"); + FCurve *fcu = BKE_fcurve_create(); fcu->flag = (FCURVE_VISIBLE | FCURVE_AUTO_HANDLES | FCURVE_SELECTED); fcu->rna_path = BLI_strdupn(rna_path, strlen(rna_path)); fcu->array_index = array_index; |