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

Method onOpenGLEnabledKnobChangedOnProject

Engine/Node.cpp:5098–5118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5096} // Node::onEffectKnobValueChanged
5097
5098void
5099Node::onOpenGLEnabledKnobChangedOnProject(bool activated)
5100{
5101 bool enabled = activated;
5102 KnobChoicePtr k = _imp->openglRenderingEnabledKnob.lock();
5103 if (enabled) {
5104 if (k) {
5105 k->setAllDimensionsEnabled(true);
5106 int thisKnobIndex = k->getValue();
5107 if (thisKnobIndex == 1 || (thisKnobIndex == 2 && getApp()->isBackground())) {
5108 enabled = false;
5109 }
5110 }
5111 } else {
5112 if (k) {
5113 k->setAllDimensionsEnabled(true);
5114 }
5115 }
5116 _imp->effect->onEnableOpenGLKnobValueChanged(enabled);
5117
5118}
5119
5120bool
5121Node::getSelectedLayerChoiceRaw(int inputNb,

Callers 1

Calls 6

getAppFunction · 0.85
lockMethod · 0.45
getValueMethod · 0.45
isBackgroundMethod · 0.45

Tested by

no test coverage detected