You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added a new animation graph node that hosts its own UBlendSpaceBase. Modified UBlendSpaceBase to allow for pose links to be evaluated as the sample points. The new blend space graphs can be spawned from existing UBlendSpace and UBlendSpace1D assets, or they can be created from scratch, or they can be converted from existing blendspace player nodes via the context menu. Fixed anim node conversion functions so that their transactions work correctly. Updated FBlueprintEditorUtils::IsGraphNameUnique to allow it to work with any object as the outer, not just UBlueprint. UBlueprint still has a special case for functions and events. This is to support GenerateUniqueGraphName within a scope (e.g. an outer graph). Formalized the concept of 'node sub-graphs' (as well as the composite node pattern a little). Previously a number of known node types that contained sub-graphs (e.g. UK2Node_Composite) had special case logic for dealing with node/graph deletion etc. Now any node can opt into this behaviour via the GetSubGraphs() override. Added status bar readouts for the blendspace grid, so we dont have to stuff the prompts into the tooltip any more. Moved anim BP related APIs out of FBlueprintEditor. They are always used via FAnimationBlueprintEditor. Refactored graph title bar widget creation out into a function to allow other document tab factories to create it. Altered breadcrumb trail click callbacks and SMyBlueprint::ExecuteAction to always JumpToHyperLink rather than calling OpenDocument directly. This allows unknown (to FBlueprintEditor) document types that reference objects to be correctly jumped to using the breadcrumb trail. Derived asset editors (i.e. FAnimationBlueprintEditor) can intercept the JumpToHyperlink call to ensure that the correct document is presented (i.e. the correct tab payload is generated). Instead of making yet another bunch of duplicated code for handling the various alpha blend options, refactored this into FAnimGraphNodeAlphaOptions (for editor code) and FAnimNodeAlphaOptions (for runtime code). Added OnCopyTermDefaultsToDefaultObject for per-node copying of default values from editor node to runtime node, rather than another special-case in the compiler. #rb Jurre.deBaare,Phillip.Kavan [CL 15177316 by Thomas Sarkanen in ue5-main branch]
72 lines
2.9 KiB
C++
72 lines
2.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AnimNode_BlendSpaceGraphBase.h"
|
|
#include "Animation/InputScaleBias.h"
|
|
#include "AnimNode_RotationOffsetBlendSpaceGraph.generated.h"
|
|
|
|
// Allows multiple animations to be blended between based on input parameters
|
|
USTRUCT(BlueprintInternalUseOnly)
|
|
struct ANIMGRAPHRUNTIME_API FAnimNode_RotationOffsetBlendSpaceGraph : public FAnimNode_BlendSpaceGraphBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
friend class UAnimGraphNode_RotationOffsetBlendSpaceGraph;
|
|
friend struct FAnimNodeAlphaOptions;
|
|
friend struct FAnimGraphNodeAlphaOptions;
|
|
|
|
// @return the sync group that this blendspace uses
|
|
FName GetGroupName() const { return GroupName; }
|
|
|
|
private:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Links, meta = (AllowPrivateAccess))
|
|
FPoseLink BasePose;
|
|
|
|
/*
|
|
* Max LOD that this node is allowed to run
|
|
* For example if you have LODThreadhold to be 2, it will run until LOD 2 (based on 0 index)
|
|
* when the component LOD becomes 3, it will stop update/evaluate
|
|
* currently transition would be issue and that has to be re-visited
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Performance, meta = (DisplayName = "LOD Threshold", AllowPrivateAccess))
|
|
int32 LODThreshold = INDEX_NONE;
|
|
|
|
// Current strength of the AimOffset
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (PinShownByDefault, AllowPrivateAccess))
|
|
float Alpha = 1.0f;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (AllowPrivateAccess))
|
|
FInputScaleBias AlphaScaleBias;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (DisplayName = "Blend Settings", AllowPrivateAccess))
|
|
FInputAlphaBoolBlend AlphaBoolBlend;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (PinShownByDefault, AllowPrivateAccess))
|
|
FName AlphaCurveName = NAME_None;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (AllowPrivateAccess))
|
|
FInputScaleBiasClamp AlphaScaleBiasClamp;
|
|
|
|
float ActualAlpha = 0.0f;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (AllowPrivateAccess))
|
|
EAnimAlphaInputType AlphaInputType = EAnimAlphaInputType::Float;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Alpha, meta = (PinShownByDefault, DisplayName = "bEnabled", DisplayAfter = "AlphaScaleBias", AllowPrivateAccess))
|
|
bool bAlphaBoolEnabled = false;
|
|
|
|
bool bIsLODEnabled = false;
|
|
|
|
private:
|
|
// FAnimNode_Base interface
|
|
virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override;
|
|
virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context) override;
|
|
virtual void Update_AnyThread(const FAnimationUpdateContext& Context) override;
|
|
virtual void Evaluate_AnyThread(FPoseContext& Output) override;
|
|
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
|
|
virtual int32 GetLODThreshold() const override { return LODThreshold; }
|
|
// End of FAnimNode_Base interface
|
|
};
|