You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Moved the Serialize function mutation to PreSave as well as a precaution #jira FROST-2374 #preflight 6089839dcbe34a0001dc3d9c [CL 16145502 by Francis Hurteau in ue5-main branch]
71 lines
2.7 KiB
C++
71 lines
2.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "Textures/SlateIcon.h"
|
|
#include "EdGraph/EdGraphNodeUtils.h"
|
|
#include "K2Node_StructMemberGet.h"
|
|
#include "K2Node_BreakStruct.generated.h"
|
|
|
|
class FBlueprintActionDatabaseRegistrar;
|
|
class UEdGraph;
|
|
|
|
UCLASS(MinimalAPI)
|
|
class UK2Node_BreakStruct : public UK2Node_StructMemberGet
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
/** Helper property to handle upgrades from an old system of displaying pins for
|
|
* the override values that properties referenced as a conditional of being set in a struct */
|
|
UPROPERTY()
|
|
bool bMadeAfterOverridePinRemoval;
|
|
|
|
/**
|
|
* Returns false if:
|
|
* 1. The Struct has a 'native break' method
|
|
* Returns true if:
|
|
* 1. The Struct is tagged as BlueprintType
|
|
* and
|
|
* 2. The Struct has any property that is tagged as CPF_BlueprintVisible
|
|
*/
|
|
static bool CanBeBroken(const UScriptStruct* Struct, bool bForInternalUse = false);
|
|
|
|
/** Can this struct be used as a split pin */
|
|
static bool CanBeSplit(const UScriptStruct* Struct) { return CanBeBroken(Struct); }
|
|
|
|
// UObject interface
|
|
virtual void PreSave(FObjectPreSaveContext SaveContext) override;
|
|
virtual void Serialize(FArchive& Ar) override;
|
|
// End of UObject interface
|
|
|
|
//~ Begin UEdGraphNode Interface
|
|
virtual void AllocateDefaultPins() override;
|
|
virtual void PreloadRequiredAssets() override;
|
|
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
|
virtual FLinearColor GetNodeTitleColor() const override;
|
|
virtual FText GetTooltipText() const override;
|
|
virtual void ValidateNodeDuringCompilation(class FCompilerResultsLog& MessageLog) const override;
|
|
virtual FSlateIcon GetIconAndTint(FLinearColor& OutColor) const override;
|
|
virtual void PostPlacedNewNode() override;
|
|
//~ End UEdGraphNode Interface
|
|
|
|
//~ Begin K2Node Interface
|
|
virtual bool NodeCausesStructuralBlueprintChange() const override { return false; }
|
|
virtual bool IsNodePure() const override { return true; }
|
|
virtual bool DrawNodeAsVariable() const override { return false; }
|
|
virtual ERedirectType DoPinsMatchForReconstruction(const UEdGraphPin* NewPin, int32 NewPinIndex, const UEdGraphPin* OldPin, int32 OldPinIndex) const override;
|
|
virtual class FNodeHandlingFunctor* CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const override;
|
|
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
|
|
virtual FText GetMenuCategory() const override;
|
|
virtual void ConvertDeprecatedNode(UEdGraph* Graph, bool bOnlySafeChanges) override;
|
|
//~ End K2Node Interface
|
|
|
|
private:
|
|
/** Constructing FText strings can be costly, so we cache the node's title/tooltip */
|
|
FNodeTextCache CachedTooltip;
|
|
FNodeTextCache CachedNodeTitle;
|
|
};
|
|
|