Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Classes/MaterialGraph/MaterialGraphNode_Comment.h
francis hurteau fc0b9c9fa8 Flag Material Graph and Nodes as Optional so that they would also be included in the optional sidecar data alongside material expressions
#rb Jason.Nadro
#preflight 6282cac0734d065770482e21

#ROBOMERGE-AUTHOR: francis.hurteau
#ROBOMERGE-SOURCE: CL 20260724 via CL 20266997 via CL 20267266 via CL 20267382
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20269504 by francis hurteau in ue5-main branch]
2022-05-18 18:05:07 -04:00

47 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "MaterialGraph/MaterialGraph.h"
#include "EdGraphNode_Comment.h"
#include "MaterialGraphNode_Comment.generated.h"
UCLASS(MinimalAPI, Optional)
class UMaterialGraphNode_Comment : public UEdGraphNode_Comment
{
GENERATED_UCLASS_BODY()
/** Material Comment that this node represents */
UPROPERTY()
TObjectPtr<class UMaterialExpressionComment> MaterialExpressionComment;
/** Marks the Material Editor as dirty so that user prompted to apply change */
FSetMaterialDirty MaterialDirtyDelegate;
/** Fix up the node's owner after being copied */
UNREALED_API void PostCopyNode();
//~ Begin UObject Interface
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
virtual void PostEditImport() override;
virtual void PostDuplicate(bool bDuplicateForPIE) override;
//~ End UObject Interface
//~ Begin UEdGraphNode Interface.
virtual void PrepareForCopying() override;
virtual void GetNodeContextMenuActions(class UToolMenu* Menu, class UGraphNodeContextMenuContext* Context) const override;
virtual bool CanCreateUnderSpecifiedSchema(const UEdGraphSchema* Schema) const override;
virtual void PostPlacedNewNode() override;
virtual void OnRenameNode(const FString& NewName) override;
virtual void ResizeNode(const FVector2D& NewSize) override;
virtual int32 GetFontSize() const override;
//~ End UEdGraphNode Interface.
private:
/** Make sure the MaterialExpressionComment is owned by the Material */
void ResetMaterialExpressionOwner();
};