| 34 | #include "Engine/TimeLine.h" |
| 35 | |
| 36 | NATRON_NAMESPACE_ENTER |
| 37 | |
| 38 | void |
| 39 | ProjectSerialization::initialize(const Project* project) |
| 40 | { |
| 41 | ///All the code in this function is MT-safe |
| 42 | |
| 43 | _nodes.initialize(*project); |
| 44 | |
| 45 | project->getAdditionalFormats(&_additionalFormats); |
| 46 | |
| 47 | std::vector<KnobIPtr> knobs = project->getKnobs_mt_safe(); |
| 48 | for (U32 i = 0; i < knobs.size(); ++i) { |
| 49 | KnobGroup* isGroup = dynamic_cast<KnobGroup*>( knobs[i].get() ); |
| 50 | KnobPage* isPage = dynamic_cast<KnobPage*>( knobs[i].get() ); |
| 51 | KnobButton* isButton = dynamic_cast<KnobButton*>( knobs[i].get() ); |
| 52 | if ( knobs[i]->getIsPersistent() && |
| 53 | !isGroup && !isPage && !isButton && |
| 54 | knobs[i]->hasModificationsForSerialization() ) { |
| 55 | KnobSerializationPtr newKnobSer = std::make_shared<KnobSerialization>(knobs[i]); |
| 56 | _projectKnobs.push_back(newKnobSer); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | _timelineCurrent = project->currentFrame(); |
| 61 | |
| 62 | _creationDate = project->getProjectCreationTime(); |
| 63 | } |
| 64 | |
| 65 | NATRON_NAMESPACE_EXIT |
nothing calls this directly
no test coverage detected