diff options
author | Bastien Montagne <mont29> | 2022-09-05 16:46:00 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-09-05 17:12:54 +0300 |
commit | cd49fee741148dc9dcc0cbefce0b70ea0f2d55c6 (patch) | |
tree | e8dc62543d0706f127a4e80683ab18dc72ec0494 /source/blender/blenkernel/BKE_collection.h | |
parent | dd19d6456abf9ee230bcce62fd67f6ab7ab91f16 (diff) |
IDMAnagement: Add owner ID pointer to embedded ones.
Add a dedicated `owner_id` pointer to ID types that can be embedded
(Collections and NodeTrees), and modify slightly come code to make
handling those more safe and consistent.
This implements first part of T69169.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D15838
Diffstat (limited to 'source/blender/blenkernel/BKE_collection.h')
-rw-r--r-- | source/blender/blenkernel/BKE_collection.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h index feb3dc7de80..4a729311b6a 100644 --- a/source/blender/blenkernel/BKE_collection.h +++ b/source/blender/blenkernel/BKE_collection.h @@ -94,7 +94,7 @@ struct Collection *BKE_collection_duplicate(struct Main *bmain, /* Master Collection for Scene */ #define BKE_SCENE_COLLECTION_NAME "Scene Collection" -struct Collection *BKE_collection_master_add(void); +struct Collection *BKE_collection_master_add(struct Scene *scene); /* Collection Objects */ @@ -296,7 +296,9 @@ 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_data(struct BlendDataReader *reader, + struct Collection *collection, + struct ID *owner_id); void BKE_collection_blend_read_lib(struct BlendLibReader *reader, struct Collection *collection); void BKE_collection_blend_read_expand(struct BlendExpander *expander, struct Collection *collection); |