Why doesn't FAnimNode instance inside FAnimGraphNode point to the correct instance?

Hi All,

I am implementing a custom FAnimNode and I have the corresponding FAnimGraphNode setup for the same. If I understand correctly when I click on the FAnimGraphNode in the Persona Editor, the Draw calls in the FAnimGraphNode takes place.

(When the node is selected on the right, the axis of some of the bone are drawn on the left through the FAnimGraphNode Draw call)

Now FAnimGraphNode has an instance of FAnimNode delcared inside it.

    UCLASS()
    class UAnimGraphNode_FullBodyIK : public UAnimGraphNode_SkeletalControlBase
    {
    	GENERATED_UCLASS_BODY()
    
    	UPROPERTY(EditAnywhere, Category=Settings)
    	FAnimNode_FullBodyIK Node;

public : 

	// UAnimGraphNode_SkeletalControlBase interface
	virtual void Draw( FPrimitiveDrawInterface* PDI, USkeletalMeshComponent* SkelMeshComp) const OVERRIDE;
	// End of UAnimGraphNode_SkeletalControlBase interface
    
// More Code
  
    }

The relevant portion of FAnimNode class is shown below :

USTRUCT()
struct FAnimNode_FullBodyIK : public FAnimNode_SkeletalControlBase
{
	GENERATED_USTRUCT_BODY()

public:
	/** Used for containing the structure of the skeleton for accessing	 during IK computation */
	TArray<TMap<int32, SubRootJoint>>					
								_SubRootJoints;
}

However inside the Draw Call when I refer to Node it seems to not have the same values of member variables of FAnimNode as I can see when I create a breakpoint say inside the EvaluateBoneTransforms or InitializeBoneReferences functions of my FAnimNode class. When an object of this FAnimNode class is initalized I initialize an array of my data structure (_SubRootJoints), which I can see is the case when I hit the breakpoint created above. However in the variable Node inside FAnimNodeGraph class this array is empty. Seems like the object instance I hit a breakpoint in and the one referred by FAnimNodeGraph are two different objects ? How can I get access to the initialized FAnimNode inside the FAnimNodeGraph class for drawing debug objects and similar things ?

Many thanks !

Cheers,
darkZ

Pardon my stupidity. So the FAnimNode_FullBodyIK Node inside the AnimGraphNode is just a different object. Is there a way to initialize this with the actual FAnimNode data ?

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you.

Hello,

I am having similar issue in UE4.5 launcher version. I the FAnimNode I have

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Tasks, meta = (PinHiddenByDefault))
	TArray<FMyStruct> Tasks;

With MyStruct being defined as:

USTRUCT()
struct FIKinemaPenetrationTask
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
		FBoneReference BoneRef;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	bool Penetrating;
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	bool OffsetHips;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	bool WorldRayTrace;

	/** MeshOffset Depth of the bone/joint inside the mesh */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	float MeshOffset;

	/** Reference frame of Penetration Plane. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	TEnumAsByte<EBoneControlSpace> PlaneTransformSpace;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	FVector PlanePos;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = FloorPenetration)
	FVector PlaneNormal;
};

In the AnimGraph editor, I can edit the BoneReference in MyStruct and when setting a break point in the FAnimGraphNode I see the correct values, however setting a break point in the FAnimNode::Evaluate fuction shows the array Tasks to have the correct number of items but wrong data in its members.

Just as a note, with UE4.3 This used to work with no problem.

Thanks

Hi ,

Your issue is different than the original posted question. If you are still experiencing a problem, please post a new report to the AnswerHub.

Thanks