You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none #lockdown Nick.Penwarden #ROBOMERGE-OWNER: ryan.gerleve #ROBOMERGE-AUTHOR: ben.marsh #ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/... #ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) [CL 4662413 by ben marsh in Dev-Networking branch]
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "EditModes/LookAtEditMode.h"
|
|
#include "AnimGraphNode_LookAt.h"
|
|
#include "IPersonaPreviewScene.h"
|
|
#include "Animation/DebugSkelMeshComponent.h"
|
|
|
|
void FLookAtEditMode::EnterMode(class UAnimGraphNode_Base* InEditorNode, struct FAnimNode_Base* InRuntimeNode)
|
|
{
|
|
RuntimeNode = static_cast<FAnimNode_LookAt*>(InRuntimeNode);
|
|
GraphNode = CastChecked<UAnimGraphNode_LookAt>(InEditorNode);
|
|
|
|
FAnimNodeEditMode::EnterMode(InEditorNode, InRuntimeNode);
|
|
}
|
|
|
|
void FLookAtEditMode::ExitMode()
|
|
{
|
|
RuntimeNode = nullptr;
|
|
GraphNode = nullptr;
|
|
|
|
FAnimNodeEditMode::ExitMode();
|
|
}
|
|
|
|
FVector FLookAtEditMode::GetWidgetLocation() const
|
|
{
|
|
USkeletalMeshComponent* SkelComp = GetAnimPreviewScene().GetPreviewMeshComponent();
|
|
return GraphNode->Node.GetCachedTargetLocation();
|
|
}
|
|
|
|
FWidget::EWidgetMode FLookAtEditMode::GetWidgetMode() const
|
|
{
|
|
return FWidget::WM_Translate;
|
|
}
|
|
|
|
FName FLookAtEditMode::GetSelectedBone() const
|
|
{
|
|
return GraphNode->Node.BoneToModify.BoneName;
|
|
}
|
|
|
|
// @todo: will support this since now we have LookAtLocation
|
|
void FLookAtEditMode::DoTranslation(FVector& InTranslation)
|
|
{
|
|
}
|