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

Method refreshFormatParamChoice

Engine/Node.cpp:2564–2588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2562}
2563
2564void
2565Node::refreshFormatParamChoice(const std::vector<ChoiceOption>& entries,
2566 int defValue,
2567 bool loadingProject)
2568{
2569 KnobChoicePtr choice = _imp->pluginFormatKnobs.formatChoice.lock();
2570
2571 if (!choice) {
2572 return;
2573 }
2574 int curIndex = choice->getValue();
2575 choice->populateChoices(entries);
2576 choice->beginChanges();
2577 choice->setDefaultValueWithoutApplying(defValue);
2578 if (!loadingProject) {
2579 //changedKnob was not called because we are initializing knobs
2580 handleFormatKnob( choice.get() );
2581 } else {
2582 if ( curIndex < (int)entries.size() ) {
2583 choice->setValue(curIndex);
2584 }
2585 }
2586
2587 choice->endChanges();
2588}
2589
2590void
2591Node::refreshPreviewsAfterProjectLoad()

Callers 3

onKnobValueChangedMethod · 0.80
setOrAddProjectFormatMethod · 0.80

Calls 9

populateChoicesMethod · 0.80
lockMethod · 0.45
getValueMethod · 0.45
beginChangesMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
setValueMethod · 0.45
endChangesMethod · 0.45

Tested by

no test coverage detected