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

Method setPickersColor

Gui/ProjectGui.cpp:630–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630void
631ProjectGui::setPickersColor(double r,
632 double g,
633 double b,
634 double a)
635{
636 if ( _colorPickersEnabled.empty() ) {
637 return;
638 }
639 KnobColorPtr first = _colorPickersEnabled.front();
640
641 for (U32 i = 0; i < _colorPickersEnabled.size(); ++i) {
642 if ( !_colorPickersEnabled[i]->areAllDimensionsEnabled() ) {
643 _colorPickersEnabled[i]->activateAllDimensions();
644 }
645 if (_colorPickersEnabled[i]->getDimension() == 3) {
646 _colorPickersEnabled[i]->setValues(r, g, b, ViewSpec::all(), eValueChangedReasonNatronGuiEdited);
647 } else {
648 _colorPickersEnabled[i]->setValues(r, g, b, a, ViewSpec::all(), eValueChangedReasonNatronGuiEdited);
649 }
650 }
651}
652
653NATRON_NAMESPACE_EXIT
654

Callers 1

setColorPickersColorMethod · 0.80

Calls 7

allFunction · 0.85
emptyMethod · 0.80
activateAllDimensionsMethod · 0.80
setValuesMethod · 0.80
sizeMethod · 0.45
getDimensionMethod · 0.45

Tested by

no test coverage detected