/// <summary> /// Initializes a new instance of the <see cref="BoneAnim"/> class. /// </summary> public BoneAnim() { Name = ""; _flags = 0; FlagsBase = 0; BeginRotate = 0; BeginTranslate = 0; BeginBaseTranslate = 0; Curves = new List <AnimCurve>(); BaseData = new BoneAnimData(); BeginCurve = 0; }
public static ResU.SkeletalAnim FSKAConvertSwitchToWiiU(ResNX.SkeletalAnim skeletalAnimNX) { ResU.SkeletalAnim ska = new ResU.SkeletalAnim(); ska.Name = skeletalAnimNX.Name; ska.Path = skeletalAnimNX.Path; ska.FrameCount = skeletalAnimNX.FrameCount; ska.FlagsScale = ResU.SkeletalAnimFlagsScale.None; if (skeletalAnimNX.FlagsScale.HasFlag(ResNX.SkeletalAnimFlagsScale.Maya)) { ska.FlagsScale = ResU.SkeletalAnimFlagsScale.Maya; } if (skeletalAnimNX.FlagsScale.HasFlag(ResNX.SkeletalAnimFlagsScale.Softimage)) { ska.FlagsScale = ResU.SkeletalAnimFlagsScale.Softimage; } if (skeletalAnimNX.FlagsScale.HasFlag(ResNX.SkeletalAnimFlagsScale.Standard)) { ska.FlagsScale = ResU.SkeletalAnimFlagsScale.Standard; } ska.FrameCount = skeletalAnimNX.FrameCount; ska.BindIndices = skeletalAnimNX.BindIndices; ska.BakedSize = skeletalAnimNX.BakedSize; ska.Loop = skeletalAnimNX.Loop; ska.Baked = skeletalAnimNX.Baked; foreach (var boneAnimNX in skeletalAnimNX.BoneAnims) { var boneAnimU = new ResU.BoneAnim(); ska.BoneAnims.Add(boneAnimU); boneAnimU.Name = boneAnimNX.Name; boneAnimU.BeginRotate = boneAnimNX.BeginRotate; boneAnimU.BeginTranslate = boneAnimNX.BeginTranslate; boneAnimU.BeginBaseTranslate = boneAnimNX.BeginBaseTranslate; var baseData = new ResU.BoneAnimData(); baseData.Translate = boneAnimNX.BaseData.Translate; baseData.Scale = boneAnimNX.BaseData.Scale; baseData.Rotate = boneAnimNX.BaseData.Rotate; baseData.Flags = boneAnimNX.BaseData.Flags; boneAnimU.BaseData = baseData; boneAnimU.FlagsBase = (ResU.BoneAnimFlagsBase)boneAnimNX.FlagsBase; boneAnimU.FlagsCurve = (ResU.BoneAnimFlagsCurve)boneAnimNX.FlagsCurve; boneAnimU.FlagsTransform = (ResU.BoneAnimFlagsTransform)boneAnimNX.FlagsTransform; boneAnimU.Curves = ConvertAnimCurveSwitchToWiiU(boneAnimNX.Curves); } return(ska); }