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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-09-28 12:52:22 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-09-28 12:52:22 +0300
commit808b03da437043d7bb809a4d0e9e523bbfad95f9 (patch)
tree4a3ef1f74b09328b2e97bf827fa1fc700a9e2e41 /source/blender/blenkernel/BKE_screen.h
parent5270ac5ed87fb5f9b5605fdc332f16ea0f7ee59d (diff)
Cleanup: decentralize .blend I/O for space types
This adds callbacks to `SpaceType` to make each editor responsible to manage their own .blend I/O, and moves relevant code from `screen.c` to the editors files. Differential Revision: D11069
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r--source/blender/blenkernel/BKE_screen.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 62b04785983..9a7d2bde810 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -108,6 +108,23 @@ typedef struct SpaceType {
void (*space_subtype_set)(struct ScrArea *area, int value);
void (*space_subtype_item_extend)(struct bContext *C, EnumPropertyItem **item, int *totitem);
+ /**
+ * Update pointers for all structs directly owned by this space.
+ */
+ void (*blend_read_data)(struct BlendDataReader *reader, struct SpaceLink *space_link);
+
+ /**
+ * Update pointers to other id data blocks.
+ */
+ void (*blend_read_lib)(struct BlendLibReader *reader,
+ struct ID *parent_id,
+ struct SpaceLink *space_link);
+
+ /**
+ * Write all structs that should be saved in a .blend file.
+ */
+ void (*blend_write)(struct BlendWriter *writer, struct SpaceLink *space_link);
+
/* region type definitions */
ListBase regiontypes;