Working on making Material Editor able to open materials that have missing textures.

Made it a warning instead of an error when MaterialAssetCreator can't find a texture.
Updated the Material Editor's MaterialDocument class to not elevate warnings to errors.
Material Editor uses new features in TraceRecorder to show a message dialog when warnings are detected so the user is notified of the missing texture.

Next I will work on making MaterialAssetCreator put a "missing" texture in place of the requested one.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
santorac
2021-11-10 14:02:17 -08:00
parent 87c7023e3c
commit cd28d210ab
5 changed files with 84 additions and 6 deletions
@@ -26,6 +26,21 @@ namespace AtomToolsFramework
//! Get the combined output of all messages
AZStd::string GetDump() const;
//! Return the number of OnAssert calls
size_t GetAssertCount() const;
//! Return the number of OnException calls
size_t GetExceptionCount() const;
//! Return the number of OnError calls, and includes OnAssert and OnException if @includeHigher is true
size_t GetErrorCount(bool includeHigher = false) const;
//! Return the number of OnWarning calls, and includes higher categories if @includeHigher is true
size_t GetWarningCount(bool includeHigher = false) const;
//! Return the number of OnPrintf calls, and includes higher categories if @includeHigher is true
size_t GetPrintfCount(bool includeHigher = false) const;
private:
//////////////////////////////////////////////////////////////////////////
// AZ::Debug::TraceMessageBus::Handler overrides...
@@ -38,5 +53,11 @@ namespace AtomToolsFramework
size_t m_maxMessageCount = std::numeric_limits<size_t>::max();
AZStd::list<AZStd::string> m_messages;
size_t m_assertCount = 0;
size_t m_exceptionCount = 0;
size_t m_errorCount = 0;
size_t m_warningCount = 0;
size_t m_printfCount = 0;
};
} // namespace AtomToolsFramework