| 654 | |
| 655 | |
| 656 | void |
| 657 | Node::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 | |
| 687 | void |
no test coverage detected