Files
nick darnell 58645cbc15 Editor Performance - Fixing a long standing issue with asset thumbnails, they've been loading the assets for a pretty long time now, because of the thumbnail editing mode. Note that thumbnail editing mode was not needed to be enabled and yet the asset would still load. This was a cause for a lot of hitches in the Content Browser.
AssetDefinition - Working on the asset definitions for blueprints/class types, iterating on the Merge API.  Bringing over more of the blueprint features into its asset definition, unregistered the Blueprint AssetType Actions.

Asset Filters - We now support categories per filter, this enables a single asset definition to correctly specify multiple filters.  For example, blueprints actually supply 4 filters, one for blueprints, but also blueprint interfaces, macros and function libraries.

[CL 23791489 by nick darnell in ue5-main branch]
2023-01-20 11:49:23 -05:00

27 lines
981 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AssetDefinition_PhysicsAsset.h"
#include "Modules/ModuleManager.h"
#include "PhysicsAssetEditorModule.h"
#include "ThumbnailRendering/SceneThumbnailInfo.h"
#define LOCTEXT_NAMESPACE "AssetTypeActions"
UThumbnailInfo* UAssetDefinition_PhysicsAsset::LoadThumbnailInfo(const FAssetData& InAsset) const
{
return UE::Editor::FindOrCreateThumbnailInfo(InAsset.GetAsset(), USceneThumbnailInfo::StaticClass());
}
EAssetCommandResult UAssetDefinition_PhysicsAsset::OpenAssets(const FAssetOpenArgs& OpenArgs) const
{
for (UPhysicsAsset* PhysicsAsset : OpenArgs.LoadObjects<UPhysicsAsset>())
{
IPhysicsAssetEditorModule* PhysicsAssetEditorModule = &FModuleManager::LoadModuleChecked<IPhysicsAssetEditorModule>( "PhysicsAssetEditor" );
PhysicsAssetEditorModule->CreatePhysicsAssetEditor(OpenArgs.GetToolkitMode(), OpenArgs.ToolkitHost, PhysicsAsset);
}
return EAssetCommandResult::Handled;
}
#undef LOCTEXT_NAMESPACE