diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-06 19:34:05 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-06 19:34:05 +0300 |
commit | 14f180fa04bd9732d603f15e3acccbc803adb8f9 (patch) | |
tree | 193dd0d2a2d0fe02706a11f7de4fd98bc54a94ea /source/blender/blenkernel/intern | |
parent | 61fdeb1b2ff2a37c9adee9c4d4bcc4a3c258d6f6 (diff) |
2.5
Node editor:
- Linking sockets back.
- Removed obsolete code
- Add node gives correct pointers for Render stuff
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index d41dda4c81e..65a935c1349 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1124,7 +1124,8 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree, int internal_select) /* check for copying links */ for(link= ntree->links.first; link; link= link->next) { - if(link->fromnode->new_node && link->tonode->new_node) { + if(link->fromnode==NULL || link->tonode==NULL); + else if(link->fromnode->new_node && link->tonode->new_node) { nlink= nodeAddLink(newtree, link->fromnode->new_node, NULL, link->tonode->new_node, NULL); /* sockets were copied in order */ for(a=0, sock= link->fromnode->outputs.first; sock; sock= sock->next, a++) { @@ -2269,8 +2270,10 @@ static int setExecutableNodes(bNodeTree *ntree, ThreadData *thd) /* is sock in use? */ else if(sock->link) { bNodeLink *link= sock->link; + /* this is the test for a cyclic case */ - if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) { + if(link->fromnode==NULL || link->tonode==NULL); + else if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) { if(link->fromnode->need_exec) { node->need_exec= 1; break; |