diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-25 11:46:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-25 11:46:59 +0300 |
commit | 8d0b104f4357f5914f3e28d735ebffa1526a598e (patch) | |
tree | 60e935a01b1331d201f5a4298c0e5463fb3fd8f8 /intern/cycles/blender | |
parent | 917b8754f9d89b9d0a1488d83e0c5ff308c74e1d (diff) |
Fix T44064: Reroute two-node loop crash
Issue was caused by cycles in shader graph confusing it's
simplification stage. Now we're ignoring links which are
marked as invalid from blender side so we don't run into
such cycles and keep graph code simple.
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index baf79a78987..5628d96db29 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -951,6 +951,10 @@ static void add_nodes(Scene *scene, BL::BlendData b_data, BL::Scene b_scene, Sha BL::NodeTree::links_iterator b_link; for(b_ntree.links.begin(b_link); b_link != b_ntree.links.end(); ++b_link) { + /* Ignore invalid links to avoid unwanted cycles created in graph. */ + if(!b_link->is_valid()) { + continue; + } /* get blender link data */ BL::NodeSocket b_from_sock = b_link->from_socket(); BL::NodeSocket b_to_sock = b_link->to_socket(); |