You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Zousar.Shaker #rnx #preflight 6270509a220f89f0ad573030 [CL 20016982 by Matt Peters in ue5-main branch]
48 lines
1.7 KiB
C++
48 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SoftObjectPathCustomization.h"
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
#include "Engine/GameViewportClient.h"
|
|
#include "AssetRegistry/AssetData.h"
|
|
#include "EditorClassUtils.h"
|
|
#include "PropertyHandle.h"
|
|
#include "PropertyCustomizationHelpers.h"
|
|
|
|
void FSoftObjectPathCustomization::CustomizeHeader( TSharedRef<IPropertyHandle> InStructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils )
|
|
{
|
|
StructPropertyHandle = InStructPropertyHandle;
|
|
|
|
const FString& MetaClassName = InStructPropertyHandle->GetMetaData("MetaClass");
|
|
UClass* MetaClass = !MetaClassName.IsEmpty()
|
|
? FEditorClassUtils::GetClassFromString(MetaClassName)
|
|
: UObject::StaticClass();
|
|
|
|
TSharedRef<SObjectPropertyEntryBox> ObjectPropertyEntryBox = SNew(SObjectPropertyEntryBox)
|
|
.AllowedClass(MetaClass)
|
|
.PropertyHandle(InStructPropertyHandle)
|
|
.ThumbnailPool(StructCustomizationUtils.GetThumbnailPool());
|
|
|
|
float MinDesiredWidth, MaxDesiredWidth;
|
|
ObjectPropertyEntryBox->GetDesiredWidth(MinDesiredWidth, MaxDesiredWidth);
|
|
|
|
HeaderRow
|
|
.NameContent()
|
|
[
|
|
InStructPropertyHandle->CreatePropertyNameWidget()
|
|
]
|
|
.ValueContent()
|
|
.MinDesiredWidth(MinDesiredWidth)
|
|
.MaxDesiredWidth(MaxDesiredWidth)
|
|
[
|
|
// Add an object entry box. Even though this isn't an object entry, we will simulate one
|
|
ObjectPropertyEntryBox
|
|
];
|
|
|
|
// This avoids making duplicate reset boxes
|
|
StructPropertyHandle->MarkResetToDefaultCustomized();
|
|
}
|
|
|
|
void FSoftObjectPathCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> InStructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
|
|
{
|
|
}
|