MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getChannelSelectorKnob

Method getChannelSelectorKnob

Engine/Node.cpp:7057–7077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7055} // Node::Implementation::runInputChangedCallback
7056
7057KnobChoicePtr
7058Node::getChannelSelectorKnob(int inputNb) const
7059{
7060 std::map<int, ChannelSelector>::const_iterator found = _imp->channelsSelectors.find(inputNb);
7061
7062 if ( found == _imp->channelsSelectors.end() ) {
7063 if (inputNb == -1) {
7064 ///The effect might be multi-planar and supply its own
7065 KnobIPtr knob = getKnobByName(kNatronOfxParamOutputChannels);
7066 if (!knob) {
7067 return KnobChoicePtr();
7068 }
7069
7070 return std::dynamic_pointer_cast<KnobChoice>(knob);
7071 }
7072
7073 return KnobChoicePtr();
7074 }
7075
7076 return found->second.layer.lock();
7077}
7078
7079KnobBoolPtr
7080Node::getProcessAllLayersKnob() const

Callers 2

renderRoIMethod · 0.80
onOutputLayerChangedMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected