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

Method initializeKnobs

Engine/Node.cpp:2414–2448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2412} // Node::initializeDefaultKnobs
2413
2414void
2415Node::initializeKnobs(bool loadingSerialization)
2416{
2417 ////Only called by the main-thread
2418
2419
2420 _imp->effect->beginChanges();
2421
2422 assert( QThread::currentThread() == qApp->thread() );
2423 assert(!_imp->knobsInitialized);
2424
2425 ///For groups, declare the plugin knobs after the node knobs because we want to use the Node page
2426 bool effectIsGroup = getPluginID() == PLUGINID_NATRON_GROUP;
2427
2428 if (!effectIsGroup) {
2429 //Initialize plug-in knobs
2430 _imp->effect->initializeKnobsPublic();
2431 }
2432
2433 InitializeKnobsFlag_RAII __isInitializingKnobsFlag__( _imp->effect.get() );
2434
2435 if ( _imp->effect->getMakeSettingsPanel() ) {
2436 //initialize default knobs added by Natron
2437 initializeDefaultKnobs(loadingSerialization);
2438 }
2439
2440 if (effectIsGroup) {
2441 _imp->effect->initializeKnobsPublic();
2442 }
2443 _imp->effect->endChanges();
2444
2445 _imp->knobsInitialized = true;
2446
2447 Q_EMIT knobsInitialized();
2448} // initializeKnobs
2449
2450void
2451Node::Implementation::createChannelSelector(int inputNb,

Callers 1

Calls 5

initializeKnobsPublicMethod · 0.80
getPluginIDFunction · 0.50
beginChangesMethod · 0.45
getMethod · 0.45
endChangesMethod · 0.45

Tested by

no test coverage detected