You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Adds: - New sub-instance functionality (dynamic setting, inline evaluation) - Animation layers (experimental) #rb Jurre.deBaare [FYI] Laurent.Delayen #rnx #ROBOMERGE-OWNER: lina.halper #ROBOMERGE-AUTHOR: thomas.sarkanen #ROBOMERGE-SOURCE: CL 6604742 via CL 6605911 via CL 6605970 #ROBOMERGE-BOT: ANIM (Main -> Dev-Anim) (v364-6709755) [CL 6719637 by thomas sarkanen in Dev-Anim branch]
108 lines
5.2 KiB
C++
108 lines
5.2 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "AssetData.h"
|
|
#include "EdGraph/EdGraphSchema.h"
|
|
#include "EdGraphSchema_K2.h"
|
|
#include "AnimationGraphSchema.generated.h"
|
|
|
|
class FMenuBuilder;
|
|
class UAnimationAsset;
|
|
|
|
UCLASS(MinimalAPI)
|
|
class UAnimationGraphSchema : public UEdGraphSchema_K2
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
// Common PinNames
|
|
UPROPERTY()
|
|
FString PN_SequenceName; // PC_Object+PSC_Sequence
|
|
|
|
UPROPERTY()
|
|
FName NAME_NeverAsPin;
|
|
|
|
UPROPERTY()
|
|
FName NAME_PinHiddenByDefault;
|
|
|
|
UPROPERTY()
|
|
FName NAME_PinShownByDefault;
|
|
|
|
UPROPERTY()
|
|
FName NAME_AlwaysAsPin;
|
|
|
|
UPROPERTY()
|
|
FName NAME_CustomizeProperty;
|
|
|
|
UPROPERTY()
|
|
FName NAME_OnEvaluate;
|
|
|
|
UPROPERTY()
|
|
FName DefaultEvaluationHandlerName;
|
|
|
|
//~ Begin UEdGraphSchema Interface.
|
|
virtual FLinearColor GetPinTypeColor(const FEdGraphPinType& PinType) const override;
|
|
virtual EGraphType GetGraphType(const UEdGraph* TestEdGraph) const override;
|
|
virtual void CreateDefaultNodesForGraph(UEdGraph& Graph) const override;
|
|
virtual void HandleGraphBeingDeleted(UEdGraph& GraphBeingRemoved) const override;
|
|
virtual bool CreateAutomaticConversionNodeAndConnections(UEdGraphPin* PinA, UEdGraphPin* PinB) 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;
|
|
virtual void GetAssetsGraphHoverMessage(const TArray<FAssetData>& Assets, const UEdGraph* HoverGraph, FString& OutTooltipText, bool& OutOkIcon) const override;
|
|
virtual void GetContextMenuActions(const UEdGraph* CurrentGraph, const UEdGraphNode* InGraphNode, const UEdGraphPin* InGraphPin, FMenuBuilder* MenuBuilder, bool bIsDebugging) const override;
|
|
virtual FText GetPinDisplayName(const UEdGraphPin* Pin) const override;
|
|
virtual bool CanDuplicateGraph(UEdGraph* InSourceGraph) const override { return InSourceGraph->GetFName() != UEdGraphSchema_K2::GN_AnimGraph; }
|
|
virtual bool DoesSupportEventDispatcher() const override { return false; }
|
|
virtual bool ShouldAlwaysPurgeOnModification() const override { return true; }
|
|
virtual bool TryCreateConnection(UEdGraphPin* A, UEdGraphPin* B) const override;
|
|
virtual void GetGraphDisplayInformation(const UEdGraph& Graph, /*out*/ FGraphDisplayInfo& DisplayInfo) const override;
|
|
//~ End UEdGraphSchema Interface.
|
|
|
|
//~ Begin UEdGraphSchema_K2 Interface
|
|
virtual const FPinConnectionResponse DetermineConnectionResponseOfCompatibleTypedPins(const UEdGraphPin* PinA, const UEdGraphPin* PinB, const UEdGraphPin* InputPin, const UEdGraphPin* OutputPin) const override;
|
|
virtual bool SearchForAutocastFunction(const UEdGraphPin* OutputPin, const UEdGraphPin* InputPin, /*out*/ FName& TargetFunction, /*out*/ UClass*& FunctionOwner) const override;
|
|
virtual bool ArePinsCompatible(const UEdGraphPin* PinA, const UEdGraphPin* PinB, const UClass* CallingContext = NULL, bool bIgnoreArray = false) const override;
|
|
virtual bool DoesSupportAnimNotifyActions() const override;
|
|
virtual void CreateFunctionGraphTerminators(UEdGraph& Graph, UClass* Class) const override;
|
|
//~ End UEdGraphSchema_K2 Interface
|
|
|
|
/** Spawn the correct node in the Animation Graph using the given AnimationAsset at the supplied location */
|
|
static void SpawnNodeFromAsset(UAnimationAsset* Asset, const FVector2D& GraphPosition, UEdGraph* Graph, UEdGraphPin* PinIfAvailable);
|
|
|
|
/** Update the specified node to a new asset */
|
|
static void UpdateNodeWithAsset(class UK2Node* K2Node, UAnimationAsset* Asset);
|
|
|
|
/** Auto-arranges a graph's inputs and outputs. Does nothing to nodes that are not roots or inputs */
|
|
ANIMGRAPH_API static void AutoArrangeInterfaceGraph(UEdGraph& Graph);
|
|
|
|
/** Checks to see whether the passed-in pin type is a pose pin (local or component space) */
|
|
ANIMGRAPH_API static bool IsPosePin(const FEdGraphPinType& PinType);
|
|
|
|
/** Checks to see whether the passed-in pin type is a local space pose pin */
|
|
ANIMGRAPH_API static bool IsLocalSpacePosePin(const FEdGraphPinType& PinType);
|
|
|
|
/** Checks to see whether the passed-in pin type is a component space pose pin */
|
|
ANIMGRAPH_API static bool IsComponentSpacePosePin(const FEdGraphPinType& PinType);
|
|
|
|
/** Makes a local space pose pin type */
|
|
ANIMGRAPH_API static FEdGraphPinType MakeLocalSpacePosePin();
|
|
|
|
/** Makes a component space pose pin type */
|
|
ANIMGRAPH_API static FEdGraphPinType MakeComponentSpacePosePin();
|
|
|
|
/** Conforms an anim graph to an interface function */
|
|
ANIMGRAPH_API static void ConformAnimGraphToInterface(UBlueprint* InBlueprint, UEdGraph& InGraph, UFunction* InFunction);
|
|
|
|
/** Find a position for a newly created sub-input */
|
|
ANIMGRAPH_API static FVector2D GetPositionForNewSubInputNode(UEdGraph& InGraph);
|
|
};
|
|
|
|
|
|
|