Browse Source

imageconverter,sceneconverter: add -I and -C short variants.

I'm tired of typing all that.
pull/470/head
Vladimír Vondruš 6 years ago
parent
commit
6be0248e9c
  1. 12
      src/Magnum/MeshTools/sceneconverter.cpp
  2. 13
      src/Magnum/Trade/imageconverter.cpp

12
src/Magnum/MeshTools/sceneconverter.cpp

@ -72,8 +72,8 @@ information.
@section magnum-sceneconverter-usage Usage @section magnum-sceneconverter-usage Usage
@code{.sh} @code{.sh}
magnum-sceneconverter [-h|--help] [--importer IMPORTER] magnum-sceneconverter [-h|--help] [-I|--importer IMPORTER]
[--converter CONVERTER]... [--plugin-dir DIR] [--remove-duplicates] [-I|--converter CONVERTER]... [--plugin-dir DIR] [--remove-duplicates]
[--remove-duplicates-fuzzy EPSILON] [--remove-duplicates-fuzzy EPSILON]
[-i|--importer-options key=val,key2=val2,] [-i|--importer-options key=val,key2=val2,]
[-c|--converter-options key=val,key2=val2,]... [--mesh MESH] [-c|--converter-options key=val,key2=val2,]... [--mesh MESH]
@ -86,9 +86,9 @@ Arguments:
- `input` --- input file - `input` --- input file
- `output` --- output file - `output` --- output file
- `-h`, `--help` --- display this help message and exit - `-h`, `--help` --- display this help message and exit
- `--importer IMPORTER` --- scene importer plugin (default: - `-I`, `--importer IMPORTER` --- scene importer plugin (default:
@ref Trade::AnySceneImporter "AnySceneImporter") @ref Trade::AnySceneImporter "AnySceneImporter")
- `--converter CONVERTER` --- scene converter plugin(s) - `-C`, `--converter CONVERTER` --- scene converter plugin(s)
- `--plugin-dir DIR` --- override base plugin dir - `--plugin-dir DIR` --- override base plugin dir
- `--only-attributes "i j …"` --- include only attributes of given IDs in the - `--only-attributes "i j …"` --- include only attributes of given IDs in the
output output
@ -198,8 +198,8 @@ int main(int argc, char** argv) {
Utility::Arguments args; Utility::Arguments args;
args.addArgument("input").setHelp("input", "input file") args.addArgument("input").setHelp("input", "input file")
.addArgument("output").setHelp("output", "output file") .addArgument("output").setHelp("output", "output file")
.addOption("importer", "AnySceneImporter").setHelp("importer", "scene importer plugin") .addOption('I', "importer", "AnySceneImporter").setHelp("importer", "scene importer plugin")
.addArrayOption("converter").setHelp("converter", "scene converter plugin(s)") .addArrayOption('C', "converter").setHelp("converter", "scene converter plugin(s)")
.addOption("plugin-dir").setHelp("plugin-dir", "override base plugin dir", "DIR") .addOption("plugin-dir").setHelp("plugin-dir", "override base plugin dir", "DIR")
.addOption("only-attributes").setHelp("only-attributes", "include only attributes of given IDs in the output", "\"i j …\"") .addOption("only-attributes").setHelp("only-attributes", "include only attributes of given IDs in the output", "\"i j …\"")
.addBooleanOption("remove-duplicates").setHelp("remove-duplicates", "remove duplicate vertices in the mesh after import") .addBooleanOption("remove-duplicates").setHelp("remove-duplicates", "remove duplicate vertices in the mesh after import")

13
src/Magnum/Trade/imageconverter.cpp

@ -64,8 +64,9 @@ information.
@section magnum-imageconverter-usage Usage @section magnum-imageconverter-usage Usage
@code{.sh} @code{.sh}
magnum-imageconverter [-h|--help] [--importer IMPORTER] [--converter CONVERTER] magnum-imageconverter [-h|--help] [-I|--importer IMPORTER]
[--plugin-dir DIR] [-i|--importer-options key=val,key2=val2,] [-C|--converter CONVERTER] [--plugin-dir DIR]
[-i|--importer-options key=val,key2=val2,]
[-c|--converter-options key=val,key2=val2,] [--image IMAGE] [-c|--converter-options key=val,key2=val2,] [--image IMAGE]
[--level LEVEL] [--in-place] [--info] [-v|--verbose] [--] input output [--level LEVEL] [--in-place] [--info] [-v|--verbose] [--] input output
@endcode @endcode
@ -75,9 +76,9 @@ Arguments:
- `input` --- input image - `input` --- input image
- `output` --- output image, ignored if `--in-place` is present - `output` --- output image, ignored if `--in-place` is present
- `-h`, `--help` --- display this help message and exit - `-h`, `--help` --- display this help message and exit
- `--importer IMPORTER` --- image importer plugin (default: - `-I`, `--importer IMPORTER` --- image importer plugin (default:
@ref Trade::AnyImageImporter "AnyImageImporter") @ref Trade::AnyImageImporter "AnyImageImporter")
- `--converter CONVERTER` --- image converter plugin (default: - `-C`, `--converter CONVERTER` --- image converter plugin (default:
@ref Trade::AnyImageConverter "AnyImageConverter") @ref Trade::AnyImageConverter "AnyImageConverter")
- `--plugin-dir DIR` --- override base plugin dir - `--plugin-dir DIR` --- override base plugin dir
- `-i`, `--importer-options key=val,key2=val2,` --- configuration options to - `-i`, `--importer-options key=val,key2=val2,` --- configuration options to
@ -144,8 +145,8 @@ int main(int argc, char** argv) {
Utility::Arguments args; Utility::Arguments args;
args.addArgument("input").setHelp("input", "input image") args.addArgument("input").setHelp("input", "input image")
.addArgument("output").setHelp("output", "output image, ignored if --in-place or --info is present") .addArgument("output").setHelp("output", "output image, ignored if --in-place or --info is present")
.addOption("importer", "AnyImageImporter").setHelp("importer", "image importer plugin") .addOption('I', "importer", "AnyImageImporter").setHelp("importer", "image importer plugin")
.addOption("converter", "AnyImageConverter").setHelp("converter", "image converter plugin") .addOption('C', "converter", "AnyImageConverter").setHelp("converter", "image converter plugin")
.addOption("plugin-dir").setHelp("plugin-dir", "override base plugin dir", "DIR") .addOption("plugin-dir").setHelp("plugin-dir", "override base plugin dir", "DIR")
.addOption('i', "importer-options").setHelp("importer-options", "configuration options to pass to the importer", "key=val,key2=val2,…") .addOption('i', "importer-options").setHelp("importer-options", "configuration options to pass to the importer", "key=val,key2=val2,…")
.addOption('c', "converter-options").setHelp("converter-options", "configuration options to pass to the converter", "key=val,key2=val2,…") .addOption('c', "converter-options").setHelp("converter-options", "configuration options to pass to the converter", "key=val,key2=val2,…")

Loading…
Cancel
Save