Integrating latest from github/staging
Integrating up through commit 5e1bdae
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <AzCore/RTTI/TypeInfo.h>
|
||||
#include <AzCore/Component/ComponentApplicationBus.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/Slice/SliceAsset.h>
|
||||
#include <AzCore/Asset/AssetManager.h>
|
||||
#include <AzCore/Asset/AssetManagerBus.h>
|
||||
@@ -458,7 +459,10 @@ void AssetCatalogModel::LoadDatabase()
|
||||
clear();
|
||||
|
||||
AZStd::string assetRootFolder;
|
||||
EBUS_EVENT_RESULT(assetRootFolder, AzFramework::ApplicationRequests::Bus, GetAssetRoot);
|
||||
if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr)
|
||||
{
|
||||
settingsRegistry->Get(assetRootFolder, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder);
|
||||
}
|
||||
m_rootPath = assetRootFolder.c_str();
|
||||
|
||||
auto startCB = []() {};
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
#include <AzCore/Component/Entity.h>
|
||||
#include <AzCore/Component/EntityUtils.h>
|
||||
#include <AzCore/Debug/Profiler.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Serialization/Utils.h>
|
||||
#include <AzCore/Settings//SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/Slice/SliceComponent.h>
|
||||
#include <AzCore/std/sort.h>
|
||||
|
||||
@@ -151,7 +153,12 @@ OutlinerWidget::OutlinerWidget(QWidget* pParent, Qt::WindowFlags flags)
|
||||
m_gui->setupUi(this);
|
||||
|
||||
|
||||
QDir rootDir(AzQtComponents::FindEngineRootDir(qApp));
|
||||
AZ::IO::FixedMaxPath engineRootPath;
|
||||
if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr)
|
||||
{
|
||||
settingsRegistry->Get(engineRootPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder);
|
||||
}
|
||||
QDir rootDir = QString::fromUtf8(engineRootPath.c_str(), aznumeric_cast<int>(engineRootPath.Native().size()));
|
||||
const auto pathOnDisk = rootDir.absoluteFilePath(QStringLiteral("Code/Sandbox/Plugins/ComponentEntityEditorPlugin/UI/Outliner/"));
|
||||
const auto qrcPath = QStringLiteral(":/EntityOutliner/");
|
||||
|
||||
@@ -159,7 +166,7 @@ OutlinerWidget::OutlinerWidget(QWidget* pParent, Qt::WindowFlags flags)
|
||||
// developers. The style will be loaded from a Qt Resource file if Editor is installed, but
|
||||
// developers with the file on disk will be able to modify the style and have it automatically
|
||||
// reloaded.
|
||||
AzQtComponents::StyleManager::addSearchPaths("EntityOutliner", pathOnDisk, qrcPath);
|
||||
AzQtComponents::StyleManager::addSearchPaths("EntityOutliner", pathOnDisk, qrcPath, engineRootPath);
|
||||
AzQtComponents::StyleManager::setStyleSheet(this, QStringLiteral("EntityOutliner:EntityOutliner.qss"));
|
||||
|
||||
m_listModel = aznew OutlinerListModel(this);
|
||||
|
||||
@@ -24,12 +24,11 @@ namespace ProjectSettingsTool
|
||||
if (serialize)
|
||||
{
|
||||
serialize->Class<BaseSettings>()
|
||||
->Version(1)
|
||||
->Version(2)
|
||||
->Field("project_name", &BaseSettings::m_projectName)
|
||||
->Field("product_name", &BaseSettings::m_productName)
|
||||
->Field("executable_name", &BaseSettings::m_executableName)
|
||||
->Field("sys_game_folder", &BaseSettings::m_sysGameFolder)
|
||||
->Field("sys_dll_game", &BaseSettings::m_sysDllGame)
|
||||
->Field("project_path", &BaseSettings::m_projectPath)
|
||||
->Field("project_output_folder", &BaseSettings::m_projectOutputFolder)
|
||||
->Field("code_folder", &BaseSettings::m_codeFolder)
|
||||
;
|
||||
@@ -52,7 +51,7 @@ namespace ProjectSettingsTool
|
||||
->Attribute(Attributes::FuncValidator, ConvertFunctorToVoid(&Validators::FileName))
|
||||
->Attribute(Attributes::PropertyIdentfier, Identfiers::ExecutableName)
|
||||
->Attribute(Attributes::LinkedProperty, Identfiers::IosExecutableName)
|
||||
->DataElement(Handlers::QValidatedLineEdit, &BaseSettings::m_sysGameFolder, "Game Folder", "The name of the project's folder.")
|
||||
->DataElement(Handlers::QValidatedLineEdit, &BaseSettings::m_projectPath, "Project Path", "The project root folder path .")
|
||||
->Attribute(Attributes::FuncValidator, ConvertFunctorToVoid(&Validators::FileNameOrEmpty))
|
||||
->Attribute(Attributes::PropertyIdentfier, Identfiers::ProductName)
|
||||
->Attribute(Attributes::LinkedProperty, Identfiers::ExecutableName)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace ProjectSettingsTool
|
||||
: m_projectName("")
|
||||
, m_productName("")
|
||||
, m_executableName("")
|
||||
, m_sysGameFolder("")
|
||||
, m_projectPath("")
|
||||
, m_sysDllGame("")
|
||||
, m_projectOutputFolder("")
|
||||
, m_codeFolder("")
|
||||
@@ -37,7 +37,7 @@ namespace ProjectSettingsTool
|
||||
AZStd::string m_projectName;
|
||||
AZStd::string m_productName;
|
||||
AZStd::string m_executableName;
|
||||
AZStd::string m_sysGameFolder;
|
||||
AZStd::string m_projectPath;
|
||||
AZStd::string m_sysDllGame;
|
||||
AZStd::string m_projectOutputFolder;
|
||||
AZStd::string m_codeFolder;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <AzCore/IO/SystemFile.h>
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
|
||||
@@ -72,15 +73,15 @@ namespace
|
||||
template<>
|
||||
AZStd::string GetProjectName()
|
||||
{
|
||||
AZStd::string projectRoot = GetAbsoluteProjectRoot<AZStd::string>();
|
||||
return projectRoot.substr(projectRoot.find_last_of('/') + 1);
|
||||
auto projectName = AZ::Utils::GetProjectName();
|
||||
return AZStd::string{projectName.c_str()};
|
||||
}
|
||||
|
||||
template<>
|
||||
QString GetProjectName()
|
||||
{
|
||||
QString projectRoot = GetAbsoluteProjectRoot<QString>();
|
||||
return projectRoot.mid(projectRoot.lastIndexOf('/'));
|
||||
auto projectName = AZ::Utils::GetProjectName();
|
||||
return QString::fromUtf8(projectName.c_str(), aznumeric_cast<int>(projectName.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user