mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-15 17:27:56 +00:00
Now seanim animation imports should work
This commit is contained in:
parent
3ffc7d7f6d
commit
7bad5175ef
7 changed files with 6 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -125,7 +125,7 @@ namespace Bfres.Structs
|
|||
{
|
||||
STSkeleton skeleton = GetActiveSkeleton();
|
||||
|
||||
if (GetResFileU() != null)
|
||||
if (SkeletalAnimU != null)
|
||||
BrawlboxHelper.FSKAConverter.Fska2Chr0(ConvertWiiUToSwitch(SkeletalAnimU), FileName);
|
||||
else
|
||||
BrawlboxHelper.FSKAConverter.Fska2Chr0(SkeletalAnim, FileName);
|
||||
|
@ -278,7 +278,7 @@ namespace Bfres.Structs
|
|||
{
|
||||
ska.Name = Text;
|
||||
|
||||
if (GetResFileU() != null)
|
||||
if (SkeletalAnimU != null)
|
||||
{
|
||||
SkeletalAnimU = ConvertSwitchToWiiU(ska);
|
||||
LoadAnim(SkeletalAnimU);
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -11,10 +11,13 @@ namespace Switch_Toolbox.Library.Animations
|
|||
var seanim = SEAnim.Read(FileName);
|
||||
anim.FrameCount = seanim.FrameCount;
|
||||
anim.CanLoop = seanim.Looping;
|
||||
|
||||
|
||||
foreach (var bone in seanim.Bones)
|
||||
{
|
||||
var boneAnim = new Animation.KeyNode(bone);
|
||||
boneAnim.RotType = Animation.RotationType.EULER;
|
||||
boneAnim.UseSegmentScaleCompensate = false;
|
||||
anim.Bones.Add(boneAnim);
|
||||
|
||||
if (seanim.AnimationPositionKeys.ContainsKey(bone))
|
||||
|
@ -66,7 +69,7 @@ namespace Switch_Toolbox.Library.Animations
|
|||
}
|
||||
if (seanim.AnimationScaleKeys.ContainsKey(bone))
|
||||
{
|
||||
var scaleKeys = seanim.AnimationRotationKeys[bone];
|
||||
var scaleKeys = seanim.AnimationScaleKeys[bone];
|
||||
foreach (SEAnimFrame animFrame in scaleKeys)
|
||||
{
|
||||
boneAnim.XSCA.Keys.Add(new Animation.KeyFrame()
|
||||
|
|
Loading…
Reference in a new issue