MCPcopy Create free account
hub / github.com/MrKepzie/Natron / loadProject

Method loadProject

Engine/AppInstance.cpp:2235–2258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2233}
2234
2235AppInstPtr
2236AppInstance::loadProject(const std::string& filename)
2237{
2238 QFileInfo file( QString::fromUtf8( filename.c_str() ) );
2239
2240 if ( !file.exists() ) {
2241 return AppInstPtr();
2242 }
2243 QString fileUnPathed = file.fileName();
2244 QString path = file.path() + QChar::fromLatin1('/');
2245
2246 //We are in background mode, there can only be 1 instance active, wipe the current project
2247 boost::shared_ptr<Project> project = getProject();
2248 project->resetProject();
2249
2250 bool ok = project->loadProject( path, fileUnPathed);
2251 if (ok) {
2252 return shared_from_this();
2253 }
2254
2255 project->resetProject();
2256
2257 return AppInstPtr();
2258}
2259
2260///Close the current project but keep the window
2261bool

Callers 1

loadInternalMethod · 0.45

Calls 2

pathMethod · 0.45
resetProjectMethod · 0.45

Tested by

no test coverage detected