2019-05-30 21:28:43 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Bfres.Structs;
|
|
|
|
|
using SharpYaml;
|
|
|
|
|
using SharpYaml.Serialization;
|
|
|
|
|
using Syroot.NintenTools.NSW.Bfres;
|
|
|
|
|
|
2019-07-09 23:50:50 +02:00
|
|
|
|
namespace FirstPlugin
|
2019-05-30 21:28:43 +02:00
|
|
|
|
{
|
|
|
|
|
public class YamlFmat
|
|
|
|
|
{
|
|
|
|
|
public class RenderInfoConfig
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public RenderInfoType Type { get; set; }
|
|
|
|
|
public object Data { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string ToYaml(string Name, FMAT material)
|
|
|
|
|
{
|
|
|
|
|
var serializerSettings = new SerializerSettings()
|
|
|
|
|
{
|
|
|
|
|
EmitTags = false
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var serializer = new Serializer(serializerSettings);
|
|
|
|
|
return serializer.Serialize(material);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|