static void Main(string[] args) { SEA3DAssimp importer = new SEA3DAssimp(); string openFile = null; string saveFile = null; for (int i = 0; i < args.Length; i++) { if (args[i] == "-normals") { importer.CalculateNormal = !importer.CalculateNormal; } else if (args[i] == "-modifiers") { importer.Modifiers = !importer.Modifiers; } else if (args[i] == "-tangents") { importer.CalculateTangent = !importer.CalculateTangent; } else if (args[i] == "-optimize" && i + 1 < args.Length) { importer.OptimizeLevel = int.Parse(args[++i]); } else if (args[i] == "-open" && i + 1 < args.Length) { openFile = args[++i]; } else if (args[i] == "-save" && i + 1 < args.Length) { saveFile = args[++i]; } } if (openFile != null && saveFile != null) { importer.Import(openFile); importer.Save(saveFile); } else { importer.LoadSave(); } }
public override ByteArray Run() { SEA3DAssimp importer = new SEA3DAssimp(); importer.CalculateNormal = true; importer.OptimizeLevel = 3; importer.Modifiers = false; importer.LimitBoneWeights = true; importer.SceneOnly = true; importer.MeshOnly = true; try { importer.Import(FileData.Stream, FileFormat); } catch (Exception) { return new ByteArray(); } return new ByteArray(importer.Build()); }