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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user