diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-03 18:08:25 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-04 10:34:35 +0300 |
commit | b998a7b384c6a598ea851fbc06a2df8829c34329 (patch) | |
tree | 793596dbb9b642b26240f2629ee855b7301c3fec /source/blender/nodes/texture | |
parent | 351e68e0a4de49912747d97b2e53ffcde45aeb53 (diff) |
Fix T64247: Crash on playback with special shader node tree
The root of the problem goes to the fact that node tree copying
uses source tree and nodes for a temporary storage.
This makes it so multiple dependency graphs can not be reliably
evaluated from different threads if they are using same original
node tree.
Solved by doing the following:
- Commonly used tree copying function (which is used by library
manager) keeps source tree, nodes and sockets untouched.
- All the related areas (like node tree's callback) now have
const qualifier on the input.
- Areas which needs to have those temporary pointers assigned are
now using explicit function.
Would be really cool to get rid of those temporary pointers
completely, but this is a bit tricky due to hairy nature of the
code. Can happen any time now though: is easy enough to generalize
the new pointers mapping.
Note that this change is only intended to solve the crash.
The fact that icons shouldn't be updated on playback will be fixed
as a separate change.
Reviewers: brecht, fclem
Reviewed By: brecht, fclem
Subscribers: brecht, fclem
Differential Revision: https://developer.blender.org/D5002
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r-- | source/blender/nodes/texture/nodes/node_texture_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c index f9f91e65912..cdacb05153d 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.c +++ b/source/blender/nodes/texture/nodes/node_texture_output.c @@ -154,7 +154,7 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node) assign_index(node); } -static void copy(bNodeTree *dest_ntree, bNode *dest_node, bNode *src_node) +static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node) { node_copy_standard_storage(dest_ntree, dest_node, src_node); unique_name(dest_node); |