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 "AnimationStateMachineSchema.generated.h"
|
|
|
|
|
|
|
|
|
|
/** Action to add a node to the graph */
|
|
|
|
|
USTRUCT()
|
|
|
|
|
struct ANIMGRAPH_API FEdGraphSchemaAction_NewStateNode : public FEdGraphSchemaAction
|
|
|
|
|
{
|
2015-03-17 06:17:32 -04:00
|
|
|
GENERATED_USTRUCT_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
UEdGraphNode* NodeTemplate;
|
|
|
|
|
|
|
|
|
|
FEdGraphSchemaAction_NewStateNode()
|
|
|
|
|
: FEdGraphSchemaAction()
|
|
|
|
|
, NodeTemplate(NULL)
|
|
|
|
|
{}
|
|
|
|
|
|
2015-05-08 10:46:42 -04:00
|
|
|
FEdGraphSchemaAction_NewStateNode(const FText& InNodeCategory, const FText& InMenuDesc, const FString& InToolTip, const int32 InGrouping)
|
2014-03-14 14:13:41 -04:00
|
|
|
: FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping)
|
|
|
|
|
, NodeTemplate(NULL)
|
|
|
|
|
{}
|
|
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override;
|
|
|
|
|
virtual void AddReferencedObjects( FReferenceCollector& Collector ) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
template <typename NodeType>
|
2014-09-17 13:26:44 -04:00
|
|
|
static NodeType* SpawnNodeFromTemplate(class UEdGraph* ParentGraph, NodeType* InTemplateNode, const FVector2D Location = FVector2D(0.0f, 0.0f), bool bSelectNewNode = true)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
FEdGraphSchemaAction_NewStateNode Action;
|
|
|
|
|
Action.NodeTemplate = InTemplateNode;
|
|
|
|
|
|
2014-09-17 13:26:44 -04:00
|
|
|
return Cast<NodeType>(Action.PerformAction(ParentGraph, NULL, Location, bSelectNewNode));
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** Action to create new comment */
|
|
|
|
|
USTRUCT()
|
|
|
|
|
struct ANIMGRAPH_API FEdGraphSchemaAction_NewStateComment : public FEdGraphSchemaAction
|
|
|
|
|
{
|
2015-03-17 06:17:32 -04:00
|
|
|
GENERATED_USTRUCT_BODY();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
FEdGraphSchemaAction_NewStateComment()
|
|
|
|
|
: FEdGraphSchemaAction()
|
|
|
|
|
{}
|
|
|
|
|
|
2015-05-08 10:46:42 -04:00
|
|
|
FEdGraphSchemaAction_NewStateComment(const FText& InNodeCategory, const FText& InMenuDesc, const FString& InToolTip, const int32 InGrouping)
|
2014-03-14 14:13:41 -04:00
|
|
|
: FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
// FEdGraphSchemaAction interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of FEdGraphSchemaAction interface
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UCLASS(MinimalAPI)
|
|
|
|
|
class UAnimationStateMachineSchema : public UEdGraphSchema
|
|
|
|
|
{
|
2015-03-17 06:17:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
UPROPERTY()
|
|
|
|
|
FString PC_Exec;
|
|
|
|
|
|
|
|
|
|
// Begin UEdGraphSchema interface
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void CreateDefaultNodesForGraph(UEdGraph& Graph) const override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual const FPinConnectionResponse CanCreateConnection(const UEdGraphPin* A, const UEdGraphPin* B) const override;
|
|
|
|
|
virtual bool TryCreateConnection(UEdGraphPin* A, UEdGraphPin* B) const override;
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual bool CreateAutomaticConversionNodeAndConnections(UEdGraphPin* PinA, UEdGraphPin* PinB) const override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void GetGraphContextActions(FGraphContextMenuBuilder& ContextMenuBuilder) const override;
|
|
|
|
|
virtual EGraphType GetGraphType(const UEdGraph* TestEdGraph) const override;
|
|
|
|
|
virtual void GetContextMenuActions(const UEdGraph* CurrentGraph, const UEdGraphNode* InGraphNode, const UEdGraphPin* InGraphPin, FMenuBuilder* MenuBuilder, bool bIsDebugging) const override;
|
|
|
|
|
virtual FLinearColor GetPinTypeColor(const FEdGraphPinType& PinType) const override;
|
|
|
|
|
virtual void GetGraphDisplayInformation(const UEdGraph& Graph, /*out*/ FGraphDisplayInfo& DisplayInfo) const override;
|
|
|
|
|
virtual void DroppedAssetsOnGraph(const TArray<FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraph* Graph) const override;
|
|
|
|
|
virtual void DroppedAssetsOnNode(const TArray<FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraphNode* Node) const override;
|
|
|
|
|
virtual void DroppedAssetsOnPin(const TArray<FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraphPin* Pin) const override;
|
|
|
|
|
virtual void GetAssetsNodeHoverMessage(const TArray<FAssetData>& Assets, const UEdGraphNode* HoverNode, FString& OutTooltipText, bool& OutOkIcon) const override;
|
|
|
|
|
virtual void GetAssetsPinHoverMessage(const TArray<FAssetData>& Assets, const UEdGraphPin* HoverPin, FString& OutTooltipText, bool& OutOkIcon) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End UEdGraphSchema interface
|
|
|
|
|
};
|