MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / setAsTopLevelInstance

Method setAsTopLevelInstance

Engine/AppManager.cpp:2090–2113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2088}
2089
2090void
2091AppManager::setAsTopLevelInstance(int appID)
2092{
2093 QMutexLocker k(&_imp->_appInstancesMutex);
2094
2095 if (_imp->_topLevelInstanceID == appID) {
2096 return;
2097 }
2098 _imp->_topLevelInstanceID = appID;
2099 for (AppInstanceVec::iterator it = _imp->_appInstances.begin();
2100 it != _imp->_appInstances.end();
2101 ++it) {
2102 if ( (*it)->getAppID() != _imp->_topLevelInstanceID ) {
2103 if ( !isBackground() ) {
2104 (*it)->disconnectViewersFromViewerCache();
2105 }
2106 } else {
2107 if ( !isBackground() ) {
2108 (*it)->connectViewersToViewerCache();
2109 setOFXHostHandle( (*it)->getOfxHostOSHandle() );
2110 }
2111 }
2112 }
2113}
2114
2115void
2116AppManager::setOFXHostHandle(void* handle)

Callers 1

eventFilterMethod · 0.80

Calls 6

beginMethod · 0.45
endMethod · 0.45
getAppIDMethod · 0.45
getOfxHostOSHandleMethod · 0.45

Tested by

no test coverage detected