Share

Run bifcmd

bifcmd lets you run a compound from the command line, independently of Maya.

You can use bifcmd to run compounds that you have published to your default user location. You can also use it to run compounds that you have published to other locations, if you have set them up as described in Set up additional compound and graph locations.

bifcmd --help prints out the complete list of command line arguments.

bifcmd takes the JSON definition file of a compound as an input to run. You can specify values for input ports, and if the compound is a simulation then you can also limit the number of frames to run. Alternatively, you can use a JSON task description file to run multiple compounds in different definition files.

  • If the specified definition file contains only one compound, that compound is run.
  • If there are multiple compounds in the definition file, you must supply the --compound-name argument.
  • If the definition file contains external operators, each operator is automatically wrapped in a compound named <operator_name>_wrapper_compound. The "_wrapper_compound" suffix can be omitted in the --compound-name option.
  • If you are using the --task-description option, the compound definition file input is optional. If used, it gets loaded in addition to those listed in the task description.

To see the JSON schema used for task description files, run bifcmd --print-task-desc-schema. There are also examples in the bifrost/examples/bifcmd/ directory of the Bifrost installation location.

The command does not write the output of a compound to file. The compound itself must write to file if you want to save your output. Similarly, geometry inputs should be read from file, and not input from a host scene.

If a compound has job ports (such as for color management), use the --set-job-port option to set their values. You can use --list-ports option to see the names of job ports on a compound.

If your output is an array of objects, use the --print-count option to control the number of objects that you want to print information for. A --print-count value of 0 disables all printing of output information.

bifcmd is located in your Bifrost installation. You can call it by navigating to its installation directory, or by calling it with its full path.

For example, if you have already navigated to the bifcmd installation directory, the following command will run frames 1 to 30 of your graph at 24 frames per second.

bifcmd /path/to/graph.json --frames 1 30 --fps 24
Note:

If your compound includes a node that writes multiple frames to a file, you must use the frames flag to indicate your frame range. If you do not include this flag when you execute bifcmd, only the first frame will be written to a file.

The default paths to bifcmd are:

OS Path
Linux /usr/autodesk/bifrost/<maya_version>/<bifrost_version>/bifrost/bin
macOS Applications/Autodesk/bifrost/<maya_version>/<bifrost_version>/bifrost/bin
Windows C:\Program Files\Autodesk\Bifrost\<maya_version>\<bifrost_version>\bifrost\bin

You can add bifcmd's directory to your PATH variable, allowing you to call it without changing directory or using its full path.

For example, if you are using Bifrost 2.3.1.0 for Maya 2022, add the following to your PATH variable:

OS Path
Linux /usr/autodesk/bifrost/maya2022/2.3.1.0/bifrost/bin
macOS /Applications/Autodesk/bifrost/maya2022/2.3.1.0/bifrost/bin
Windows C:\Program Files\Autodesk\Bifrost\Maya2022\2.3.1.0\bifrost\bin
Important:

If you have more than one version of Maya or Bifrost installed, modify your PATH variable in the command or terminal window where you will be running bifcmd. Setting it in your global environment variables, in your .bash_properties file, or in your shell configuration file can cause a conflict with the other versions of Maya and Bifrost installed.

Was this information helpful?