Compositor upgrade;

- Links now can be made between any socket type. The nodes recognize amount
  of channels, and will convert types if needed.
  Conversions from RGBA to 1 channel will use the 'RGB to BW' formula.

  Also note that conversions only happen when required. So you can blur an
  alpha channel, filter it, and put this in a 1-channel socket without any
  conversion to happen, which saves memory & cpu time.

  http://www.blender.org/bf/rt.jpg

  The blur nodes don't accept Vector input yet... But filter does.

- RGB Curve Nodes now have the premultiply option resored, 2 x faster

- Fixed some confusing code in Node Group handling... much stabler now
This commit is contained in:
Ton Roosendaal
2006-02-20 13:43:40 +00:00
parent 003b8ae2ef
commit 04ec4a2530
4 changed files with 262 additions and 167 deletions

View File

@@ -240,7 +240,7 @@ static void composit_node_event(SpaceNode *snode, short event)
NodeTagChanged(snode->edittree, node);
node= snode_get_editgroup(snode);
if(node)
NodeTagChanged(snode->nodetree, node);
NodeTagIDChanged(snode->nodetree, node->id);
snode_handle_recalc(snode);
}
}
@@ -1403,9 +1403,12 @@ static int node_add_link_drag(SpaceNode *snode, bNode *node, bNodeSocket *sock,
}
/* and last trick: insert a convertor when types dont match */
if(link->tosock->type!=link->fromsock->type) {
node_insert_convertor(snode, link);
ntreeSolveOrder(snode->edittree); /* so nice do it twice! well, the sort-order can only handle 1 added link at a time */
if(snode->treetype==NTREE_SHADER) {
if(link->tosock->type!=link->fromsock->type) {
node_insert_convertor(snode, link);
/* so nice do it twice! well, the sort-order can only handle 1 added link at a time */
ntreeSolveOrder(snode->edittree);
}
}
}