* only calculate node preview that are visible (node_preview flag set &

node_hidden unset)
This commit is contained in:
Jeroen Bakker 2012-06-21 18:22:43 +00:00
parent 7a8d60ec7d
commit 874c9fc33e

@ -87,11 +87,15 @@ void Node::addSetValueOperation(ExecutionSystem *graph, InputSocket *inputsocket
void Node::addPreviewOperation(ExecutionSystem *system, OutputSocket *outputSocket)
{
if (this->isInActiveGroup()) {
PreviewOperation *operation = new PreviewOperation();
system->addOperation(operation);
operation->setbNode(this->getbNode());
operation->setbNodeTree(system->getContext().getbNodeTree());
this->addLink(system, outputSocket, operation->getInputSocket(0));
if (!(this->getbNode()->flag & NODE_HIDDEN)) { // do not calculate previews of hidden nodes.
if (this->getbNode()->flag & NODE_PREVIEW) {
PreviewOperation *operation = new PreviewOperation();
system->addOperation(operation);
operation->setbNode(this->getbNode());
operation->setbNodeTree(system->getContext().getbNodeTree());
this->addLink(system, outputSocket, operation->getInputSocket(0));
}
}
}
}