You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Tweak to allow UK2Node_StructMemberSet to rebuild pins in a more optimal way for large sparsely-connected structs that are built by the anim BP compiler #rb Phillip.Kavan [CL 16048961 by Thomas Sarkanen in ue5-main branch]
50 lines
1.7 KiB
C++
50 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "EdGraph/EdGraphNodeUtils.h"
|
|
#include "K2Node.h"
|
|
#include "K2Node_StructOperation.h"
|
|
#include "K2Node_StructMemberSet.generated.h"
|
|
|
|
// Imperative kismet node that sets one or more member variables of a struct
|
|
UCLASS(MinimalAPI)
|
|
class UK2Node_StructMemberSet : public UK2Node_StructOperation
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
UPROPERTY(EditAnywhere, Category=PinOptions, EditFixedSize)
|
|
TArray<FOptionalPinFromProperty> ShowPinForProperties;
|
|
|
|
// UObject interface
|
|
virtual void PreEditChange(FProperty* PropertyAboutToChange) override;
|
|
virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override;
|
|
// End of UObject interface
|
|
|
|
// UEdGraphNode interface
|
|
virtual void AllocateDefaultPins() override;
|
|
virtual FText GetTooltipText() const override;
|
|
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
|
// End of UEdGraphNode interface
|
|
|
|
// UK2Node interface
|
|
virtual bool IsNodePure() const override { return false; }
|
|
virtual bool NodeCausesStructuralBlueprintChange() const override { return true; }
|
|
virtual ERedirectType DoPinsMatchForReconstruction(const UEdGraphPin* NewPin, int32 NewPinIndex, const UEdGraphPin* OldPin, int32 OldPinIndex) const override;
|
|
virtual class FNodeHandlingFunctor* CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const override;
|
|
// End of UK2Node interface
|
|
|
|
// Helper for AllocateDefaultPins
|
|
BLUEPRINTGRAPH_API void AllocateExecPins();
|
|
|
|
private:
|
|
/** Constructing FText strings can be costly, so we cache the node's title/tooltip */
|
|
FNodeTextCache CachedTooltip;
|
|
FNodeTextCache CachedNodeTitle;
|
|
|
|
TArray<FName> OldShownPins;
|
|
};
|
|
|