public void CreateSkin(int meshId, object[] skeletons) { string[] rootNames = Utility.Convert <string>(skeletons); List <xxFrame> skeletonFrames = new List <xxFrame>(rootNames.Length); foreach (string root in rootNames) { skeletonFrames.Add(Frames[GetFrameId(root)]); } xx.CreateSkin(Meshes[meshId], skeletonFrames); Changed = true; }
public static void ExportFbx([DefaultVar] xxParser xxParser, object[] meshNames, object[] xaParsers, int startKeyframe, int endKeyframe, bool linear, string path, string exportFormat, bool allFrames, bool skins) { List <xaParser> xaParserList = null; if (xaParsers != null) { xaParserList = new List <xaParser>(Utility.Convert <xaParser>(xaParsers)); } List <xxFrame> meshFrames = xx.FindMeshFrames(xxParser.Frame, new List <string>(Utility.Convert <string>(meshNames))); Fbx.Exporter.Export(path, xxParser, meshFrames, xaParserList, startKeyframe, endKeyframe, linear, exportFormat, allFrames, skins); }
public void AddBone(int id, object[] meshes) { string[] meshFrameNames = Utility.Convert <string>(meshes); foreach (string meshName in meshFrameNames) { xxFrame meshFrame = xx.FindFrame(meshName, Parser.Frame); if (xx.FindBone(meshFrame.Mesh.BoneList, Frames[id].Name) == null) { xx.CreateBone(Frames[id], meshFrame.Mesh); } } Changed = true; }
public void ComputeBoneMatrices(object[] meshNames) { string[] meshFrameNames = Utility.Convert <string>(meshNames); List <string> meshFrameNamesList = new List <string>(meshFrameNames.Length); foreach (string name in meshFrameNames) { meshFrameNamesList.Add(name); } List <xxFrame> meshFrames = xx.FindMeshFrames(Parser.Frame, meshFrameNamesList); foreach (xxFrame meshFrame in meshFrames) { xx.ComputeBoneMatrices(meshFrame.Mesh.BoneList, Parser.Frame); } Changed = true; }
public static void ExportFbx([DefaultVar] xxParser xxParser, object[] meshNames, object[] xaParsers, int startKeyframe, int endKeyframe, bool linear, bool EulerFilter, double filterPrecision, string path, string exportFormat, bool allFrames, bool skins, bool embedMedia, bool compatibility) { List <xaParser> xaParserList = null; if (xaParsers != null) { xaParserList = new List <xaParser>(Utility.Convert <xaParser>(xaParsers)); } List <xxFrame> meshFrames = meshNames != null?xx.FindMeshFrames(xxParser.Frame, new List <string>(Utility.Convert <string>(meshNames))) : null; if (meshFrames != null && meshFrames.Count == 0) { meshFrames = null; } Fbx.Exporter.Export(path, xxParser, meshFrames, xaParserList, startKeyframe, endKeyframe, linear, EulerFilter, (float)filterPrecision, exportFormat, allFrames, skins, embedMedia, compatibility); }
public static void ExportMqo([DefaultVar] xxParser parser, object[] meshNames, string dirPath, bool singleMqo, bool worldCoords, bool sortMeshes = true) { List <xxFrame> meshParents = xx.FindMeshFrames(parser.Frame, new List <string>(Utility.Convert <string>(meshNames))); if (sortMeshes) { meshParents.Sort(); } Mqo.Exporter.Export(dirPath, parser, meshParents, singleMqo, worldCoords); }