2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "GraphEditorCommon.h"
|
2014-05-22 11:33:54 -04:00
|
|
|
#include "Materials/MaterialExpressionComment.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "SGraphNodeComment.h"
|
|
|
|
|
#include "SGraphNodeMaterialComment.h"
|
2014-10-07 16:39:44 -04:00
|
|
|
#include "MaterialGraph/MaterialGraphNode_Comment.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
void SGraphNodeMaterialComment::Construct(const FArguments& InArgs, class UMaterialGraphNode_Comment* InNode)
|
|
|
|
|
{
|
|
|
|
|
SGraphNodeComment::Construct(SGraphNodeComment::FArguments(), InNode);
|
|
|
|
|
|
|
|
|
|
this->CommentNode = InNode;
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-06 04:45:44 -04:00
|
|
|
void SGraphNodeMaterialComment::MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-05-06 04:45:44 -04:00
|
|
|
if( !NodeFilter.Find( SharedThis( this ) ))
|
|
|
|
|
{
|
|
|
|
|
SGraphNodeComment::MoveTo(NewPosition, NodeFilter);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-05-06 04:45:44 -04:00
|
|
|
CommentNode->MaterialExpressionComment->MaterialExpressionEditorX = CommentNode->NodePosX;
|
|
|
|
|
CommentNode->MaterialExpressionComment->MaterialExpressionEditorY = CommentNode->NodePosY;
|
|
|
|
|
CommentNode->MaterialExpressionComment->MarkPackageDirty();
|
|
|
|
|
CommentNode->MaterialDirtyDelegate.ExecuteIfBound();
|
|
|
|
|
}
|
|
|
|
|
}
|