Fix lost connections for array-based pose links in animation graph

TryResolvePoseLink only handled direct struct properties (single
FPoseLink). Many animation nodes use arrays of pose links (e.g.,
BlendPose TArray<FPoseLink> in blend list nodes). Added handling for
UScriptArray to iterate array elements and resolve each as a pose link.

Co-authored-by: LoogLong <86428208+LoogLong@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-02 09:14:57 +00:00
parent fc71b8eea8
commit 6516fab7a9

View File

@@ -424,6 +424,16 @@ public class AnimGraphViewModel
AnimGraphNode sourceNode, List<(string name, string structType)> animNodeProps,
Dictionary<string, AnimGraphNode> nodeByName, AnimGraphViewModel vm)
{
// Handle arrays of pose links (e.g., BlendPose TArray<FPoseLink>)
if (tag.GenericValue is UScriptArray array)
{
for (var i = 0; i < array.Properties.Count; i++)
{
TryResolvePoseLink(array.Properties[i], $"{pinName}[{i}]", sourceNode, animNodeProps, nodeByName, vm);
}
return;
}
// A PoseLink/ComponentSpacePoseLink is a struct with a LinkID property
if (tag.GetValue(typeof(FStructFallback)) is not FStructFallback linkStruct)
return;