Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_ViewerNode.cc
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | void ViewerNode::convertToOperations(NodeConverter &converter, | ||||
| /* alpha socket gives either 1 or a custom alpha value if "use alpha" is enabled */ | /* alpha socket gives either 1 or a custom alpha value if "use alpha" is enabled */ | ||||
| viewerOperation->setUseAlphaInput(ignore_alpha || alphaSocket->isLinked()); | viewerOperation->setUseAlphaInput(ignore_alpha || alphaSocket->isLinked()); | ||||
| viewerOperation->setRenderData(context.getRenderData()); | viewerOperation->setRenderData(context.getRenderData()); | ||||
| viewerOperation->setViewName(context.getViewName()); | viewerOperation->setViewName(context.getViewName()); | ||||
| viewerOperation->setViewSettings(context.getViewSettings()); | viewerOperation->setViewSettings(context.getViewSettings()); | ||||
| viewerOperation->setDisplaySettings(context.getDisplaySettings()); | viewerOperation->setDisplaySettings(context.getDisplaySettings()); | ||||
| viewerOperation->setResolutionInputSocketIndex(0); | viewerOperation->set_canvas_input_index(0); | ||||
| if (!imageSocket->isLinked()) { | if (!imageSocket->isLinked()) { | ||||
| if (alphaSocket->isLinked()) { | if (alphaSocket->isLinked()) { | ||||
| viewerOperation->setResolutionInputSocketIndex(1); | viewerOperation->set_canvas_input_index(1); | ||||
| } | } | ||||
| } | } | ||||
| converter.addOperation(viewerOperation); | converter.addOperation(viewerOperation); | ||||
| converter.mapInputSocket(imageSocket, viewerOperation->getInputSocket(0)); | converter.mapInputSocket(imageSocket, viewerOperation->getInputSocket(0)); | ||||
| /* only use alpha link if "use alpha" is enabled */ | /* only use alpha link if "use alpha" is enabled */ | ||||
| if (ignore_alpha) { | if (ignore_alpha) { | ||||
| converter.addInputValue(viewerOperation->getInputSocket(1), 1.0f); | converter.addInputValue(viewerOperation->getInputSocket(1), 1.0f); | ||||
| Show All 14 Lines | |||||