FaceFX Commands - exec



The exec command is used to execute Python .py files or a batch file containing one or more FaceFX Studio commands. Batch files are simply text files with a list of FaceFX commands in them. The (*.FXL) extension is common for batch files and it stands for FaceFX Language file.

Command Syntax


Flag
Long Flag
Arg
Description
-f
-file
Yes
Specifies the path or filename of a python or  text file that contains a list of FaceFX
commands that should be executed.
-s
-silent
No
executes the command in "silent" mode so that no pop-up dialogs are shown.

 

Path types

The -file flag can be followed by one of the following:

  • Absolute Path - A full path to the python or FXL file to be executed.
  • Relative Path - A path relative to the current working dicrectory.  Normally this is the folder that contains the FaceFX application, but if FaceFX was called from the DOS prompt, the current working directory is the folder that facefx was executed from.
  • File name - If only a filename is specified, the "Scripts" directory is searched for the file.  There are two Scripts directories, one in the application folder, and one in the user's folder.  The application scripts directory is searched first.

Examples

>>> %exec -file "C:\my-batch-file.fxl";
>>> %exec -f "C:\my-python-file.py";

DOS / Command Prompt

The exec command is also the interface to using FaceFX Studio as a powerful command line tool:

C:\> c:\perforce\FaceFx\Studio\FxStudio -exec "C:\my-python-file.py"
C:\> c:\perforce\FaceFx\Studio\FxStudio -exec "C:\my-fxl-file.fxl"


Notice that you do not include the “.exe” file extension when calling fxstudio. Using batch files, FaceFX can easily be used as part of an automated build script for your game. Remember that you will have to call the loadActor and saveActor commands in your batch file to do anything meaningful.
Version Number: 
2010