diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp index 14661b442b..f6be1d9d5a 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.cpp @@ -281,6 +281,24 @@ namespace MaterialEditor } } + bool MaterialEditorApplication::OnOutput(const char* window, const char* message) + { + // Suppress spam from the Source Control system + if (0 == strncmp(window, AzToolsFramework::SCC_WINDOW, AZ_ARRAY_SIZE(AzToolsFramework::SCC_WINDOW))) + { + return true; + } + + if (m_logFile) + { + m_logFile->AppendLog(AzFramework::LogFile::SEV_NORMAL, window, message); + } + else + { + m_startupLogSink.push_back({ window, message }); + } + return false; + } void MaterialEditorApplication::ProcessCommandLine(const AZ::CommandLine& commandLine) { diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h index e309a56304..f6ad0010d8 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/MaterialEditorApplication.h @@ -96,6 +96,11 @@ namespace MaterialEditor void SaveSettings() override; ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // AZ::Debug::TraceMessageBus::Handler overrides... + bool OnOutput(const char* window, const char* message) override; + ////////////////////////////////////////////////////////////////////////// + void CompileCriticalAssets(); void ProcessCommandLine(const AZ::CommandLine& commandLine);