| 979 | |
| 980 | |
| 981 | void |
| 982 | Node::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 | |
| 1020 | void |
| 1021 | Node::restoreSublabel() |
no test coverage detected