From cd49fee741148dc9dcc0cbefce0b70ea0f2d55c6 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 5 Sep 2022 15:46:00 +0200 Subject: 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 --- source/blender/makesdna/DNA_node_types.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesdna/DNA_node_types.h') 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. */ -- cgit v1.2.3