1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Add additional root node and adjust method for root obtaining

This commit is contained in:
KillzXGaming 2019-08-28 16:32:58 -04:00
parent 777ba269bc
commit a3f76e99d0

View File

@ -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)