mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Resolve #752
This commit is contained in:
parent
4dfdfb36ef
commit
7da28c9aa9
@ -33,8 +33,10 @@ namespace AssetRipper.SourceGenerated.Extensions
|
|||||||
childMotion.TimeScale = 1.0f;
|
childMotion.TimeScale = 1.0f;
|
||||||
childMotion.CycleOffset = node.CycleOffset;
|
childMotion.CycleOffset = node.CycleOffset;
|
||||||
|
|
||||||
uint directID = node.GetDirectBlendParameter(childIndex);
|
if(node.TryGetDirectBlendParameter(childIndex, out uint directID))
|
||||||
childMotion.DirectBlendParameter?.CopyValues(controller.TOS_C91[directID]);
|
{
|
||||||
|
childMotion.DirectBlendParameter?.CopyValues(controller.TOS_C91[directID]);
|
||||||
|
}
|
||||||
|
|
||||||
childMotion.Mirror = node.Mirror;
|
childMotion.Mirror = node.Mirror;
|
||||||
|
|
||||||
|
|||||||
@ -49,13 +49,15 @@ namespace AssetRipper.SourceGenerated.Extensions
|
|||||||
return 1.0f;
|
return 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static uint GetDirectBlendParameter(this IBlendTreeNodeConstant constant, int index)
|
public static bool TryGetDirectBlendParameter(this IBlendTreeNodeConstant constant, int index, out uint parameter)
|
||||||
{
|
{
|
||||||
if (constant.Has_BlendDirectData() && constant.GetBlendType() == BlendTreeType.Direct)
|
if (constant.Has_BlendDirectData() && constant.GetBlendType() == BlendTreeType.Direct)
|
||||||
{
|
{
|
||||||
return constant.BlendDirectData.Data.m_ChildBlendEventIDArray[index];
|
parameter = constant.BlendDirectData.Data.m_ChildBlendEventIDArray[index];
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return 0;
|
parameter = default;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsBlendTree(this IBlendTreeNodeConstant constant) => constant.ChildIndices.Length > 0;
|
public static bool IsBlendTree(this IBlendTreeNodeConstant constant) => constant.ChildIndices.Length > 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user