Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_CompositorNode.cpp
| Show All 34 Lines | void CompositorNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context) | ||||
| bool is_active = (editorNode->flag & NODE_DO_OUTPUT_RECALC) || | bool is_active = (editorNode->flag & NODE_DO_OUTPUT_RECALC) || | ||||
| context->isRendering(); | context->isRendering(); | ||||
| InputSocket *imageSocket = this->getInputSocket(0); | InputSocket *imageSocket = this->getInputSocket(0); | ||||
| InputSocket *alphaSocket = this->getInputSocket(1); | InputSocket *alphaSocket = this->getInputSocket(1); | ||||
| InputSocket *depthSocket = this->getInputSocket(2); | InputSocket *depthSocket = this->getInputSocket(2); | ||||
| CompositorOperation *compositorOperation = new CompositorOperation(); | CompositorOperation *compositorOperation = new CompositorOperation(); | ||||
| compositorOperation->setSceneName(editorNode->id->name); | compositorOperation->setSceneName(context->getScene()->id.name); | ||||
| compositorOperation->setRenderData(context->getRenderData()); | compositorOperation->setRenderData(context->getRenderData()); | ||||
| compositorOperation->setbNodeTree(context->getbNodeTree()); | compositorOperation->setbNodeTree(context->getbNodeTree()); | ||||
| compositorOperation->setIgnoreAlpha(editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA); | compositorOperation->setIgnoreAlpha(editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA); | ||||
| compositorOperation->setActive(is_active); | compositorOperation->setActive(is_active); | ||||
| imageSocket->relinkConnections(compositorOperation->getInputSocket(0), 0, graph); | imageSocket->relinkConnections(compositorOperation->getInputSocket(0), 0, graph); | ||||
| alphaSocket->relinkConnections(compositorOperation->getInputSocket(1)); | alphaSocket->relinkConnections(compositorOperation->getInputSocket(1)); | ||||
| depthSocket->relinkConnections(compositorOperation->getInputSocket(2)); | depthSocket->relinkConnections(compositorOperation->getInputSocket(2)); | ||||
| graph->addOperation(compositorOperation); | graph->addOperation(compositorOperation); | ||||
| addPreviewOperation(graph, context, compositorOperation->getInputSocket(0)); | addPreviewOperation(graph, context, compositorOperation->getInputSocket(0)); | ||||
| } | } | ||||