Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <b.mont29@gmail.com>2020-03-09 19:35:32 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-09 20:09:23 +0300
commitc010290e75125a26166ae524d40e383fd3651f7e (patch)
treee913904683c25cce5327408fb2764f6d45b62d1d /source/blender/blenkernel/intern/ipo.c
parent214cc3c245194a312b1f5e23d6b779b40ebe3569 (diff)
Cleanup: Ipo: Move to IDTypeInfo and remove unused BKE API.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index f84d0681dad..57bd2539003 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -62,6 +62,7 @@
#include "BKE_action.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
+#include "BKE_idtype.h"
#include "BKE_key.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
@@ -78,13 +79,10 @@
static CLG_LogRef LOG = {"bke.ipo"};
-/* *************************************************** */
-/* Old-Data Freeing Tools */
-
-/* Free data from old IPO-Blocks (those which haven't been converted), but not IPO block itself */
-// XXX this shouldn't be necessary anymore, but may occur while not all data is converted yet
-void BKE_ipo_free(Ipo *ipo)
+static void ipo_free_data(ID *id)
{
+ Ipo *ipo = (Ipo *)id;
+
IpoCurve *icu, *icn;
int n = 0;
@@ -110,6 +108,25 @@ void BKE_ipo_free(Ipo *ipo)
}
}
+IDTypeInfo IDType_ID_IP = {
+ .id_code = ID_IP,
+ .id_filter = 0,
+ .main_listbase_index = INDEX_ID_IP,
+ .struct_size = sizeof(Ipo),
+ .name = "Ipo",
+ .name_plural = "ipos",
+ .translation_context = "",
+ .flags = IDTYPE_FLAGS_NO_COPY | IDTYPE_FLAGS_NO_LIBLINKING | IDTYPE_FLAGS_NO_MAKELOCAL,
+
+ .init_data = NULL,
+ .copy_data = NULL,
+ .free_data = ipo_free_data,
+ .make_local = NULL,
+};
+
+/* *************************************************** */
+/* Old-Data Freeing Tools */
+
/* *************************************************** */
/* ADRCODE to RNA-Path Conversion Code - Special (Bitflags) */