| 301 | |
| 302 | |
| 303 | void |
| 304 | Node::restoreUserKnobs(const NodeSerialization& serialization) |
| 305 | { |
| 306 | const std::list<GroupKnobSerializationPtr>& userPages = serialization.getUserPages(); |
| 307 | |
| 308 | for (std::list<GroupKnobSerializationPtr>::const_iterator it = userPages.begin(); it != userPages.end(); ++it) { |
| 309 | KnobIPtr found = getKnobByName( (*it)->getName() ); |
| 310 | KnobPagePtr page; |
| 311 | if (!found) { |
| 312 | page = AppManager::createKnob<KnobPage>(_imp->effect.get(), (*it)->getLabel(), 1, false); |
| 313 | page->setAsUserKnob(true); |
| 314 | page->setName( (*it)->getName() ); |
| 315 | } else { |
| 316 | page = std::dynamic_pointer_cast<KnobPage>(found); |
| 317 | } |
| 318 | if (page) { |
| 319 | _imp->restoreUserKnobsRecursive( (*it)->getChildren(), KnobGroupPtr(), page ); |
| 320 | } |
| 321 | } |
| 322 | setPagesOrder( serialization.getPagesOrdered() ); |
| 323 | } |
| 324 | |
| 325 | void |
| 326 | Node::Implementation::restoreUserKnobsRecursive(const std::list<KnobSerializationBasePtr>& knobs, |
nothing calls this directly
no test coverage detected