public static CommandContext Create(CommandContext parent, OpenTagCache info, HaloTag tag, Model model) { var context = new CommandContext(parent, string.Format("{0:X8}.hlmt", tag.Index)); context.AddCommand(new HlmtListVariantsCommand(info, model)); context.AddCommand(new HlmtExtractModeCommand(info, model)); return context; }
public static CommandContext Create(CommandContext parent, OpenTagCache info, TagInstance tag, Model model) { var groupName = info.StringIds.GetString(tag.Group.Name); var context = new CommandContext(parent, string.Format("{0:X8}.{1}", tag.Index, groupName)); Populate(context, info, tag, model); return context; }
public HlmtListVariantsCommand(OpenTagCache info, Model model) : base(CommandFlags.Inherit, "listvariants", "List available variants", "listvariants", "Lists variant names which can be used with \"extractmode\".") { _info = info; _model = model; }
public HlmtListVariantsCommand(Model model, StringIdCache stringIds) : base(CommandFlags.Inherit, "listvariants", "List available variants", "listvariants", "Lists variant names which can be used with \"extractmode\".") { _model = model; _stringIds = stringIds; }
public ExtractModelCommand(OpenTagCache info, Model model) : base(CommandFlags.Inherit, "extractmodel", "Extracts a render model from the current model definition.", "extractmodel <variant> <filetype> <filename>", "Extracts a variant of the render model to a file.\n" + "Use the \"listvariants\" command to list available variants.\n" + "If the model does not have any variants, just use \"default\"." + "\n" + "Supported file types: obj") { Info = info; Definition = model; }
public HlmtExtractModeCommand(TagCache cache, FileInfo fileInfo, Model model, StringIdCache stringIds) : base(CommandFlags.Inherit, "extractmode", "Extract the render model", "extractmode <variant> <filetype> <filename>", "Extracts a variant of the render model to a file.\n" + "Use the \"listvariants\" command to list available variants.\n" + "If the model does not have any variants, just use \"default\"." + "\n" + "Supported file types: obj") { _cache = cache; _fileInfo = fileInfo; _model = model; _stringIds = stringIds; }
public static void Populate(CommandContext context, OpenTagCache info, TagInstance tag, Model model) { context.AddCommand(new ListVariantsCommand(info, model)); context.AddCommand(new ExtractModelCommand(info, model)); }