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:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-08-22 15:40:10 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-08-22 15:46:37 +0300
commit8f578150eaf494a03bed7389046e44f2bdf7d748 (patch)
tree5370042609d04907eff0a154e8a4b6ae858af182 /source/blender/editors/space_node/node_add.c
parent443586f34d3a0730c67b5d8787e519bec2af3656 (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/editors/space_node/node_add.c')
-rw-r--r--source/blender/editors/space_node/node_add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 01a30f677a3..5ee1925fd55 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -509,7 +509,7 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- ntree = ntreeAddTree(bmain, treename, idname);
+ ntree = ntreeAddTree(bmain, treename, idname, NULL);
/* hook into UI */
UI_context_active_but_prop_get_templateID(C, &ptr, &prop);