[Bf-blender-cvs] [6f474c49abc] idtype-refactor: IDTypeInfo: add remaining needed callbacks.
Bastien Montagne
noreply at git.blender.org
Wed Mar 4 12:08:40 CET 2020
Commit: 6f474c49abc1f53601fd26c050b8adee02c64d7b
Author: Bastien Montagne
Date: Tue Mar 3 19:19:39 2020 +0100
Branches: idtype-refactor
https://developer.blender.org/rB6f474c49abc1f53601fd26c050b8adee02c64d7b
IDTypeInfo: add remaining needed callbacks.
Those are the one I can think about as mandatory for now...
===================================================================
M source/blender/blenkernel/BKE_idtype.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_idtype.h b/source/blender/blenkernel/BKE_idtype.h
index d9dbf560d1a..2e60edee09b 100644
--- a/source/blender/blenkernel/BKE_idtype.h
+++ b/source/blender/blenkernel/BKE_idtype.h
@@ -31,6 +31,7 @@ extern "C" {
#endif
struct ID;
+struct Main;
enum {
IDTYPE_FLAGS_IS_LINKABLE = 1 << 0,
@@ -38,6 +39,17 @@ enum {
typedef void (*IDTypeInitDataFunction)(struct ID *id);
+/** \param flag: Copying options (see BKE_lib_id.h's LIB_ID_COPY_... flags for more). */
+typedef void (*IDTypeCopyDataFunction)(struct Main *bmain,
+ struct ID *id_dst,
+ const struct ID *id_src,
+ const int flag);
+
+typedef void (*IDTypeFreeFunction)(struct ID *id);
+
+/** \param flag: See BKE_lib_id.h's LIB_ID_MAKELOCAL_... flags. */
+typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, const int flag);
+
typedef struct IDTypeInfo {
/* Unique identifier of this type, either as a short or an array of two chars. */
short id_code;
@@ -64,6 +76,10 @@ typedef struct IDTypeInfo {
/* ********** ID management callbacks ********** */
IDTypeInitDataFunction init_data;
+ IDTypeCopyDataFunction copy_data;
+ IDTypeFreeFunction free;
+
+ IDTypeMakeLocalFunction make_local;
} IDTypeInfo;
/* Module initialization. */
More information about the Bf-blender-cvs
mailing list