Change SerializeContextTools into a ToolsApplication so that it can correctly read in slice data:

- Uses ToolsApplication instead of ComponentApplication so that built-in Editor components are recognized and read in correctly
- Starts up all the DynamicModules immediately so that the System Components are activated, which registers asset handlers and allows asset references to serialize in correctly
- Adds a -specialization command-line flag to specify which project specialization to use (editor, game, etc)
- Removes the filter to ignore unknown classes since they should all now be "known"
- Adds a few gem autoload flags and a null thumbnail service so that Qt and Python systems can be skipped, as they aren't needed for the data conversions and would bring additional overhead and complications
This commit is contained in:
mbalfour
2021-05-11 16:13:04 -05:00
parent 21dfcfed74
commit b5e87d3601
6 changed files with 59 additions and 14 deletions
+2 -5
View File
@@ -23,6 +23,7 @@ void PrintHelp()
AZ_Printf("Help", "Serialize Context Tool\n");
AZ_Printf("Help", " <action> [-config] <action arguments>*\n");
AZ_Printf("Help", " [opt] -config=<path>: optional path to application's config file. Default is 'config/editor.xml'.\n");
AZ_Printf("Help", " [opt] -specialization=<prefix>: optional Registry project specialization, such as 'editor' or 'game'. Default is none. \n");
AZ_Printf("Help", "\n");
AZ_Printf("Help", " 'help': Print this help\n");
AZ_Printf("Help", " example: 'help'\n");
@@ -81,11 +82,7 @@ int main(int argc, char** argv)
bool result = false;
Application application(argc, argv);
AZ::ComponentApplication::StartupParameters startupParameters;
startupParameters.m_loadDynamicModules = false;
application.Create({}, startupParameters);
// Load the DynamicModules after the Application starts to prevent Gem System Components
// from activating
application.LoadDynamicModules();
application.Start({}, startupParameters);
const AZ::CommandLine* commandLine = application.GetAzCommandLine();
if (commandLine->GetNumMiscValues() < 1)