From 91900d6aeb6c4d369f881cca67444ebcf24f4d88 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Wed, 25 May 2022 17:03:19 -0400 Subject: [PATCH] Support proper checks for maya segment scale --- .../FileFormats/Pokemon/GFLX/GFBANIM/GFBANM.cs | 2 -- .../Pokemon/GFLX/GFBMDL/FlatBuffers/BufferToStruct.cs | 2 +- File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFBMDL.cs | 4 ++-- .../FileFormats/Pokemon/GFLX/GFBMDL/GFLXModel.cs | 1 + .../FileFormats/Pokemon/GFLX/GFBMDL/GFMDLStructs.cs | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBANIM/GFBANM.cs b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBANIM/GFBANM.cs index cdabbd0a..8ba0e2da 100644 --- a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBANIM/GFBANM.cs +++ b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBANIM/GFBANM.cs @@ -191,8 +191,6 @@ namespace FirstPlugin b = skeleton.GetBone(node.Name); if (b == null) continue; - b.UseSegmentScaleCompensate = true; - Updated = true; if (node.TranslateX.HasKeys) diff --git a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/FlatBuffers/BufferToStruct.cs b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/FlatBuffers/BufferToStruct.cs index 4b74bd9b..a0a5425d 100644 --- a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/FlatBuffers/BufferToStruct.cs +++ b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/FlatBuffers/BufferToStruct.cs @@ -249,7 +249,7 @@ namespace FirstPlugin Translation = ConvertVec3(bone.Translation), RadiusEnd = ConvertVec3(bone.RadiusEnd), RadiusStart = ConvertVec3(bone.RadiusStart), - Visible = bone.Visible, + SegmentScale = bone.Visible, Zero = bone.Zero, RigidCheck = rigidData, }); diff --git a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFBMDL.cs b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFBMDL.cs index cb347a34..290d1e42 100644 --- a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFBMDL.cs +++ b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFBMDL.cs @@ -379,7 +379,7 @@ namespace FirstPlugin bone.BoneType = 0; bone.Parent = genericBone.parentIndex; bone.Zero = 0; - bone.Visible = false; + bone.SegmentScale = false; bone.Scale = new GFMDLStructs.Vector3(scale.X, scale.Y, scale.Z); bone.Rotation = new GFMDLStructs.Vector3(rot.X, rot.Y, rot.Z); bone.Translation = new GFMDLStructs.Vector3(trans.X, trans.Y, trans.Z); @@ -569,7 +569,7 @@ namespace FirstPlugin bone.BoneType = 0; bone.Parent = 0; bone.Zero = 0; - bone.Visible = false; + bone.SegmentScale = false; bone.Scale = new GFMDLStructs.Vector3(1, 1, 1); bone.Rotation = new GFMDLStructs.Vector3(0, 0, 0); bone.Translation = new GFMDLStructs.Vector3(0,0,0); diff --git a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFLXModel.cs b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFLXModel.cs index c01c4adc..911b0fb2 100644 --- a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFLXModel.cs +++ b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFLXModel.cs @@ -460,6 +460,7 @@ namespace FirstPlugin Text = bone.Name; parentIndex = bone.Parent; + UseSegmentScaleCompensate = bone.SegmentScale; if (bone.Translation != null) { diff --git a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFMDLStructs.cs b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFMDLStructs.cs index b5f09db9..575f1d65 100644 --- a/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFMDLStructs.cs +++ b/File_Format_Library/FileFormats/Pokemon/GFLX/GFBMDL/GFMDLStructs.cs @@ -201,7 +201,7 @@ namespace FirstPlugin.GFMDLStructs public uint BoneType { get; set; } public int Parent { get; set; } public uint Zero { get; set; } - public bool Visible { get; set; } + public bool SegmentScale { get; set; } public Vector3 Scale { get; set; } public Vector3 Rotation { get; set; }