Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/CompositeRerouteCustomization.cpp
daren cheng 0e796eb369 Add grouping to material graph.
Add composite & pinbase expressions / nodes, which use reroutes under the hood to ensure zero material overhead.
Convert MaterialEditor to a WorkflowCentricApplication.
Generally add subgraph existence support to MaterialGraph / MaterialEditor.

#jira UE-96104
#rb Ben.Ingram Lauren.Barnes
#fyi Lauren.Barnes

[CL 14437968 by daren cheng in ue5-main branch]
2020-10-07 10:35:24 -04:00

36 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CompositeRerouteCustomization.h"
#include "PropertyCustomizationHelpers.h"
#include "DetailLayoutBuilder.h"
#include "Materials/MaterialExpressionPinBase.h"
#define LOCTEXT_NAMESPACE "CompositeRerouteDetails"
TSharedRef<IPropertyTypeCustomization> FCompositeRerouteCustomization::MakeInstance()
{
return MakeShareable(new FCompositeRerouteCustomization());
}
void FCompositeRerouteCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
/* do nothing */
}
void FCompositeRerouteCustomization::CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
HeaderRow
.NameContent()
[
StructPropertyHandle->CreatePropertyNameWidget()
]
.ValueContent()
.MaxDesiredWidth(0.0f)
.MinDesiredWidth(125.0f)
[
StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FCompositeReroute, Name))->CreatePropertyValueWidget()
];
}
#undef LOCTEXT_NAMESPACE