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:
authorJacques Lucke <jacques@blender.org>2020-10-29 21:28:21 +0300
committerJacques Lucke <jacques@blender.org>2020-10-29 21:34:15 +0300
commitb85504337e71a180362ad7fbc402dc7a25d5a564 (patch)
treec52c4e8bb3d96799b543ea5cc40ed3031630aaef /source/blender/blenkernel/BKE_collection.h
parent7bf0682aa98ac020dc7c55e3298a5cdccc665509 (diff)
Refactor: move Collection .blend I/O to IDTypeInfo callbacks
This one was a bit more tricky, because the file loading is mixed with versioning code and because collections are embedded into scenes. All tests that passed before, still pass.
Diffstat (limited to 'source/blender/blenkernel/BKE_collection.h')
-rw-r--r--source/blender/blenkernel/BKE_collection.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h
index f4393742dff..06fcc038f69 100644
--- a/source/blender/blenkernel/BKE_collection.h
+++ b/source/blender/blenkernel/BKE_collection.h
@@ -40,6 +40,12 @@ struct Main;
struct Object;
struct Scene;
struct ViewLayer;
+struct BlendWriter;
+struct BlendDataReader;
+struct BlendLibReader;
+struct BlendExpander;
+struct SceneCollection;
+struct Library;
typedef struct CollectionParent {
struct CollectionParent *next, *prev;
@@ -160,6 +166,22 @@ bool BKE_collection_has_collection(struct Collection *parent, struct Collection
void BKE_collection_parent_relations_rebuild(struct Collection *collection);
void BKE_main_collections_parent_relations_rebuild(struct Main *bmain);
+/* .blend file I/O */
+
+void BKE_collection_blend_write_nolib(struct BlendWriter *writer, struct Collection *collection);
+void BKE_collection_blend_read_data(struct BlendDataReader *reader, struct Collection *collection);
+void BKE_collection_blend_read_lib(struct BlendLibReader *reader, struct Collection *collection);
+void BKE_collection_blend_read_expand(struct BlendExpander *expander,
+ struct Collection *collection);
+
+void BKE_collection_compat_blend_read_data(struct BlendDataReader *reader,
+ struct SceneCollection *sc);
+void BKE_collection_compat_blend_read_lib(struct BlendLibReader *reader,
+ struct Library *lib,
+ struct SceneCollection *sc);
+void BKE_collection_compat_blend_read_expand(struct BlendExpander *expander,
+ struct SceneCollection *sc);
+
/* Iteration callbacks. */
typedef void (*BKE_scene_objects_Cb)(struct Object *ob, void *data);