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/makesdna/DNA_node_types.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/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 07e9f5d8c52..0114988a0bc 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -535,6 +535,9 @@ typedef struct bNodeTree { /** Animation data (must be immediately after id for utilities to use it). */ struct AnimData *adt; + /** The ID owning this node tree, in case it is an embedded one. */ + ID *owner_id; + /** Runtime type information. */ struct bNodeTreeType *typeinfo; /** Runtime type identifier. */ |