2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "UObject/ObjectMacros.h"
|
2022-05-02 18:06:48 -04:00
|
|
|
#include "AssetRegistry/AssetData.h"
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "EdGraph/EdGraphSchema.h"
|
2014-04-24 14:34:01 -04:00
|
|
|
#include "EdGraphSchema_K2.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "AnimationGraphSchema.generated.h"
|
|
|
|
|
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
class FMenuBuilder;
|
|
|
|
|
class UAnimationAsset;
|
2019-09-26 11:59:23 -04:00
|
|
|
class UAnimBlueprint;
|
2019-10-01 16:59:31 -04:00
|
|
|
class UPhysicsAsset;
|
2019-09-26 11:59:23 -04:00
|
|
|
struct FBPInterfaceDescription;
|
2021-10-12 21:21:22 -04:00
|
|
|
class UAnimGraphNode_Base;
|
2022-09-08 20:30:49 -04:00
|
|
|
class UAnimGraphNode_LinkedAnimGraphBase;
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
UCLASS(MinimalAPI)
|
|
|
|
|
class UAnimationGraphSchema : public UEdGraphSchema_K2
|
|
|
|
|
{
|
2015-03-17 05:38:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
// 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;
|
|
|
|
|
|
2014-05-16 11:43:02 -04:00
|
|
|
UPROPERTY()
|
|
|
|
|
FName NAME_CustomizeProperty;
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
UPROPERTY()
|
|
|
|
|
FName NAME_OnEvaluate;
|
|
|
|
|
|
|
|
|
|
UPROPERTY()
|
|
|
|
|
FName DefaultEvaluationHandlerName;
|
|
|
|
|
|
2015-09-14 09:25:39 -04:00
|
|
|
//~ Begin UEdGraphSchema Interface.
|
2023-06-21 18:41:47 -04:00
|
|
|
ANIMGRAPH_API virtual FLinearColor GetPinTypeColor(const FEdGraphPinType& PinType) const override;
|
|
|
|
|
ANIMGRAPH_API virtual EGraphType GetGraphType(const UEdGraph* TestEdGraph) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void CreateDefaultNodesForGraph(UEdGraph& Graph) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void HandleGraphBeingDeleted(UEdGraph& GraphBeingRemoved) const override;
|
|
|
|
|
ANIMGRAPH_API virtual bool CreateAutomaticConversionNodeAndConnections(UEdGraphPin* PinA, UEdGraphPin* PinB) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void DroppedAssetsOnGraph(const TArray<FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraph* Graph) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void DroppedAssetsOnNode(const TArray<FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraphNode* Node) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void DroppedAssetsOnPin(const TArray<FAssetData>& Assets, const FVector2D& GraphPosition, UEdGraphPin* Pin) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void GetAssetsNodeHoverMessage(const TArray<FAssetData>& Assets, const UEdGraphNode* HoverNode, FString& OutTooltipText, bool& OutOkIcon) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void GetAssetsPinHoverMessage(const TArray<FAssetData>& Assets, const UEdGraphPin* HoverPin, FString& OutTooltipText, bool& OutOkIcon) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void GetAssetsGraphHoverMessage(const TArray<FAssetData>& Assets, const UEdGraph* HoverGraph, FString& OutTooltipText, bool& OutOkIcon) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void GetContextMenuActions(class UToolMenu* Menu, class UGraphNodeContextMenuContext* Context) const override;
|
|
|
|
|
ANIMGRAPH_API virtual FText GetPinDisplayName(const UEdGraphPin* Pin) const override;
|
|
|
|
|
ANIMGRAPH_API virtual bool CanDuplicateGraph(UEdGraph* InSourceGraph) const override;
|
|
|
|
|
ANIMGRAPH_API virtual bool ShouldAlwaysPurgeOnModification() const override { return true; }
|
|
|
|
|
ANIMGRAPH_API virtual bool TryCreateConnection(UEdGraphPin* A, UEdGraphPin* B) const override;
|
|
|
|
|
ANIMGRAPH_API virtual void GetGraphDisplayInformation(const UEdGraph& Graph, /*out*/ FGraphDisplayInfo& DisplayInfo) const override;
|
|
|
|
|
ANIMGRAPH_API virtual bool CanGraphBeDropped(TSharedPtr<FEdGraphSchemaAction> InAction) const override;
|
|
|
|
|
ANIMGRAPH_API virtual FReply BeginGraphDragAction(TSharedPtr<FEdGraphSchemaAction> InAction, const FPointerEvent& MouseEvent = FPointerEvent()) const override;
|
2015-09-14 09:25:39 -04:00
|
|
|
//~ End UEdGraphSchema Interface.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2015-09-14 09:25:39 -04:00
|
|
|
//~ Begin UEdGraphSchema_K2 Interface
|
2023-06-21 18:41:47 -04:00
|
|
|
ANIMGRAPH_API virtual const FPinConnectionResponse DetermineConnectionResponseOfCompatibleTypedPins(const UEdGraphPin* PinA, const UEdGraphPin* PinB, const UEdGraphPin* InputPin, const UEdGraphPin* OutputPin) const override;
|
2022-12-12 15:50:51 -05:00
|
|
|
UE_DEPRECATED(5.2, "Use the FSearchForAutocastFunctionResults variant.")
|
2023-06-21 18:41:47 -04:00
|
|
|
ANIMGRAPH_API virtual bool SearchForAutocastFunction(const FEdGraphPinType& OutputPinType, const FEdGraphPinType& InputPinType, /*out*/ FName& TargetFunction, /*out*/ UClass*& FunctionOwner) const override;
|
|
|
|
|
ANIMGRAPH_API virtual TOptional<FSearchForAutocastFunctionResults> SearchForAutocastFunction(const FEdGraphPinType& OutputPinType, const FEdGraphPinType& InputPinType) const;
|
|
|
|
|
ANIMGRAPH_API virtual bool ArePinsCompatible(const UEdGraphPin* PinA, const UEdGraphPin* PinB, const UClass* CallingContext = NULL, bool bIgnoreArray = false) const override;
|
|
|
|
|
ANIMGRAPH_API virtual bool DoesSupportCollapsedNodes() const override { return false; }
|
|
|
|
|
ANIMGRAPH_API virtual bool DoesSupportEventDispatcher() const override { return false; }
|
|
|
|
|
ANIMGRAPH_API virtual bool DoesSupportAnimNotifyActions() const override;
|
|
|
|
|
ANIMGRAPH_API virtual void CreateFunctionGraphTerminators(UEdGraph& Graph, UClass* Class) const override;
|
|
|
|
|
ANIMGRAPH_API virtual bool CanShowDataTooltipForPin(const UEdGraphPin& Pin) const override;
|
2015-09-14 09:25:39 -04:00
|
|
|
//~ End UEdGraphSchema_K2 Interface
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/** 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);
|
|
|
|
|
|
2019-10-01 16:59:31 -04:00
|
|
|
/** Spawn a rigid body node if we drop a physics asset on the graph */
|
|
|
|
|
static void SpawnRigidBodyNodeFromAsset(UPhysicsAsset* Asset, const FVector2D& GraphPosition, UEdGraph* Graph);
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/** Update the specified node to a new asset */
|
|
|
|
|
static void UpdateNodeWithAsset(class UK2Node* K2Node, UAnimationAsset* Asset);
|
|
|
|
|
|
2019-05-22 12:00:20 -04:00
|
|
|
/** 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) */
|
2014-03-14 14:13:41 -04:00
|
|
|
ANIMGRAPH_API static bool IsPosePin(const FEdGraphPinType& PinType);
|
|
|
|
|
|
2019-05-22 12:00:20 -04:00
|
|
|
/** Checks to see whether the passed-in pin type is a local space pose pin */
|
2014-03-14 14:13:41 -04:00
|
|
|
ANIMGRAPH_API static bool IsLocalSpacePosePin(const FEdGraphPinType& PinType);
|
|
|
|
|
|
2019-05-22 12:00:20 -04:00
|
|
|
/** Checks to see whether the passed-in pin type is a component space pose pin */
|
2014-03-14 14:13:41 -04:00
|
|
|
ANIMGRAPH_API static bool IsComponentSpacePosePin(const FEdGraphPinType& PinType);
|
2019-05-22 12:00:20 -04:00
|
|
|
|
|
|
|
|
/** 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);
|
|
|
|
|
|
2019-09-26 06:05:49 -04:00
|
|
|
/** Conforms anim layer nodes to an interface desc by GUID */
|
|
|
|
|
ANIMGRAPH_API static void ConformAnimLayersByGuid(const UAnimBlueprint* InAnimBlueprint, const FBPInterfaceDescription& CurrentInterfaceDesc);
|
|
|
|
|
|
2019-09-23 07:23:26 -04:00
|
|
|
UE_DEPRECATED(4.24, "Function renamed, please use GetPositionForNewLinkedInputPoseNode")
|
|
|
|
|
ANIMGRAPH_API static FVector2D GetPositionForNewSubInputNode(UEdGraph& InGraph) { return GetPositionForNewLinkedInputPoseNode(InGraph); }
|
|
|
|
|
|
|
|
|
|
/** Find a position for a newly created linked input pose */
|
|
|
|
|
ANIMGRAPH_API static FVector2D GetPositionForNewLinkedInputPoseNode(UEdGraph& InGraph);
|
2021-10-12 21:21:22 -04:00
|
|
|
|
|
|
|
|
/** Create a binding widget for the specified named pin on the specified anim graph nodes */
|
|
|
|
|
ANIMGRAPH_API static TSharedPtr<SWidget> MakeBindingWidgetForPin(const TArray<UAnimGraphNode_Base*>& InAnimGraphNodes, FName InPinName, bool bInOnGraphNode, TAttribute<bool> bInIsEnabled);
|
2022-09-08 20:30:49 -04:00
|
|
|
|
|
|
|
|
/** Unexpose pins that are unused on a linked anim graph node */
|
|
|
|
|
ANIMGRAPH_API static void HideUnboundPropertyPins(UAnimGraphNode_LinkedAnimGraphBase* Node);
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|