Pose mode improvements

This commit is contained in:
Katboi01
2023-12-18 17:20:34 +01:00
parent f928a802d7
commit 9405816231
31 changed files with 8225 additions and 387 deletions
+6 -15
View File
@@ -23,16 +23,16 @@ public class SerializableBone
{
if (t.name.EndsWith("_L"))
{
Tags.Add(BoneTags.Left);
tags.Add(BoneTags.Left);
}
else if (t.name.EndsWith("_R"))
{
Tags.Add(BoneTags.Right);
tags.Add(BoneTags.Right);
}
if(t.GetComponentInParent<DynamicBone>() != null)
{
Tags.Add(BoneTags.Dynamic);
tags.Add(BoneTags.Dynamic);
}
}
@@ -44,23 +44,14 @@ public class SerializableBone
Bone = t;
}
public void ApplyTo(SerializableBone target)
{
if(target.Bone == null)
{
Debug.LogError($"Target bone {target.Name} does not reference a bone in the scene.");
return;
}
Transform.ApplyTo(target.Bone);
}
//feel free to add more
//feel free to add more. do not change order!
public enum BoneTags
{
Left,
Right,
Dynamic,
Humanoid,
Finger,
Face
}
}