Removing material type asset info
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <LmbrCentral/Rendering/LensFlareAsset.h>
|
||||
#include <LmbrCentral/Rendering/MeshAsset.h>
|
||||
#include <LmbrCentral/Rendering/MaterialAsset.h>
|
||||
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
#include <AzCore/RTTI/TypeInfo.h>
|
||||
@@ -136,14 +135,6 @@ AssetCatalogModel::AssetCatalogModel(QObject* parent)
|
||||
}
|
||||
}
|
||||
|
||||
// Special cases for SimpleAssets. If these get full-fledged AssetData types, these cases can be removed.
|
||||
QString textureExtensions = LmbrCentral::TextureAsset::GetFileFilter();
|
||||
m_extensionToAssetType.insert(AZStd::make_pair(textureExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector<AZ::Uuid> { AZ::AzTypeInfo<LmbrCentral::TextureAsset>::Uuid() }));
|
||||
QString materialExtensions = LmbrCentral::MaterialAsset::GetFileFilter();
|
||||
m_extensionToAssetType.insert(AZStd::make_pair(materialExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector<AZ::Uuid> { AZ::AzTypeInfo<LmbrCentral::MaterialAsset>::Uuid() }));
|
||||
QString dccMaterialExtensions = LmbrCentral::DccMaterialAsset::GetFileFilter();
|
||||
m_extensionToAssetType.insert(AZStd::make_pair(dccMaterialExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector<AZ::Uuid> { AZ::AzTypeInfo<LmbrCentral::DccMaterialAsset>::Uuid() }));
|
||||
|
||||
AZ::SerializeContext* serializeContext = nullptr;
|
||||
EBUS_EVENT_RESULT(serializeContext, AZ::ComponentApplicationBus, GetSerializeContext);
|
||||
AZ_Assert(serializeContext, "Failed to acquire application serialize context.");
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
#include "Geometry/GeometrySystemComponent.h"
|
||||
#include <Asset/AssetSystemDebugComponent.h>
|
||||
|
||||
// Unhandled asset types
|
||||
// Material
|
||||
#include "Unhandled/Material/MaterialAssetTypeInfo.h"
|
||||
// Other
|
||||
#include "Unhandled/Other/AudioAssetTypeInfo.h"
|
||||
#include "Unhandled/Other/CharacterPhysicsAssetTypeInfo.h"
|
||||
@@ -353,8 +350,6 @@ namespace LmbrCentral
|
||||
// Add asset types and extensions to AssetCatalog. Uses "AssetCatalogService".
|
||||
if (auto assetCatalog = AZ::Data::AssetCatalogRequestBus::FindFirstHandler(); assetCatalog)
|
||||
{
|
||||
assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo<MaterialAsset>::Uuid());
|
||||
assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo<DccMaterialAsset>::Uuid());
|
||||
assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo<MeshAsset>::Uuid());
|
||||
assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo<CharacterDefinitionAsset>::Uuid());
|
||||
|
||||
@@ -370,16 +365,6 @@ namespace LmbrCentral
|
||||
|
||||
AZ::Data::AssetManagerNotificationBus::Handler::BusConnect();
|
||||
|
||||
|
||||
// Register unhandled asset type info
|
||||
// Material
|
||||
auto materialAssetTypeInfo = aznew MaterialAssetTypeInfo();
|
||||
materialAssetTypeInfo->Register();
|
||||
m_unhandledAssetInfo.emplace_back(materialAssetTypeInfo);
|
||||
// DCC Material
|
||||
auto dccMaterialAssetTypeInfo = aznew DccMaterialAssetTypeInfo();
|
||||
dccMaterialAssetTypeInfo->Register();
|
||||
m_unhandledAssetInfo.emplace_back(dccMaterialAssetTypeInfo);
|
||||
// Other
|
||||
auto audioAssetTypeInfo = aznew AudioAssetTypeInfo();
|
||||
audioAssetTypeInfo->Register();
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "MaterialAssetTypeInfo.h"
|
||||
|
||||
#include <LmbrCentral/Rendering/MaterialAsset.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
// MaterialAssetTypeInfo
|
||||
|
||||
MaterialAssetTypeInfo::~MaterialAssetTypeInfo()
|
||||
{
|
||||
Unregister();
|
||||
}
|
||||
|
||||
void MaterialAssetTypeInfo::Register()
|
||||
{
|
||||
AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo<MaterialAsset>::Uuid());
|
||||
}
|
||||
|
||||
void MaterialAssetTypeInfo::Unregister()
|
||||
{
|
||||
AZ::AssetTypeInfoBus::Handler::BusDisconnect(AZ::AzTypeInfo<MaterialAsset>::Uuid());
|
||||
}
|
||||
|
||||
AZ::Data::AssetType MaterialAssetTypeInfo::GetAssetType() const
|
||||
{
|
||||
return AZ::AzTypeInfo<MaterialAsset>::Uuid();
|
||||
}
|
||||
|
||||
const char* MaterialAssetTypeInfo::GetAssetTypeDisplayName() const
|
||||
{
|
||||
return "Material";
|
||||
}
|
||||
|
||||
const char* MaterialAssetTypeInfo::GetGroup() const
|
||||
{
|
||||
return "Material";
|
||||
}
|
||||
|
||||
const char* MaterialAssetTypeInfo::GetBrowserIcon() const
|
||||
{
|
||||
return "Icons/Components/Decal.svg";
|
||||
}
|
||||
|
||||
// DccMaterialAssetTypeInfo
|
||||
|
||||
DccMaterialAssetTypeInfo::~DccMaterialAssetTypeInfo()
|
||||
{
|
||||
Unregister();
|
||||
}
|
||||
|
||||
void DccMaterialAssetTypeInfo::Register()
|
||||
{
|
||||
AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo<DccMaterialAsset>::Uuid());
|
||||
}
|
||||
|
||||
void DccMaterialAssetTypeInfo::Unregister()
|
||||
{
|
||||
AZ::AssetTypeInfoBus::Handler::BusDisconnect(AZ::AzTypeInfo<DccMaterialAsset>::Uuid());
|
||||
}
|
||||
|
||||
AZ::Data::AssetType DccMaterialAssetTypeInfo::GetAssetType() const
|
||||
{
|
||||
return AZ::AzTypeInfo<DccMaterialAsset>::Uuid();
|
||||
}
|
||||
|
||||
const char* DccMaterialAssetTypeInfo::GetAssetTypeDisplayName() const
|
||||
{
|
||||
return "DccMaterial";
|
||||
}
|
||||
|
||||
const char* DccMaterialAssetTypeInfo::GetGroup() const
|
||||
{
|
||||
return "DccMaterial";
|
||||
}
|
||||
|
||||
const char* DccMaterialAssetTypeInfo::GetBrowserIcon() const
|
||||
{
|
||||
return "Icons/Components/Decal.svg";
|
||||
}
|
||||
} // namespace LmbrCentral
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Asset/AssetTypeInfoBus.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
class MaterialAssetTypeInfo
|
||||
: public AZ::AssetTypeInfoBus::Handler
|
||||
{
|
||||
public:
|
||||
|
||||
AZ_CLASS_ALLOCATOR(MaterialAssetTypeInfo, AZ::SystemAllocator, 0);
|
||||
|
||||
~MaterialAssetTypeInfo() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// AZ::AssetTypeInfoBus::Handler
|
||||
AZ::Data::AssetType GetAssetType() const override;
|
||||
const char* GetAssetTypeDisplayName() const override;
|
||||
const char* GetGroup() const override;
|
||||
const char* GetBrowserIcon() const override;
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Register();
|
||||
void Unregister();
|
||||
};
|
||||
|
||||
class DccMaterialAssetTypeInfo
|
||||
: public AZ::AssetTypeInfoBus::Handler
|
||||
{
|
||||
public:
|
||||
|
||||
AZ_CLASS_ALLOCATOR(DccMaterialAssetTypeInfo, AZ::SystemAllocator, 0);
|
||||
|
||||
~DccMaterialAssetTypeInfo() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// AZ::AssetTypeInfoBus::Handler
|
||||
AZ::Data::AssetType GetAssetType() const override;
|
||||
const char* GetAssetTypeDisplayName() const override;
|
||||
const char* GetGroup() const override;
|
||||
const char* GetBrowserIcon() const override;
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Register();
|
||||
void Unregister();
|
||||
};
|
||||
} // namespace LmbrCentral
|
||||
@@ -145,8 +145,6 @@ set(FILES
|
||||
Source/Shape/ShapeComponentConverters.inl
|
||||
Source/Shape/ShapeGeometryUtil.h
|
||||
Source/Shape/ShapeGeometryUtil.cpp
|
||||
Source/Unhandled/Material/MaterialAssetTypeInfo.cpp
|
||||
Source/Unhandled/Material/MaterialAssetTypeInfo.h
|
||||
Source/Unhandled/Other/AudioAssetTypeInfo.cpp
|
||||
Source/Unhandled/Other/AudioAssetTypeInfo.h
|
||||
Source/Unhandled/Other/CharacterPhysicsAssetTypeInfo.cpp
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/std/smart_ptr/make_shared.h>
|
||||
|
||||
#include <LmbrCentral/Rendering/MaterialAsset.h>
|
||||
#include <LmbrCentral/Rendering/MeshAsset.h>
|
||||
|
||||
#include <Vegetation/Ebuses/AreaInfoBus.h>
|
||||
#include <Vegetation/Ebuses/AreaSystemRequestBus.h>
|
||||
#include <Vegetation/Ebuses/DebugNotificationBus.h>
|
||||
|
||||
Reference in New Issue
Block a user