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

Method storeKnobLinksRecursive

Engine/NodeMain.cpp:656–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654
655
656void
657Node::Implementation::storeKnobLinksRecursive(const GroupKnobSerialization* group,
658 const std::map<std::string, std::string>& oldNewScriptNamesMapping)
659{
660 const std::list<KnobSerializationBasePtr>& children = group->getChildren();
661
662 for (std::list<KnobSerializationBasePtr>::const_iterator it = children.begin(); it != children.end(); ++it) {
663 GroupKnobSerialization* isGrp = dynamic_cast<GroupKnobSerialization*>( it->get() );
664 KnobSerialization* isRegular = dynamic_cast<KnobSerialization*>( it->get() );
665 assert(isGrp || isRegular);
666 if (isGrp) {
667 storeKnobLinksRecursive(isGrp, oldNewScriptNamesMapping);
668 } else if (isRegular) {
669 KnobIPtr knob = _publicInterface->getKnobByName( isRegular->getName() );
670 if (!knob) {
671 LogEntry::LogEntryColor c;
672 if (_publicInterface->getColor(&c.r, &c.g, &c.b)) {
673 c.colorSet = true;
674 }
675
676 QString err = tr("Could not find a parameter named %1").arg( QString::fromUtf8( (*it)->getName().c_str() ) );
677 appPTR->writeToErrorLog_mt_safe(QString::fromUtf8( _publicInterface->getScriptName_mt_safe().c_str() ), QDateTime::currentDateTime(), err, false, c);
678 continue;
679 }
680 isRegular->storeKnobLinks(knob);
681 isRegular->restoreExpressions(knob, oldNewScriptNamesMapping);
682 }
683 }
684}
685
686
687void

Callers 1

storeKnobsLinksMethod · 0.80

Calls 11

getNameMethod · 0.80
storeKnobLinksMethod · 0.80
restoreExpressionsMethod · 0.80
getChildrenMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
getKnobByNameMethod · 0.45
getColorMethod · 0.45
getScriptName_mt_safeMethod · 0.45

Tested by

no test coverage detected