Asset Bundler GUI (#427)
The AssetBundler is a new ToolsApplication that allows users to work through the entire Asset Bundling process without ever touching a command line. * Integrating github/AssetBundler through commit 1d65018 * Asset Bundler bug fixes: platform initialization and GUI styling (#5) * fixed enabled platform initialization * fixed the cached engine root. This fixed some of my Seeds tab data issues. The default Engine Seed List appeared, and was able to display the contents on screen. * updated my notes of active bugs * changed some casing in various include lines to hopefully fix my linux build * another include fix for linux * AssetBundler GUI is now compiling on Mac * removed some things off of my todo list because the mac build fix actually fixed the visuals! everything's the right color again * removed the word Lumberyard from the bundler * Asset bundler bug fixes - Bundles, Gems, and Tests (#9) * Fixed the Bundle loading and generation problem. Turned out to be a FileWatcher issue. * turns out gem loading wasn't broken, there were just no existing SeedListFiles for any of the gems loaded by the AutomatedTesting project. I added a default SeedListFile for the PrimitiveAssets Gem. * fixed some failing AssetBundler Gem tests * Misunderstood the need to have default seed lists for asset-only gems. removing the previously created seed list file * Asset bundler bug fixes: Seeds Tab display issues and _dependencies.xml loading (#10) * Fixed the Project Source column in the Seeds tab * The AssetBundler will no longer attempt to copy a template version of the ProjectName_dependencies.xml file into your active project. However, it will throw an error if you do not have one. A follow-up ticket has been cut to address this issue. * updated the AssetBundler icon. This one matches the current style guides * PR feedback: pass a const ref instead of a value * PR feedback: safer conversion from a string_view to a QString Co-authored-by: alexpete <alexpete@amazon.com>
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
#include <AzFramework/Platform/PlatformDefaults.h>
|
||||
#include <AzToolsFramework/Asset/AssetBundler.h>
|
||||
#include <AzToolsFramework/Asset/AssetUtils.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QStringList>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace AssetBundler
|
||||
{
|
||||
@@ -120,8 +122,20 @@ namespace AssetBundler
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
extern const char* AssetCatalogFilename;
|
||||
extern AZ::IO::FixedMaxPath g_cachedEngineRoot;
|
||||
static const size_t MaxErrorMessageLength = 4096;
|
||||
|
||||
//! This struct stores gem related information
|
||||
struct GemInfo
|
||||
{
|
||||
AZ_CLASS_ALLOCATOR(GemInfo, AZ::SystemAllocator, 0);
|
||||
GemInfo(AZStd::string name, AZStd::string relativeFilePath, AZStd::string absoluteFilePath);
|
||||
GemInfo() = default;
|
||||
AZStd::string m_gemName;
|
||||
AZStd::string m_relativeFilePath;
|
||||
AZStd::string m_absoluteFilePath;
|
||||
};
|
||||
|
||||
|
||||
// The Warning Absorber is used to absorb warnings
|
||||
// One case that this is being used is during loading of the asset catalog.
|
||||
@@ -137,8 +151,8 @@ namespace AssetBundler
|
||||
bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override;
|
||||
};
|
||||
|
||||
// Returns the engine root
|
||||
AZ::IO::FixedMaxPath GetEngineRoot();
|
||||
// Returns the cached engine root. Throws an error if the cached path has not been initialized by the Bundler Application.
|
||||
AZ::IO::FixedMaxPath GetCachedEngineRoot();
|
||||
|
||||
/**
|
||||
* Determines the name of the currently enabled game project
|
||||
@@ -192,6 +206,8 @@ namespace AssetBundler
|
||||
*/
|
||||
AZ::IO::Path GetPlatformSpecificCacheFolderPath();
|
||||
|
||||
AZStd::string GenerateKeyFromAbsolutePath(const AZStd::string& absoluteFilePath);
|
||||
|
||||
void ConvertToRelativePath(AZStd::string_view parentFolderPath, AZStd::string& absoluteFilePath);
|
||||
|
||||
AZ::Outcome<void, AZStd::string> MakePath(const AZStd::string& path);
|
||||
@@ -207,16 +223,13 @@ namespace AssetBundler
|
||||
const AZStd::vector<AzFramework::GemInfo>& gemInfoList, AzFramework::PlatformFlags platformFlags);
|
||||
|
||||
//! Returns a vector of relative paths to Assets that should be included as default Seeds, but are not already in a Seed List file.
|
||||
AZStd::vector<AZStd::string> GetDefaultSeeds(AZStd::string_view enginePath, AZStd::string_view projectPath, AZStd::string_view projectName);
|
||||
AZStd::vector<AZStd::string> GetDefaultSeeds(AZStd::string_view projectPath, AZStd::string_view projectName);
|
||||
|
||||
//! Returns the absolute path of {ProjectName}_Dependencies.xml
|
||||
AZ::IO::Path GetProjectDependenciesFile(AZStd::string_view productPath, AZStd::string_view projectName);
|
||||
|
||||
//! Returns the absolute path of the project dependencies file in the default project template
|
||||
AZ::IO::Path GetProjectDependenciesFileTemplate(AZStd::string_view enginePath);
|
||||
|
||||
//! Creates the ProjectName_Dependencies.xml file if it does not exist, and adds returns the relative path to the asset in the Cache.
|
||||
AZ::IO::Path GetProjectDependenciesAssetPath(AZStd::string_view enginePath, AZStd::string_view projectPath, AZStd::string_view projectName);
|
||||
AZ::IO::Path GetProjectDependenciesAssetPath(AZStd::string_view projectPath, AZStd::string_view projectName);
|
||||
|
||||
//! Returns the map from gem seed list file path to gem name
|
||||
AZStd::unordered_map<AZStd::string, AZStd::string> GetGemSeedListFilePathToGemNameMap(const AZStd::vector<AzFramework::GemInfo>& gemInfoList, AzFramework::PlatformFlags platformFlags);
|
||||
@@ -229,6 +242,9 @@ namespace AssetBundler
|
||||
//! Please note that the game project could be in a different location to the engine therefore we need the assetRoot param.
|
||||
AzFramework::PlatformFlags GetEnabledPlatformFlags(AZStd::string_view enginePath, AZStd::string_view assetRoot, AZStd::string_view projectPath);
|
||||
|
||||
QJsonObject ReadJson(const AZStd::string& filePath);
|
||||
void SaveJson(const AZStd::string& filePath, const QJsonObject& jsonObject);
|
||||
|
||||
//! Filepath is a helper class that is used to find the absolute path of a file
|
||||
//! if the inputted file path is an absolute path than it does nothing
|
||||
//! if the inputted file path is a relative path than based on whether the user
|
||||
|
||||
Reference in New Issue
Block a user