Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Private/MaterialNodes/SGraphNodeMaterialComment.cpp
ryan durand 627baf970a Updating copyright for Engine Editor.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869241 via CL 10869527 via CL 10869904
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870586 by ryan durand in Main branch]
2019-12-26 15:33:43 -05:00

26 lines
929 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MaterialNodes/SGraphNodeMaterialComment.h"
#include "Materials/MaterialExpressionComment.h"
#include "MaterialGraph/MaterialGraphNode_Comment.h"
void SGraphNodeMaterialComment::Construct(const FArguments& InArgs, class UMaterialGraphNode_Comment* InNode)
{
SGraphNodeComment::Construct(SGraphNodeComment::FArguments(), InNode);
this->CommentNode = InNode;
}
void SGraphNodeMaterialComment::MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter)
{
if( !NodeFilter.Find( SharedThis( this ) ))
{
SGraphNodeComment::MoveTo(NewPosition, NodeFilter);
CommentNode->MaterialExpressionComment->MaterialExpressionEditorX = CommentNode->NodePosX;
CommentNode->MaterialExpressionComment->MaterialExpressionEditorY = CommentNode->NodePosY;
CommentNode->MaterialExpressionComment->MarkPackageDirty();
CommentNode->MaterialDirtyDelegate.ExecuteIfBound();
}
}