Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/SoftObjectPathCustomization.cpp
sebastian nordgren 1922547c12 SPropertyEditorAsset now handles multiple actor types correctly when set with the AllowedClasses meta. It also now supports the ExactClass metadata.
As a result, FSoftObjectPath members now also support UInterfaces, because it no longer uses custom filtering logic.

#jira UE-76791

#rb chris.gagnon

[CL 7306318 by sebastian nordgren in Dev-Editor branch]
2019-07-15 03:52:42 -04:00

36 lines
1.2 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "SoftObjectPathCustomization.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Engine/GameViewportClient.h"
#include "AssetData.h"
#include "PropertyHandle.h"
#include "PropertyCustomizationHelpers.h"
void FSoftObjectPathCustomization::CustomizeHeader( TSharedRef<IPropertyHandle> InStructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils )
{
StructPropertyHandle = InStructPropertyHandle;
HeaderRow
.NameContent()
[
InStructPropertyHandle->CreatePropertyNameWidget()
]
.ValueContent()
.MinDesiredWidth(250.0f)
.MaxDesiredWidth(0.0f)
[
// Add an object entry box. Even though this isn't an object entry, we will simulate one
SNew( SObjectPropertyEntryBox )
.PropertyHandle( InStructPropertyHandle )
.ThumbnailPool( StructCustomizationUtils.GetThumbnailPool() )
];
// This avoids making duplicate reset boxes
StructPropertyHandle->MarkResetToDefaultCustomized();
}
void FSoftObjectPathCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> InStructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
}