convertUsage top-level constant

String const convertUsage

flutter3d convert's help.

Implementation

const String convertUsage = '''
Usage: flutter3d convert <input...> [-o <dir>] [options]

Converts models, materials and scenes into the engine's formats. Each input
becomes ONE <name>.f3d bundle: the model with its lights and cameras, its
materials and textures, material language programs (.f3dmat), and its scene
as prefab documents, with the models a scene names carried inside. --split
writes the separate files instead; with it, each format becomes:

  glTF, GLB, OBJ+MTL, STL, PLY   -> <name>.f3d, materials/*.fmat
  .ply/.spz splat capture        -> <name>.f3dsplat
  FBX (FBX2glTF or Blender)      -> <name>.f3d via glTF
  .blend (Blender)               -> <name>.f3d via glTF
  USDA, USDZ (.usdc via usdcat)  -> <name>.f3d, materials/*.fmat,
                                    <name>.level.json with prefabs
  MaterialX .mtlx                -> materials/*.fmat, or *.f3dmat for a graph
  Unity .prefab, .unity          -> <name>.level.json with prefabs,
                                    models/*.f3d, materials/*.fmat
  Unity .mat                     -> materials/*.fmat
  Godot .tscn                    -> <name>.level.json with prefabs
  Godot .tres material           -> materials/*.fmat

An input may be a file, a directory (every recognised file under it) or a
glob ('assets/**.prefab', quoted so the shell leaves it alone). The format
is read from the extension, and from the first bytes when the extension
says nothing.

Options:
  -o, --output <dir>      Where to write (default: the current directory).
  --dry-run               Read everything, report what would be written, and
                          write nothing.
  --overwrite             Replace files that exist with different contents.
                          Without it the run writes nothing when any would be
                          replaced, and exits 4. A file that already holds
                          exactly what would be written is not a conflict.
  --asset-prefix <path>   What the paths a level document names start with
                          (default: the output directory as given, when it is
                          relative). Level paths are asset paths.
  --split                 Write the separate files listed above (.fmat,
                          .f3dmat, textures, models, .level.json) beside the
                          .f3d instead of one bundle per input.
  --no-materials          Do not write a model's materials as .fmat files.
  --report <file>         Also write the report as JSON.
  --json                  Print the report as JSON (format f3d.cli) instead
                          of text.
  --textures <family>     auto | bc | etc2 | universal | none, for the images
                          inside a .f3d (see dart run flutter3d_build:convert).
  --no-mips               No mip chains for compressed images.
  --lods <ratios>         Levels of detail, e.g. 0.5,0.25.
  --impostor              Bake an octahedral impostor per model.
  --chunks[=<triangles>]  Split large static meshes into culled clusters.
  -h, --help              Show this text.

Exit codes: 0 converted; 1 an input failed; 2 usage; 3 a needed external
tool (FBX2glTF, Blender, usdcat) is not installed; 4 an output exists with
different contents and --overwrite was not given.
''';