Import User data
Import userdata when importing a WiiU animation to a Switch bfres
This commit is contained in:
parent
2fd88ce7eb
commit
f2601229d3
@ -384,6 +384,26 @@ namespace FirstPlugin
|
|||||||
ska.BakedSize = skeletalAnimU.BakedSize;
|
ska.BakedSize = skeletalAnimU.BakedSize;
|
||||||
ska.Loop = skeletalAnimU.Loop;
|
ska.Loop = skeletalAnimU.Loop;
|
||||||
ska.Baked = skeletalAnimU.Baked;
|
ska.Baked = skeletalAnimU.Baked;
|
||||||
|
foreach (var userDataU in skeletalAnimU.UserData)
|
||||||
|
{
|
||||||
|
var parser = new UserDataParser();
|
||||||
|
var userDataNX = new ResNX.UserData();
|
||||||
|
parser.Type = userDataU.Value.Type.ToString();
|
||||||
|
parser.UserDataName = userDataU.Value.Name;
|
||||||
|
userDataNX.Name = parser.UserDataName;
|
||||||
|
if (parser.Type == "Byte")
|
||||||
|
userDataNX.SetValue(parser.GetBytes());
|
||||||
|
if (parser.Type == "Single")
|
||||||
|
parser.LoadValues(userDataU.Value.GetValueSingleArray());
|
||||||
|
userDataNX.SetValue(parser.GetFloats());
|
||||||
|
if (parser.Type == "Int32")
|
||||||
|
userDataNX.SetValue(parser.GetInts());
|
||||||
|
if (parser.Type == "String")
|
||||||
|
userDataNX.SetValue(parser.GetStringASCII());
|
||||||
|
if (parser.Type == "WString")
|
||||||
|
userDataNX.SetValue(parser.GetStringUnicode());
|
||||||
|
ska.UserDatas.Add(userDataNX);
|
||||||
|
}
|
||||||
foreach (var boneAnimU in skeletalAnimU.BoneAnims)
|
foreach (var boneAnimU in skeletalAnimU.BoneAnims)
|
||||||
{
|
{
|
||||||
var boneAnim = new ResNX.BoneAnim();
|
var boneAnim = new ResNX.BoneAnim();
|
||||||
|
Loading…
Reference in New Issue
Block a user