UPROPERTY ingored when pined in FAnimNode_Base

Hello,

I created a simple AnimNode :

USTRUCT(BlueprintInternalUseOnly)
struct MYGAME_API FSpineAxialRotationAnimNode : public FAnimNode_Base
{
    GENERATED_BODY()

public:
    virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override
    {
        SourcePose.Initialize(Context);
    }

    virtual void Update_AnyThread(const FAnimationUpdateContext& Context) override
    {
        SourcePose.Update(Context);
    }

    virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context) override;
    virtual void Evaluate_AnyThread(FPoseContext& Output) override;

     /// @brief The source pose link (e.g., from an AnimSequence Player)
    UPROPERTY(EditAnywhere, Category = "Links")
    FPoseLink SourcePose{};

    /// @brief Bones to adjust using FBoneReference for caching
    UPROPERTY(EditAnywhere, Category = "Settings")
    TArray<FBoneReference> Bones{};

    /// @brief Twist angle in radians
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Settings", meta = (PinHiddenByDefault))
    float PhiAngle{ 0.0f };

private:
    /// @brief Cached compact bone indices
    TArray<FCompactPoseBoneIndex> BoneIndices{};
};

I don’t know why but when I do this, the phi value is taken into account :

But when I do this, it’s like the value is always 0 :

I did printed the value of CurrentRotation and the value printed is the constant value I gave to CurrentRotation. The only place its not takken into account is this custom anim node.

Is this a bug or am I missing somthing ?

Edit : Binding doesn’t work either.

Thank you

I was missing something : If you don’t call for GetEvaluateGraphExposedInputs().Execute(Context);, pined value are never evaluated :

void FSpineAxialRotationAnimNode::Update_AnyThread(const FAnimationUpdateContext& Context)
{
    GetEvaluateGraphExposedInputs().Execute(Context);

    SourcePose.Update(Context);
}

I also put one at the beginning of Evaluate_AnyThread.

1 Like