Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Private/AnimGraphNodeBinding_Base.h
thomas sarkanen 57122faf0a AnimNext params in Anim BPs
Added a new anim node: AnimNext Parameters. This injects parameters into the AnimNext stack for all leafwards nodes.

Added a new way of binding to parameters on anim nodes.
- Added indirection to UAnimGraphNode_Base to allow different 'binding types' to be authored by deriving from UAnimGraphNodeBinding
- Added new binding type for AnimNext parameters
- Moved existing binding code (inc UI widget creation) into UAnimGraphNodeBinding_Base
- Binding types can be selected on a per-node or per-anim BP basis

Reworked FParamStack API a little
- Allow for better error checking when pushing/popping stack layers. Pushed layers can now only be subsequently popped by passing in the handle of the pushed layer.
- Standalone layers are now wrapped in an opaque handle rather than returning a unique ptr
- GetParamData APIs now perform more involved type checking, allowing derived object types & type conversions to be implemented

Improved parameter type sandboxing for automated tests. If running low-level type tests while execution was happening on another thread, the editor could crash because of invalidating already-existing types.

Lots of other small fixes to get workflows nicer and end-to-end functionality working

#rb Nicholas.Frechette,Jaime.Cifuentes,Jurre.deBaare

[CL 26455905 by thomas sarkanen in ue5-main branch]
2023-07-19 04:36:34 -04:00

39 lines
2.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "AnimGraphNodeBinding.h"
#include "AnimGraphNodeBinding_Base.generated.h"
UCLASS(EditInlineNew, DisplayName = "Default Anim Graph Node Binding")
class UAnimGraphNodeBinding_Base : public UAnimGraphNodeBinding
{
GENERATED_BODY()
private:
friend class UAnimGraphNode_Base;
friend class UAnimBlueprintExtension_Base;
// UAnimGraphNodeBinding interface
virtual UScriptStruct* GetAnimNodeHandlerStruct() const override;
virtual void OnInternalPinCreation(UAnimGraphNode_Base* InNode) override;
virtual void OnReconstructNode(UAnimGraphNode_Base* InNode) override;
virtual bool HasBinding(FName InBindingName, bool bCheckArrayIndexName) const override;
virtual void RemoveBindings(FName InBindingName) override;
virtual void AddPinSearchMetaDataInfo(const UEdGraphPin* InPin, FName InBindingName, TArray<struct FSearchTagDataPair>& OutTaggedMetaData) const override;
virtual void HandleVariableRenamed(UBlueprint* InBlueprint, UClass* InVariableClass, UEdGraph* InGraph, const FName& InOldVarName, const FName& InNewVarName) override;
virtual void ReplaceReferences(UBlueprint* InBlueprint, UBlueprint* InReplacementBlueprint, const FMemberReference& InSource, const FMemberReference& InReplacement) override;
virtual bool ReferencesVariable(const FName& InVarName, const UStruct* InScope) const override;
virtual bool ReferencesFunction(const FName& InFunctionName, const UStruct* InScope) const override;
virtual void UpdateBindingNames(TFunctionRef<FString(const FString& InOldName)> InModifierFunction) override;
virtual void ProcessDuringCompilation(IAnimBlueprintCompilationContext& InCompilationContext, IAnimBlueprintGeneratedClassCompiledData& OutCompiledData) override;
#if WITH_EDITOR
virtual TSharedRef<SWidget> MakePropertyBindingWidget(const UAnimGraphNode_Base::FAnimPropertyBindingWidgetArgs& InArgs) override;
#endif
static void RecalculateBindingType(UAnimGraphNode_Base* InNode, FAnimGraphNodePropertyBinding& InBinding);
/** Map from property name->binding info */
UPROPERTY()
TMap<FName, FAnimGraphNodePropertyBinding> PropertyBindings;
};