2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-10-01 09:43:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "GraphEditorCommon.h"
|
|
|
|
|
#include "SGraphNodeLayeredBoneBlend.h"
|
2014-10-02 07:03:46 -04:00
|
|
|
#include "AnimGraphNode_LayeredBoneBlend.h"
|
2014-10-01 09:43:43 -04:00
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
|
// SGraphNodeLayeredBoneBlend
|
|
|
|
|
|
|
|
|
|
void SGraphNodeLayeredBoneBlend::Construct(const FArguments& InArgs, UAnimGraphNode_LayeredBoneBlend* InNode)
|
|
|
|
|
{
|
|
|
|
|
this->GraphNode = Node = InNode;
|
|
|
|
|
|
|
|
|
|
this->SetCursor(EMouseCursor::CardinalCross);
|
|
|
|
|
|
|
|
|
|
this->UpdateGraphNode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SGraphNodeLayeredBoneBlend::CreateInputSideAddButton(TSharedPtr<SVerticalBox> InputBox)
|
|
|
|
|
{
|
|
|
|
|
TSharedRef<SWidget> AddPinButton = AddPinButtonContent(
|
|
|
|
|
NSLOCTEXT("LayeredBoneBlendNode", "LayeredBoneBlendNodeAddPinButton", "Add pin"),
|
|
|
|
|
NSLOCTEXT("LayeredBoneBlendNode", "LayeredBoneBlendNodeAddPinButton_Tooltip", "Adds a input pose to the node"),
|
|
|
|
|
false);
|
|
|
|
|
|
|
|
|
|
FMargin AddPinPadding = Settings->GetInputPinPadding();
|
|
|
|
|
AddPinPadding.Top += 6.0f;
|
|
|
|
|
|
|
|
|
|
InputBox->AddSlot()
|
|
|
|
|
.AutoHeight()
|
|
|
|
|
.VAlign(VAlign_Center)
|
|
|
|
|
.Padding(AddPinPadding)
|
|
|
|
|
[
|
|
|
|
|
AddPinButton
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FReply SGraphNodeLayeredBoneBlend::OnAddPin()
|
|
|
|
|
{
|
|
|
|
|
Node->AddPinToBlendByFilter();
|
|
|
|
|
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|