RenderableThumbnailTypes
RenderableThumbnailTypes
#Overview
name: RenderableThumbnailTypes
The value of this variable can be defined or overridden in .ini config files. 33
.ini config files referencing this setting variable.
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of RenderableThumbnailTypes is to store information about different types of objects that can have thumbnails rendered for them in the Unreal Engine editor.
This setting variable is primarily used by the Unreal Engine’s editor subsystem, specifically in the thumbnail rendering module. It is part of the UnrealEd module, which is responsible for various editor functionalities.
The value of this variable is set through configuration (as indicated by the UPROPERTY(config) attribute) and is initialized in the UThumbnailManager::Initialize() function. It can also be modified at runtime through the RegisterCustomRenderer() and UnregisterCustomRenderer() functions.
RenderableThumbnailTypes interacts closely with the RenderInfoMap variable, which is used to cache and quickly access rendering information for specific object classes.
Developers should be aware that this variable is central to the thumbnail rendering system in the Unreal Engine editor. Modifying it directly could have wide-ranging effects on how thumbnails are displayed for various asset types in the editor.
Best practices when using this variable include:
- Using the provided RegisterCustomRenderer() and UnregisterCustomRenderer() functions to add or remove custom thumbnail renderers, rather than modifying the array directly.
- Ensuring that any custom thumbnail renderers added are properly implemented and optimized to maintain editor performance.
- Being cautious when making changes to existing entries, as this could affect the thumbnail rendering for built-in Unreal Engine asset types.
- Considering the impact on editor performance when adding many custom thumbnail renderers, as each one adds to the initialization time and memory usage of the thumbnail system.
#Setting Variables
#References In INI files
<Workspace>/Engine/Config/BaseEditor.ini:36, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:37, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:38, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:39, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:40, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:41, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:42, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:43, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:44, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:45, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:46, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:47, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:48, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:49, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:50, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:51, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:52, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:53, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:54, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:55, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:56, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:57, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:58, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:59, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:60, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:61, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:62, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:63, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:64, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:65, section: [/Script/UnrealEd.ThumbnailManager]
<Workspace>/Engine/Config/BaseEditor.ini:66, section: [/Script/UnrealEd.ThumbnailManager]
... omitting 3 locations ...
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/ThumbnailRendering/ThumbnailManager.h:170
Scope (from outer to inner):
file
class class UThumbnailManager : public UObject
Source code excerpt:
*/
UPROPERTY(config)
TArray<struct FThumbnailRenderingInfo> RenderableThumbnailTypes;
/**
* This holds a map of object type to render info entries
*/
TMap<UClass*, FThumbnailRenderingInfo*> RenderInfoMap;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailManager.cpp:72
Scope (from outer to inner):
file
function void UThumbnailManager::Initialize
Source code excerpt:
if (bIsInitialized == false)
{
InitializeRenderTypeArray(RenderableThumbnailTypes);
// The size of the pool is a bit large to allow the asset views to use it (each asset view used 1024 by default)
SharedThumbnailPool = MakeShared<FAssetThumbnailPool>(4096);
FCoreUObjectDelegates::OnObjectPropertyChanged.AddUObject(this, &UThumbnailManager::OnObjectPropertyChanged);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailManager.cpp:132
Scope (from outer to inner):
file
function FThumbnailRenderingInfo* UThumbnailManager::GetRenderingInfo
Source code excerpt:
check(Object);
TArray<FThumbnailRenderingInfo>& ThumbnailTypes = RenderableThumbnailTypes;
// Get the class to check against.
UClass *ClassToCheck = Object->GetClass();
// Search for the cached entry and do the slower if not found
FThumbnailRenderingInfo* RenderInfo = RenderInfoMap.FindRef(ClassToCheck);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailManager.cpp:189
Scope (from outer to inner):
file
function void UThumbnailManager::RegisterCustomRenderer
Source code excerpt:
// Verify that this class isn't already registered
for (int32 Index = 0; Index < RenderableThumbnailTypes.Num(); ++Index)
{
if (ensure(RenderableThumbnailTypes[Index].ClassNeedingThumbnailName != NewClassPathName))
{
}
else
{
return;
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailManager.cpp:201
Scope (from outer to inner):
file
function void UThumbnailManager::RegisterCustomRenderer
Source code excerpt:
// Register the new class
FThumbnailRenderingInfo& Info = *(new (RenderableThumbnailTypes) FThumbnailRenderingInfo());
Info.ClassNeedingThumbnailName = NewClassPathName;
Info.ClassNeedingThumbnail = Class;
if (FApp::CanEverRender())
{
Info.Renderer = NewObject<UThumbnailRenderer>(GetTransientPackage(), RendererClass);
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailManager.cpp:223
Scope (from outer to inner):
file
function void UThumbnailManager::UnregisterCustomRenderer
Source code excerpt:
const FString OldClassPathName = Class->GetPathName();
for (int32 Index = 0; Index < RenderableThumbnailTypes.Num(); )
{
if (RenderableThumbnailTypes[Index].ClassNeedingThumbnailName == OldClassPathName)
{
RenderableThumbnailTypes.RemoveAtSwap(Index);
}
else
{
++Index;
}
}