mirror of
https://github.com/4sval/FModel.git
synced 2026-08-23 18:04:31 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user