Files
thomas sarkanen a278aa13e7 Adding or removing an anim layer graph's input pose will now refresh instances without requiring a manual refresh
Also supports renaming and undo/redo of input pose additions/removals

#jira UE-135701
#rb Jurre.deBaare
#preflight 632c24c2b4515b7e22bb1c91

[CL 22144034 by thomas sarkanen in ue5-main branch]
2022-09-22 16:20:10 -04:00

41 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "EdGraph/EdGraph.h"
#include "Animation/AnimClassInterface.h"
#include "AnimGraphNode_Base.h"
#include "AnimationGraph.generated.h"
class UEdGraphPin;
/** Delegate fired when a pin's default value is changed */
DECLARE_MULTICAST_DELEGATE_OneParam(FOnPinDefaultValueChanged, UEdGraphPin* /*InPinThatChanged*/)
UCLASS(BlueprintType)
class ANIMGRAPH_API UAnimationGraph : public UEdGraph
{
GENERATED_UCLASS_BODY()
/** Delegate fired when a pin's default value is changed */
FOnPinDefaultValueChanged OnPinDefaultValueChanged;
/** Blending options for animation graphs in Linked Animation Blueprints. */
UPROPERTY(EditAnywhere, Category = GraphBlending, meta = (ShowOnlyInnerProperties))
FAnimGraphBlendOptions BlendOptions;
/** Returns contained graph nodes of the specified (or child) class */
UFUNCTION(BlueprintCallable, Category=AnimationGraph)
void GetGraphNodesOfClass(TSubclassOf<UAnimGraphNode_Base> NodeClass, TArray<UAnimGraphNode_Base*>& GraphNodes, bool bIncludeChildClasses = true);
private:
// UObject interface
virtual void PostEditUndo() override;
// Reconstruct layer nodes post-undo
void ReconstructLayerNodes() const;
};