Highlight nodes that are being processed

This commit is contained in:
2012-07-04 10:01:45 +00:00
parent 592196cb70
commit 33e12a2983
28 changed files with 298 additions and 53 deletions

View File

@@ -46,6 +46,7 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
NodeDefocus *data = (NodeDefocus *)node->storage;
NodeOperation *radiusOperation;
OutputSocket * depthOperation;
if (data->no_zbuf) {
MathMultiplyOperation *multiply = new MathMultiplyOperation();
SetValueOperation *multiplier = new SetValueOperation();
@@ -63,6 +64,7 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
graph->addOperation(maxRadius);
graph->addOperation(minimize);
radiusOperation = minimize;
depthOperation = minimize->getOutputSocket(0);
}
else {
ConvertDepthToRadiusOperation *converter = new ConvertDepthToRadiusOperation();
@@ -72,6 +74,7 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
this->getInputSocket(1)->relinkConnections(converter->getInputSocket(0), 1, graph);
graph->addOperation(converter);
radiusOperation = converter;
depthOperation = converter->getInputSocket(0)->getConnection()->getFromSocket();
}
BokehImageOperation *bokeh = new BokehImageOperation();
@@ -89,7 +92,15 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
bokeh->setData(bokehdata);
bokeh->deleteDataOnFinish();
graph->addOperation(bokeh);
#ifdef COM_DEFOCUS_SEARCH
InverseSearchRadiusOperation *search = new InverseSearchRadiusOperation();
addLink(graph, radiusOperation->getOutputSocket(0), search->getInputSocket(0));
addLink(graph, depthOperation, search->getInputSocket(1));
search->setMaxBlur(data->maxblur);
search->setThreshold(data->bthresh);
graph->addOperation(search);
#endif
VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
if (data->preview) {
operation->setQuality(COM_QUALITY_LOW);
@@ -97,10 +108,14 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
operation->setQuality(context->getQuality());
}
operation->setMaxBlur(data->maxblur);
operation->setbNode(node);
operation->setThreshold(data->bthresh);
addLink(graph, bokeh->getOutputSocket(), operation->getInputSocket(1));
addLink(graph, radiusOperation->getOutputSocket(), operation->getInputSocket(2));
addLink(graph, radiusOperation->getInputSocket(0)->getConnection()->getFromSocket(), operation->getInputSocket(3));
addLink(graph, depthOperation, operation->getInputSocket(3));
#ifdef COM_DEFOCUS_SEARCH
addLink(graph, search->getOutputSocket(), operation->getInputSocket(4));
#endif
if (data->gamco) {
GammaCorrectOperation *correct = new GammaCorrectOperation();
GammaUncorrectOperation *inverse = new GammaUncorrectOperation();
@@ -115,6 +130,5 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph);
this->getOutputSocket()->relinkConnections(operation->getOutputSocket());
}
graph->addOperation(operation);
}