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

Method restoreDefaultValues

Engine/Knob.cpp:6239–6260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6237}
6238
6239void
6240KnobHolder::restoreDefaultValues()
6241{
6242 assert( QThread::currentThread() == qApp->thread() );
6243
6244 aboutToRestoreDefaultValues();
6245
6246 beginChanges();
6247
6248 for (U32 i = 0; i < _imp->knobs.size(); ++i) {
6249 KnobButton* isBtn = dynamic_cast<KnobButton*>( _imp->knobs[i].get() );
6250 KnobSeparator* isSeparator = dynamic_cast<KnobSeparator*>( _imp->knobs[i].get() );
6251
6252 ///Don't restore buttons and the node label
6253 if ( ( !isBtn || isBtn->getIsCheckable() ) && !isSeparator && (_imp->knobs[i]->getName() != kUserLabelKnobName) ) {
6254 for (int d = 0; d < _imp->knobs[i]->getDimension(); ++d) {
6255 _imp->knobs[i]->resetToDefaultValue(d);
6256 }
6257 }
6258 }
6259 endChanges();
6260}
6261
6262void
6263KnobHolder::setKnobsFrozen(bool frozen)

Callers

nothing calls this directly

Calls 6

getIsCheckableMethod · 0.80
getNameMethod · 0.80
resetToDefaultValueMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45
getDimensionMethod · 0.45

Tested by

no test coverage detected