Files
UnrealEngineUWP/Engine/Source/Editor/Persona/Private/SkeletalMeshReferenceSectionDetails.h
alexis matte c7fa5eb100 Add section to prioritize sharing the prioritize weight value. This will allow to reduce less a particular section.
#rb david.hill

#ROBOMERGE-AUTHOR: alexis.matte
#ROBOMERGE-SOURCE: CL 18418769 via CL 18418788 via CL 18418808 via CL 18435056 via CL 18437373
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18437648 by alexis matte in ue5-release-engine-test branch]
2021-12-10 20:57:51 -05:00

49 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "IDetailCustomization.h"
#include "IPropertyTypeCustomization.h"
#include "Types/SlateEnums.h"
class FSkeletalMeshLODModel;
class IDetailLayoutBuilder;
class IPropertyHandle;
class SEditableTextBox;
class USkeletalMesh;
class FSectionReferenceCustomization : public IPropertyTypeCustomization
{
public:
virtual ~FSectionReferenceCustomization()
{
SectionIndexProperty = nullptr;
TargetSkeletalMesh = nullptr;
}
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
// IPropertyTypeCustomization interface
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
const FSkeletalMeshLODModel& GetLodModel() const;
protected:
void SetEditableLodModel(TSharedRef<IPropertyHandle> StructPropertyHandle);
virtual void SetPropertyHandle(TSharedRef<IPropertyHandle> StructPropertyHandle);
TSharedPtr<IPropertyHandle> FindStructMemberProperty(TSharedRef<IPropertyHandle> PropertyHandle, const FName& PropertyName);
// Property to change after section index has been picked
TSharedPtr<IPropertyHandle> SectionIndexProperty;
// Target LodModel this widget is referencing
USkeletalMesh* TargetSkeletalMesh = nullptr;
int32 TargetLodIndex = INDEX_NONE;
private:
// Section widget delegates
virtual void OnSectionSelectionChanged(int32 SectionIndex);
virtual int32 GetSelectedSection(bool& bMultipleValues) const;
};