// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "HAL/Platform.h" #include "IPropertyTypeCustomization.h" #include "Input/Reply.h" #include "Internationalization/Text.h" #include "Layout/Visibility.h" #include "Templates/SharedPointer.h" class IPropertyHandle; class SWidget; class UClass; class UPackage; /** * Implements a details view customization for the FPostProcessSettings structure. */ class FPostProcessSettingsCustomization : public IPropertyTypeCustomization { public: /** * Creates an instance of this class. * * @return The new instance. */ static TSharedRef MakeInstance( ) { return MakeShareable(new FPostProcessSettingsCustomization()); } public: // IPropertyTypeCustomization interface virtual void CustomizeChildren( TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override; virtual void CustomizeHeader( TSharedRef StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override; }; /** * Implements a details view customization for the FBlendablesWrapper structure. */ class FWeightedBlendableCustomization : public IPropertyTypeCustomization { public: /** * Creates an instance of this class. * * @return The new instance. */ static TSharedRef MakeInstance( ) { return MakeShareable(new FWeightedBlendableCustomization()); } public: // IPropertyTypeCustomization interface virtual void CustomizeChildren( TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override; virtual void CustomizeHeader( TSharedRef StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override; TSharedRef GenerateContentWidget(TSharedRef StructPropertyHandle, UPackage* Package, TSharedPtr Weight, TSharedPtr Value); // "Outer" is the object that has the blendables container void AddDirectAsset(TSharedRef StructPropertyHandle, TSharedPtr Weight, TSharedPtr Value, UClass* Class); // "Outer" is a package void AddIndirectAsset(TSharedPtr Weight); // open the details panel for this object FReply JumpToDirectAsset(TSharedPtr Value); // to get the blendable type as string FText GetDirectAssetName(TSharedPtr Value) const; // @return 0:choose 1:direct, 2:indirect int32 ComputeSwitcherIndex(TSharedRef StructPropertyHandle, UPackage* Package, TSharedPtr Weight, TSharedPtr Value) const; // the weight is only visible if the user choose the type (or the reference) EVisibility IsWeightVisible(TSharedPtr Weight) const; };