diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-08-22 15:40:10 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-08-22 15:46:37 +0300 |
commit | 8f578150eaf494a03bed7389046e44f2bdf7d748 (patch) | |
tree | 5370042609d04907eff0a154e8a4b6ae858af182 /source/blender/makesdna | |
parent | 443586f34d3a0730c67b5d8787e519bec2af3656 (diff) |
Fix T68971: Copy As New Driver from Material node creates a bad reference.
NodeTree structures of materials and some other data blocks are
effectively node group data block objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.
Fix Copy As New Driver to create a reference that goes through
the owner data block, by adding a new runtime field to bNodeTree.
Diffstat (limited to 'source/blender/makesdna')
-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 af66add01f3..d953237d129 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -477,6 +477,9 @@ typedef struct bNodeTree { */ struct bNodeTreeExec *execdata; + /** Data block that owns this tree (Material, etc). Not saved. */ + struct ID *owner; + /* callbacks */ void (*progress)(void *, float progress); /** \warning may be called by different threads */ |