-
Notifications
You must be signed in to change notification settings - Fork 14
04. Customising MiEx and Pipeline Integration
Most settings on how MiEx works is specified via resource packs, but there are a couple of settings that are global in MiEx and not specified in resource packs. These settings are instead specified via environment variables or command-line arguments.
MiEx was written from the start for use in animations, and so these environment variables and command-line arguments can be used to help integrate MiEx into your CG pipeline.
These environment variables can be specified directly in your computer's settings, but you can also specify them in a miex.env file next to the MiEx.jar file. The "Edit Environment Settings" tool in MiEx lets you easily create and edit this miex.env file and is the recommended way to edit these environment variables.
| Name | Default Value | Description |
|---|---|---|
MIEX_HOME_DIR |
./ |
The folder in which to start the export file dialog. |
MIEX_RESOURCEPACK_DIR |
./resources |
The folder in which all of the resource packs that MiEx can use are located. |
MIEX_RESOURCEPACK_USD_PREFIX |
Absolute path of ./resources/
|
The prefix given to the texture paths specified in USD. It's meant to be the USD equivalent of MIEX_RESOURCEPACK_DIR. If it doesn't end with a forward slash, then MiEx will add one. |
MIEX_RESOURCEPACK_JSON_PREFIX |
Absolute path of ./resources/
|
The prefix given to the texture paths specified in JSON files. If it doesn't end with a forward slash, then MiEx will add one. |
MIEX_USDCAT_EXE |
./usdcat/usdcat.exe |
The path of the usdcat command-line tool, used by MiEx to be able to export out into USD Crate files rather than USD ASCII files. |
MIEX_LOG_FILE |
./log.txt |
The path to where it should write out all console outputs and errors. |
MIEX_MINECRAFT_ROOT_DIR |
Default Minecraft install directory | The path to the Minecraft launcher root directory. This allows MiEx to find Minecraft versions and saves from the Minecraft launcher if it is installed somewhere other than the default location. |
MIEX_MULTIMC_ROOT_DIR |
null | The root directory of a MultiMC (or fork of MultiMC like Prism) install. |
MIEX_TECHNIC_ROOT_DIR |
%APPDATA%/.technic/ |
The root directory of a Technic install. |
MIEX_MODRINTH_ROOT_DIR |
%APPDATA%/ModrinthApp/ |
The root directory of a Modrinth install. |
MIEX_HYTALE_ROOT_DIR |
%APPDATA%/Hytale/ |
The path to the Hytale launcher root directory. This allows MiEx to find versions and saves from the Hytale launcher. |
MIEX_ADDITIONAL_SAVE_DIRS |
null | A list of save folders to show in the world browser. Each save folder is the path to it and the list is separated with a semicolon ;. |
MIEX_NUM_UI_THREADS |
4 | The number of threads that MiEx should leave alone, so that it won't stall your entire computer. |
MIEX_PORTABLE_EXPORTS |
0 | Whether MiEx should make exports with all files used inside of the export's chunks folder, making the export fully portable. By default MiEx puts in the paths to the files directly in the resource pack folders, which prevents lots of unnecessary duplicate files, but makes it difficult to share exports. |
MIEX_GITHUB_REPO |
BramStoutProductions/MiEx |
The GitHub repository that MiEx should check for the latest versions of the built-in files. You can change this if, for example, you're working in a team and want to have your own set of built-in files. |
MIEX_OFFLINE_MODE |
0 | Puts MiEx into offline mode where it won't check GitHub for new versions of MiEx or new built-in files. |
MIEX_STORE_GEN_TEX_IN_EXPORT |
0 | If true, textures generated by MiEx (banners, player skins) are stored in the chunks folder of the export. If false, they are stored in a resource pack. |
MIEX_GEN_TEX_RP_NAME |
base_resource_pack |
The resource pack name to put textures generated by MiEx into. By default they are put into the base_resource_pack. |
| Name | Default Value | Description |
|---|---|---|
-homeDir <path> |
%MIEX_HOME_DIR% |
The folder in which to start the export file dialog. |
-rpDir <path> |
%MIEX_RESOURCEPACK_DIR% |
The folder in which all of the resource packs that MiEx can use are located. |
-rpUSDPrefix <string> |
%MIEX_RESOURCEPACK_USD_PREFIX% |
The prefix given to the texture paths specified in USD. It's meant to be the USD equivalent of MIEX_RESOURCEPACK_DIR
|
-rpJSONPrefix <string> |
%MIEX_RESOURCEPACK_JSON_PREFIX% |
The prefix given to the texture paths specified in JSON files. It's meant to be the JSON equivalent of MIEX_RESOURCEPACK_DIR
|
-usdcatExe <path> |
%MIEX_USDCAT_EXE% |
The path of the usdcat command-line tool, used by MiEx to be able to export out into USD Crate files rather than USD ASCII files. |
-multimcRootDir <path> |
%MIEX_MINECRAFT_ROOT_DIR% |
The path to the Minecraft launcher root directory. This allows MiEx to find Minecraft versions and saves from the Minecraft launcher if it is installed somewhere other than the default location. |
-multimcRootDir <path> |
%MIEX_MULTIMC_ROOT_DIR% |
The root directory of a MultiMC (or fork of MultiMC like Prism) install. |
-technicRootDir <path> |
%MIEX_TECHNIC_ROOT_DIR% |
The root directory of a Technic install. |
-modrinthRootDir <path> |
%MIEX_MODRINTH_ROOT_DIR% |
The root directory of a Modrinth |
-hytaleRootDir <path> |
%MIEX_HYTALE_ROOT_DIR% |
The root directory of a Hytale install. |
-additionalSaveDirs <paths> |
%MIEX_ADDITIONAL_SAVE_DIRS% |
A list of save folders to show in the world browser. Each save folder is the path to it and the list is separated with a semicolon ;. This is an alternative to %MIEX_ADDITIONAL_SAVE_DIRS%. |
-numUIThreads <number> |
%MIEX_NUM_UI_THREADS% |
The number of threads that MiEx should leave alone, so that it won't stall your entire computer. |
-usdcatExe <path> |
%MIEX_USDCAT_EXE% |
The path to the usdcat executable. If it exists, it will use this to convert the USD files to USDC (binary) files. USDC files are more efficient. |
-log <path> |
%MIEX_LOG_FILE% |
The path to where it should write out all console outputs and errors. |
-resourcePack <string> |
The name of a resource pack in %MIEX_RESOURCEPACK_DIR% that should be loaded by default. This argument can be specified multiple times to have multiple resource packs loaded by default. The first resource pack specified will then be the highest priority. |
|
-portableExports |
Whether MiEx should make exports with all files used inside of the export's chunks folder, making the export fully portable. By default MiEx puts in the paths to the files directly in the resource pack folders, which prevents lots of unnecessary duplicate files, but makes it difficult to share exports. | |
-offlineMode |
Puts MiEx into offline mode where it won't check GitHub for new versions of MiEx or new built-in files. | |
-githubRepo <string> |
BramStoutProductions/MiEx |
The GitHub repository that MiEx should check for the latest versions of the built-in files. You can change this if, for example, you're working in a team and want to have your own set of built-in files. |
-skipWorldResourcePackCheck |
If specified, skips the check when opening a world for which resource packs, data packs, addons, and mods that world depends on. | |
-storeGenTexInExport |
If specified, textures generated by MiEx (banners, player skins) are stored in the chunks folder of the export. If false, they are stored in a resource pack. | |
-genTexRpName <string> |
base_resource_pack |
The resource pack name to put textures generated by MiEx into. By default they are put into the base_resource_pack. |
-world <string> |
The name of the world to automatically load. It should either be an absolute or relative path to the world folder or the name of the world folder in the user's Minecraft saves folder. | |
-output <path> |
The path of the USD file where MiEx should export the world to. If this argument is specified, MiEx will not show a file dialog on export, but rather immediately start exporting. | |
-cli |
Turns on command-line interface mode. MiEx will run in headless mode without a UI. Instead it will wait for commands to be provided. If this flag is used, either -command, -commandFile, or -commandStdIn must be provided. All of them could also be provided, in which case, it runs the command in order of -command, -commandFile, and lastly -commandStdIn. |
|
-command <command> |
A command to execute. Commands are JSON objects. JSON arrays are seen as multiple commands to execute. A more standard command syntax of <command> [-<arg name> <arg value>]... is also allowed. |
|
-commandFile <path> |
Read in the file, parse it as a JSON object or array and run it. | |
-commandStdIn |
If enabled, it reads stdin (input pipe) for commands. Each line is parsed as a command. It first tries to parse it as a JSON object or JSON array and if that doesn't work, it tries to parse it as the more standard command syntax. |
MiEx supports a command-line interface, where it will run in headless mode (without a UI). This is useful for automation or to incorporate MiEx into another tool.
MiEx has three methods to provide it with commands. You can provide a command using the -command <command> command-line argument. You can point it to a file using -commandFile <path> which contains a command JSON object or JSON list of commands. You can also enable -commandStdIn, in which case it reads stdin (input pipe) for commands. Each line is parsed as a command. It first tries to parse it as a JSON object or JSON array and if that doesn't work, it tries to parse it as a more standard command syntax.
Commands are specified as JSON objects, with at least a property command whose value is a string that specifies which command to run. The JSON object may have additional properties which are then the arguments for the command. JSON arrays of JSON objects may also be specified for multiple commands to be run in order.
There is also an alternate command syntax that is more standard, for use with -command <command> and -commandStdIn. This syntax is <command> [-<arg name> <arg value>]..., where the argument value is either a regular string or is parsed as a JSON value.
| Argument | Description |
|---|---|
settings |
A JSON Object of export settings to apply. It is the same format as from getExportSettings
|
Applies the provided settings. Not all settings must be provided, as it only applies the specific settings specified. To remove export regions, set the value for it to null.
| Argument | Description |
|---|---|
resourcePacks |
A JSON array of example resource pack names. |
Downloads the example resource packs specified.
| Argument | Description |
|---|---|
path |
A file path of where to export to. |
Exports the world with the current export settings to the path specified.
| Argument | Description |
|---|---|
modpack |
A file path to the mods folder of a mod pack. |
resourcePack |
A string specifying the name of the resource pack to which the mod pack should be extracted to. |
Extracts the resource pack files from a mod pack.
| Return | Description |
|---|---|
resourcePacks |
A JSON array of resource pack UUIDs that are currently active. |
Returns the list of active resource packs.
| Return | Description |
|---|---|
resourcePacks |
A JSON array of names of available example resource packs. |
Returns the list of example resource packs that can be downloaded.
| Return | Description |
|---|---|
settings |
A JSON object of the current export settings. |
Returns the current export settings.
| Return | Description |
|---|---|
versions |
A JSON array of JSON objects, one for each Hytale version found. |
Returns the list of Hytale versions found by MiEx.
| Return | Description |
|---|---|
versions |
A JSON array of JSON objects, one for each Minecraft version found. |
Returns the list of Minecraft versions found by MiEx.
| Return | Description |
|---|---|
resourcePacks |
A JSON array of JSON objects, one for each resource pack available in MiEx. |
Returns the list of resource packs available in MiEx.
| Return | Description |
|---|---|
worlds |
A JSON array of JSON objects, one for each world found. |
Returns the list of worlds found by MiEx.
| Argument | Description |
|---|---|
world |
A string specifying the path of a world or name of a world. If it is a name, then it will pick the first world that it finds that matches the name. |
loadWorldResourcePacks |
A boolean indicating whether it should automatically enable the resource packs that this world depends on. If it cannot find the necessary resource packs, then it will automatically extract them and install them into a resource pack in MiEx. |
worldResourcePackName |
If MiEx is going to automatically extract a world's resource packs, this specifies the name of the resource pack into which it should all be installed to. |
Opens up a world in MiEx.
| Argument | Description |
|---|
Closes MiEx.
| Argument | Description |
|---|
Reloads all resource packs.
| Argument | Description |
|---|---|
resourcePacks |
A JSON array of resource pack UUIDs that should be made active. It preserves the order. The base_resource_pack is always put last. |
Set the active resource packs in MiEx.
| Argument | Description |
|---|---|
version |
A string specifying a Minecraft version name as outputted by getMinecraftVersions. |
Update the base_resource_pack to a different Minecraft version.
| Argument | Description |
|---|---|
version |
A string specifying a Hytale version name as outputted by getHytaleVersions. |
Update the base_resource_pack_hytale to a different Hytale version.
| Argument | Description |
|---|
Update the built-in files. This is automatically done on start up, but can be done again using this command if needed.