Arrays as pins in AnimGraphNode


I am trying to implement arrays as inputs to an AnimGraphNode. I can only create pins for individual elements for the array but not the entire array. Would anyone have pointers as to how I would go about creating a pin for an entire array ?

Here’s how I have to handle arrays at the moment. It kind of works for this example but this breaks when I have to pass an array of transforms for the entire character ( ~90 elements), which I process in the event graph.

And this is what my AnimGraphNode implementation looks like :

class UAnimGraphNode_DataDrivenBone : public UAnimGraphNode_SkeletalControlBase

	UPROPERTY(EditAnywhere, Category=Settings)
	FAnimNode_DataDrivenBone Node;

	// UEdGraphNode interface
	virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const OVERRIDE;
	virtual FString GetNodeNativeTitle(ENodeTitleType::Type TitleType) const OVERRIDE;
	virtual FString GetTooltip() const OVERRIDE;
	// End of UEdGraphNode interface

	virtual void CreateOutputPins() OVERRIDE;
	// UAnimGraphNode_SkeletalControlBase interface
	virtual FText GetControllerDescription() const OVERRIDE;
	// End of UAnimGraphNode_SkeletalControlBase interface


I define the arrays inside the FAnimNode_DataDrivenBone structure definition.

One example is below :

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = DataDrivenPose, meta = (PinShownByDefault))
	TArray<FVector>				Query;

Many thanks.


could you post a screenshot for the code sample, so we can use it as a start point ?

I just edited my question with some more details. Please let me know if you need more details.

I am running into this same problem, and really hope this question is eventually answered. I can add elements to pins once I add elements to the array, but I would really be able to plug in an array of dynamic length.

Any updates? Thank you!

Hi, is there any solution yet on how to plug in a dynamic array for an input pin?

I have implemented this using custom structure:

struct FBonesTransfroms
	/*Array of names*/
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "BonesTransfroms")
		TArray <FName> Names;
	/*Array of transforms*/
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "BonesTransfroms")
		TArray <FTransform> Transforms;

Then I just use this structure in my AnimNode_SetBonesTransforms.h:

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = SkeletalControl, meta = (PinShownByDefault))
		FBonesTransfroms BonesTransfroms;

and AnimNode_SetBonesTransforms.cpp:

void FAnimNode_SetBonesTransforms::EvaluateComponentSpace(FComponentSpacePoseContext& Output)
	if (BonesTransfroms.Transforms.Num() && BonesTransfroms.Names.Num())
        //some code


Your code is very helpful.
I have question about how you find the bone by bone name in animnode?
Thank you