mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-26 06:20:24 +00:00
Add additional root node and adjust method for root obtaining
This commit is contained in:
parent
777ba269bc
commit
a3f76e99d0
1 changed files with 10 additions and 1 deletions
|
@ -471,7 +471,11 @@ namespace Toolbox.Library
|
|||
|
||||
bool IsBone = boneNames.Contains(Name) && !boneNames.Contains(ParentArmatureName) ||
|
||||
Name.Contains("Skl_Root") || Name.Contains("nw4f_root") ||
|
||||
Name.Contains("skl_root") || Name.Contains("_root") || Name.Contains("Root");
|
||||
Name.Contains("skl_root") || Name.Contains("all_root") || Name.Contains("_root") || Name.Contains("Root");
|
||||
|
||||
//Root set saved by this tool
|
||||
//Get our root manually as it's a child to this
|
||||
bool IsRootSkeleton = Name == "skeleton_root";
|
||||
|
||||
short SmoothIndex = 0;
|
||||
short RigidIndex = -1;
|
||||
|
@ -482,6 +486,11 @@ namespace Toolbox.Library
|
|||
var idenity = Matrix4x4.Identity;
|
||||
CreateByNode(node, skeleton, ParentArmatureName, SmoothIndex, RigidIndex, true, ref idenity);
|
||||
}
|
||||
else if (IsRootSkeleton && node.HasChildren)
|
||||
{
|
||||
var idenity = Matrix4x4.Identity;
|
||||
CreateByNode(node.Children[0], skeleton, ParentArmatureName, SmoothIndex, RigidIndex, true, ref idenity);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (node.HasChildren)
|
||||
|
|
Loading…
Reference in a new issue