|
|
|
|
@ -92,7 +92,6 @@ namespace AtomToolsFramework
|
|
|
|
|
AtomToolsMainWindowNotificationBus::Handler::BusDisconnect();
|
|
|
|
|
AzToolsFramework::AssetDatabase::AssetDatabaseRequestsBus::Handler::BusDisconnect();
|
|
|
|
|
AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusDisconnect();
|
|
|
|
|
AzFramework::AssetCatalogEventBus::Handler::BusDisconnect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AtomToolsApplication::CreateReflectionManager()
|
|
|
|
|
@ -175,11 +174,18 @@ namespace AtomToolsFramework
|
|
|
|
|
AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotificationBus::Broadcast(
|
|
|
|
|
&AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotifications::OnDatabaseInitialized);
|
|
|
|
|
|
|
|
|
|
AzFramework::AssetCatalogEventBus::Handler::BusConnect();
|
|
|
|
|
AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::LoadCatalog, "@assets@/assetcatalog.xml");
|
|
|
|
|
|
|
|
|
|
if (!AZ::RPI::RPISystemInterface::Get()->IsInitialized())
|
|
|
|
|
{
|
|
|
|
|
AZ::RPI::RPISystemInterface::Get()->InitializeSystemAssets();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LoadSettings();
|
|
|
|
|
|
|
|
|
|
AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::CreateMainWindow);
|
|
|
|
|
AtomToolsMainWindowNotificationBus::Handler::BusConnect();
|
|
|
|
|
|
|
|
|
|
auto editorPythonEventsInterface = AZ::Interface<AzToolsFramework::EditorPythonEventsInterface>::Get();
|
|
|
|
|
if (editorPythonEventsInterface)
|
|
|
|
|
{
|
|
|
|
|
@ -189,6 +195,9 @@ namespace AtomToolsFramework
|
|
|
|
|
editorPythonEventsInterface->StartPython();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QTimer::singleShot(0, this, [this]() {
|
|
|
|
|
ProcessCommandLine(m_commandLine);
|
|
|
|
|
});
|
|
|
|
|
m_timer.start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -197,26 +206,12 @@ namespace AtomToolsFramework
|
|
|
|
|
ExitMainLoop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AtomToolsApplication::OnCatalogLoaded(const char* catalogFile)
|
|
|
|
|
{
|
|
|
|
|
AZ_UNUSED(catalogFile);
|
|
|
|
|
|
|
|
|
|
// Delay execution of commands and scripts post initialization
|
|
|
|
|
AZ::TickBus::QueueFunction([this]() {
|
|
|
|
|
AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::CreateMainWindow);
|
|
|
|
|
AtomToolsMainWindowNotificationBus::Handler::BusConnect();
|
|
|
|
|
ProcessCommandLine(m_commandLine);
|
|
|
|
|
});
|
|
|
|
|
AzFramework::AssetCatalogEventBus::Handler::BusDisconnect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AtomToolsApplication::Destroy()
|
|
|
|
|
{
|
|
|
|
|
// before modules are unloaded, destroy UI to free up any assets it cached
|
|
|
|
|
AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::DestroyMainWindow);
|
|
|
|
|
m_styleManager.reset();
|
|
|
|
|
|
|
|
|
|
AzFramework::AssetCatalogEventBus::Handler::BusDisconnect();
|
|
|
|
|
AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusDisconnect();
|
|
|
|
|
AzToolsFramework::AssetDatabase::AssetDatabaseRequestsBus::Handler::BusDisconnect();
|
|
|
|
|
AtomToolsMainWindowNotificationBus::Handler::BusDisconnect();
|
|
|
|
|
|