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
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "AnimGraphNode_SkeletalControlBase.h"
|
2014-05-29 17:24:15 -04:00
|
|
|
#include "Animation/BoneControllers/AnimNode_ModifyBone.h"
|
2014-09-04 11:25:05 -04:00
|
|
|
#include "EdGraph/EdGraphNodeUtils.h" // for FNodeTitleTextTable
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "AnimGraphNode_ModifyBone.generated.h"
|
|
|
|
|
|
2015-04-20 12:25:37 -04:00
|
|
|
UCLASS(MinimalAPI, meta=(Keywords = "Modify Transform"))
|
2014-03-14 14:13:41 -04:00
|
|
|
class UAnimGraphNode_ModifyBone : public UAnimGraphNode_SkeletalControlBase
|
|
|
|
|
{
|
2015-03-17 05:38:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
|
|
|
FAnimNode_ModifyBone Node;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// UEdGraphNode interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
2014-09-03 18:14:09 -04:00
|
|
|
virtual FText GetTooltipText() const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of UEdGraphNode interface
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
// UAnimGraphNode_SkeletalControlBase interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual FText GetControllerDescription() const override;
|
2014-11-14 05:00:37 -05:00
|
|
|
|
|
|
|
|
ANIMGRAPH_API virtual FVector GetWidgetLocation(const USkeletalMeshComponent* SkelComp, struct FAnimNode_SkeletalControlBase* AnimNode) override;
|
2014-11-14 10:55:42 -05:00
|
|
|
ANIMGRAPH_API virtual int32 GetWidgetMode(const USkeletalMeshComponent* SkelComp) override;
|
2014-12-01 21:27:36 -05:00
|
|
|
ANIMGRAPH_API virtual int32 ChangeToNextWidgetMode(const USkeletalMeshComponent* SkelComp, int32 InCurWidgetMode) override;
|
|
|
|
|
ANIMGRAPH_API virtual bool SetWidgetMode(const USkeletalMeshComponent* SkelComp, int32 InWidgetMode) override;
|
2014-11-14 05:00:37 -05:00
|
|
|
|
|
|
|
|
ANIMGRAPH_API virtual FName FindSelectedBone() override;
|
|
|
|
|
|
|
|
|
|
ANIMGRAPH_API virtual void DoTranslation(const USkeletalMeshComponent* SkelComp, FVector& Drag, FAnimNode_Base* InOutAnimNode) override;
|
|
|
|
|
ANIMGRAPH_API virtual void DoRotation(const USkeletalMeshComponent* SkelComp, FRotator& Rotation, FAnimNode_Base* InOutAnimNode) override;
|
|
|
|
|
ANIMGRAPH_API virtual void DoScale(const USkeletalMeshComponent* SkelComp, FVector& Drag, FAnimNode_Base* InOutAnimNode) override;
|
|
|
|
|
ANIMGRAPH_API virtual void CopyNodeDataTo(FAnimNode_Base* OutAnimNode) override;
|
|
|
|
|
ANIMGRAPH_API virtual void CopyNodeDataFrom(const FAnimNode_Base* InNewAnimNode) override;
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of UAnimGraphNode_SkeletalControlBase interface
|
2014-09-04 11:25:05 -04:00
|
|
|
|
2014-11-14 05:00:37 -05:00
|
|
|
// methods to find a valid widget mode for gizmo because doesn't need to show gizmo when the mode is "Ignore"
|
2014-11-14 10:55:42 -05:00
|
|
|
int32 FindValidWidgetMode(int32 InWidgetMode);
|
|
|
|
|
EBoneModificationMode GetBoneModificationMode(int32 InWidgetMode);
|
|
|
|
|
int32 GetNextWidgetMode(int32 InWidgetMode);
|
2014-11-14 05:00:37 -05:00
|
|
|
|
2014-09-04 11:25:05 -04:00
|
|
|
private:
|
|
|
|
|
/** Constructing FText strings can be costly, so we cache the node's title */
|
|
|
|
|
FNodeTitleTextTable CachedNodeTitles;
|
2014-11-14 05:00:37 -05:00
|
|
|
|
2014-11-14 10:55:42 -05:00
|
|
|
// storing current widget mode
|
|
|
|
|
int32 CurWidgetMode;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
2014-09-04 11:25:05 -04:00
|
|
|
|