Command-Line Interface
You need a Studio license to use this feature. It is included in Transmutr v1.1.0 and higher.
This feature is currently under development. Please report any issue to [email protected]
General usage
The CLI (short for Command-Line Interface) is a very powerful tool that allows users to easily process large sets of models. To use the CLI, first open a terminal and type the path to the location where Transmutr.exe is stored.
To simply convert a model, add the convert command followed by the path to the model. This will convert your model to a Sketchup file with the same name, right in the current directory. Please note that the path to transmutr.exe will slightly differ on your system.
C:/Users/Frodo/AppData/Local/Programs/Transmutr/transmutr.exe convert C:/models/tree.obj

You can specify additional options by adding parameters right betweenconvert and the model's path. For instance, add the --output parameters to specify the destination and the name of the converted model:
transmutr.exe convert --output C:/sketchup/my_converted_tree.skp C:/models/tree.obj
You have control over the same set of settings as in Transmutr's graphical interface. For example, to generate a Sketchup model scaled down by half, with 95% of its geometry simplified, you could type:
transmutr.exe convert --scale 0.5 --simplification 0.95 C:/models/tree.obj
To list all the available parameters, type transmutr.exe convert --help. Please note that some parameters have a shorthand version that you can use to avoid typing long keywords, such as -o instead of --output.
Convert multiple models
To convert several models in one go, you can type their names one after another:
transmutr.exe convert C:/models/tree.fbx C:/models/sofa.obj C:/models/lamp.3ds
The CLI accepts globbing patterns to provide more flexibility when selecting models. For instance, * is useful to select several files without writing their complete names. Thus, the following command converts all the models in C:/models/trees/ that end with .obj:
transmutr.exe convert C:/models/trees/*.obj
Likewise, ** can help you search for models in several directories. For example, the following command converts all the models named tree.fbx located in any directory under C:/models/:
transmutr.exe convert C:/models/**/tree.fbx
Range operators are also useful to select names with some variations in them. The following command converts any model which name matches tree1.obj, tree2.obj, up to tree9.obj:
transmutr.exe convert C:/models/tree[1-9].obj
Similarly, we can select a range of letters. In this example, we convert any file with a name that matches furniture_a.obj, furniture_b.obj, ..., up to furniture_z.obj:
transmutr.exe convert C:/models/furniture_[a-z].obj
You can also combine different patterns by wrapping them in parentheses, separated by |, following one of the @, +, *, +, or ! operators:
@matches exactly one occurrence of the patterns?matches zero or one occurrence*matches zero or more occurrences+matches one or more occurrences!matches anything that does not match the patterns
For example, the following command converts any file that ends either with the .obj or .fbx extensions:
transmutr.exe convert C:/models/*.@(obj|fbx)
In this other example, we convert any model which name matches treeX.obj where X can be any number with one or more digits:
transmutr.exe convert C:/models/tree+([1-9]).obj
Finally, it's possible to combine different patterns to carry out very specific searches:
transmutr.exe convert C:/models/**/tree_collection_[1-5]/*_highpoly.@(fbx|obj)
Note that the paths and patterns are case-sensitive. So a pattern containing .fbx will not match a filename ending with .FBX .
Using the CLI for scripting
One way in which the CLI can be even more powerful is by including it in a scripting pipeline that automates tasks that would be tedious and time-consuming to perform manually.
This section contains examples that show how such tasks can be handled by combining Transmutr with your own scripts.
Ruby example: generating a library of LODs
In some contexts, it is useful to have several LODs (Level Of Detail) of the same model: for instance a high-resolution model for close-up shots, a medium-resolution model for mid-range shots and a very low-resolution model for distant shots. In this way, we can save performance without degrading visual quality.
In this example, we use a script written in the Ruby programming language to convert hundreds of models to three different LODs each and to sort them in appropriate output folders, all in a few lines of code.
Doing this manually would be a grueling and time-consuming job that would take several hours. Thanks to the CLI, it is now a matter of minutes.
.bat example: generating watermarked billboard proxies
Coming soon!
Last updated
Was this helpful?