mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 14:00:21 +00:00
BFRES : Display scaling rule for non animated skeletons.
This commit is contained in:
parent
ec79648626
commit
7331a268bf
4 changed files with 17 additions and 1 deletions
|
@ -49,7 +49,7 @@ namespace Bfres.Structs
|
|||
{
|
||||
if (bn.Text == Bone.Name)
|
||||
{
|
||||
if (bn.UseSmoothMatrix || bn.SmoothMatrixIndex > 0)
|
||||
if (bn.UseSmoothMatrix || bn.SmoothMatrixIndex > -1)
|
||||
{
|
||||
bn.SmoothMatrixIndex = (short)SmoothIndex++;
|
||||
|
||||
|
|
|
@ -544,6 +544,9 @@ namespace FirstPlugin
|
|||
BfresBone STBone = new BfresBone(RenderableSkeleton);
|
||||
ReadBone(STBone, bone);
|
||||
RenderableSkeleton.bones.Add(STBone);
|
||||
|
||||
if (skeleton.FlagsScaling == SkeletonFlagsScaling.Maya)
|
||||
STBone.UseSegmentScaleCompensate = true;
|
||||
}
|
||||
|
||||
skl.Nodes.Clear();
|
||||
|
|
|
@ -357,6 +357,9 @@ namespace FirstPlugin
|
|||
BfresBone STBone = new BfresBone(RenderableSkeleton);
|
||||
ReadBone(STBone, bone);
|
||||
RenderableSkeleton.bones.Add(STBone);
|
||||
|
||||
if (skeleton.FlagsScaling == SkeletonFlagsScaling.Maya)
|
||||
STBone.UseSegmentScaleCompensate = true;
|
||||
}
|
||||
|
||||
skl.Nodes.Clear();
|
||||
|
|
|
@ -11,6 +11,7 @@ using Bfres.Structs;
|
|||
using ResU = Syroot.NintenTools.Bfres;
|
||||
using Syroot.NintenTools.NSW.Bfres;
|
||||
using Toolbox.Library.Forms;
|
||||
using Toolbox.Library;
|
||||
|
||||
namespace FirstPlugin.Forms
|
||||
{
|
||||
|
@ -112,12 +113,21 @@ namespace FirstPlugin.Forms
|
|||
{
|
||||
activeSkeleton.node.SkeletonU.FlagsRotation = (ResU.SkeletonFlagsRotation)rotationModeCB.SelectedItem;
|
||||
activeSkeleton.node.SkeletonU.FlagsScaling = (ResU.SkeletonFlagsScaling)scalingModeCB.SelectedItem;
|
||||
|
||||
foreach (var bone in activeSkeleton.bones)
|
||||
bone.UseSegmentScaleCompensate = activeSkeleton.node.SkeletonU.FlagsScaling.HasFlag(SkeletonFlagsScaling.Maya);
|
||||
activeSkeleton.update();
|
||||
}
|
||||
else
|
||||
{
|
||||
activeSkeleton.node.Skeleton.FlagsRotation = (SkeletonFlagsRotation)rotationModeCB.SelectedItem;
|
||||
activeSkeleton.node.Skeleton.FlagsScaling = (SkeletonFlagsScaling)scalingModeCB.SelectedItem;
|
||||
|
||||
foreach (var bone in activeSkeleton.bones)
|
||||
bone.UseSegmentScaleCompensate = activeSkeleton.node.Skeleton.FlagsScaling.HasFlag(SkeletonFlagsScaling.Maya);
|
||||
activeSkeleton.update();
|
||||
}
|
||||
LibraryGUI.UpdateViewport();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue