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

Method loadKnobs

Engine/Node.cpp:981–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

979
980
981void
982Node::loadKnobs(const NodeSerialization & serialization,
983 bool updateKnobGui)
984{
985 ///Only called from the main thread
986 assert( QThread::currentThread() == qApp->thread() );
987 assert(_imp->knobsInitialized);
988 if ( serialization.isNull() ) {
989 return;
990 }
991
992
993 {
994 QMutexLocker k(&_imp->createdComponentsMutex);
995 _imp->createdComponents = serialization.getUserCreatedComponents();
996 }
997
998 const std::vector<KnobIPtr> & nodeKnobs = getKnobs();
999 ///for all knobs of the node
1000 for (U32 j = 0; j < nodeKnobs.size(); ++j) {
1001 loadKnob(nodeKnobs[j], serialization, updateKnobGui);
1002 }
1003 ///now restore the roto context if the node has a roto context
1004 if (serialization.hasRotoContext() && _imp->rotoContext) {
1005 _imp->rotoContext->load( serialization.getRotoContext() );
1006 }
1007
1008 if (serialization.hasTrackerContext() && _imp->trackContext) {
1009 _imp->trackContext->load( serialization.getTrackerContext() );
1010 }
1011
1012 restoreUserKnobs(serialization);
1013
1014 setKnobsAge( serialization.getKnobsAge() );
1015
1016
1017 _imp->effect->onKnobsLoaded();
1018}
1019
1020void
1021Node::restoreSublabel()

Callers 5

undoMethod · 0.80
redoMethod · 0.80

Calls 8

getTrackerContextMethod · 0.80
isNullMethod · 0.45
sizeMethod · 0.45
loadMethod · 0.45
getRotoContextMethod · 0.45
getKnobsAgeMethod · 0.45
onKnobsLoadedMethod · 0.45

Tested by

no test coverage detected