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

Method storeKnobsLinks

Engine/NodeMain.cpp:687–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685
686
687void
688Node::storeKnobsLinks(const NodeSerialization & serialization,
689 const std::map<std::string, std::string>& oldNewScriptNamesMapping)
690{
691 ////Only called by the main-thread
692 assert( QThread::currentThread() == qApp->thread() );
693
694 const NodeSerialization::KnobValues & knobsValues = serialization.getKnobsValues();
695 ///try to find a serialized value for this knob
696 for (NodeSerialization::KnobValues::const_iterator it = knobsValues.begin(); it != knobsValues.end(); ++it) {
697 KnobIPtr knob = getKnobByName( (*it)->getName() );
698 if (!knob) {
699 LogEntry::LogEntryColor c;
700 if (getColor(&c.r, &c.g, &c.b)) {
701 c.colorSet = true;
702 }
703
704 QString err = tr("Could not find a parameter named %1").arg( QString::fromUtf8( (*it)->getName().c_str() ) );
705 appPTR->writeToErrorLog_mt_safe(QString::fromUtf8( getScriptName_mt_safe().c_str() ), QDateTime::currentDateTime(), err, false, c);
706 continue;
707 }
708 (*it)->storeKnobLinks(knob);
709 (*it)->restoreExpressions(knob, oldNewScriptNamesMapping);
710 }
711
712 const std::list<GroupKnobSerializationPtr>& userKnobs = serialization.getUserPages();
713 for (std::list<GroupKnobSerializationPtr>::const_iterator it = userKnobs.begin(); it != userKnobs.end(); ++it) {
714 _imp->storeKnobLinksRecursive( (*it).get(), oldNewScriptNamesMapping );
715 }
716}
717
718
719void

Callers 6

pasteNodesInternalMethod · 0.80
pasteNodeMethod · 0.80
cloneSelectedNodesMethod · 0.80
redoMethod · 0.80

Calls 10

getNameMethod · 0.80
storeKnobLinksMethod · 0.80
restoreExpressionsMethod · 0.80
getColorFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
getUserPagesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected