/// <summary> /// Import a model /// </summary> /// <param name="path"></param> /// <param name="importType"></param> /// <returns></returns> public override async Task ImportModel(string path, ModelCompile importType, bool phantomFix, bool h2SelectionLogic, bool renderPRT, bool FPAnim, string characterFPPath, string weaponFPPath, bool accurateRender, bool verboseAnim, bool uncompressedAnim, bool skyRender, bool PDARender, bool resetCompression, bool autoFBX) { string type = ""; if (verboseAnim) { type = "-verbose"; } else if (uncompressedAnim) { type = "-uncompressed"; } else if (resetCompression) { type = "-reset"; } if (autoFBX) { await AutoFBX.Model(this, path, importType); } if (importType.HasFlag(ModelCompile.render)) { if (skyRender) { await RunTool(ToolType.Tool, new() { "render-sky", path }); } else if (accurateRender) { await RunTool(ToolType.Tool, new() { "render-accurate", path, renderPRT ? "final" : "draft" }); } else { await RunTool(ToolType.Tool, new() { "render", path, renderPRT ? "final" : "draft" }); } } if (importType.HasFlag(ModelCompile.collision)) { await RunTool(ToolType.Tool, new() { "collision", path }); } if (importType.HasFlag(ModelCompile.physics)) { await RunTool(ToolType.Tool, new() { "physics", path }); } if (importType.HasFlag(ModelCompile.animations)) { if (FPAnim) { await RunTool(ToolType.Tool, new() { "fp-model-animations" + type, path, characterFPPath, weaponFPPath }); } else { await RunTool(ToolType.Tool, new() { "model-animations" + type, path }); } } }
override public async Task ImportStructure(StructureType structure_command, string data_file, bool phantom_fix, bool release, bool useFast, bool autoFBX) { if (autoFBX) { await AutoFBX.Structure(this, data_file, false); } ToolType tool = useFast ? ToolType.ToolFast : ToolType.Tool; string tool_command = structure_command.ToString().Replace("_", "-"); string data_path = data_file; if (structure_command == StructureType.structure_seams) { data_path = Path.GetDirectoryName(Path.GetDirectoryName(data_file)); } await RunTool(tool, new() { tool_command, data_path }, true); }