Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Private/MaterialNodes/SGraphNodeMaterialComment.cpp
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

27 lines
986 B
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "GraphEditorCommon.h"
#include "Materials/MaterialExpressionComment.h"
#include "SGraphNodeComment.h"
#include "SGraphNodeMaterialComment.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();
}
}