FaceFX Documentation and support
The facefx-studio.exe executable file is a powerful commandline tool. Pass it a .facefx file and it will launch the GUI with the specified file opened. Pass it a .fxl or .py file, and it will execute the scripts in command-line mode. (You will probably need to call the loadactor command and possibly the saveactor command in your .fxl or .py file to do anything meaningful.)
C:\>"c:\Program Files\FaceFx\FaceFX Studio Professional\facefx-studio" "C:\my-python-file.py" C:\>"c:\Program Files\FaceFx\FaceFX Studio Professional\facefx-studio" "C:\my-fxl-file.fxl" C:\>"c:\Program Files\FaceFx\FaceFX Studio Professional\facefx-studio" "C:\my-facefx-file.facefx"
Here are some other flags that can be set from the commandline. Flags expecting an argument must be followed by the equal character = and the argument.
Use the --ogre_rendersystem option to specify the render system to use when FaceFX is run from the commandline. You can also launch the application using “opengl” instead of the default “direct3d” to troubleshoot graphics driver issues. Check the install folder for the openGL shortcut as well.
Note that when running a script with the -exec flag or by passing a .FXL or .PY file, by default FaceFX is started without initializing the renderer. This allows FaceFX to be run from machines without a graphics card, but it prevents the render command from working, and the fbx commands can not export FBX files with body animations. The previewanim and exportframe commands also require the rendersystem, and these commands are used by the FBX Import process. Use the -ogre_rendersystem flag if you need to call these functions from your script. Note that the machine must have an acceptable graphics card for the render system to initialize properly.
>facefx-studio --ogre_rendersystem="direct3d" "C:\renderscript.py"
You can pass up to 9 arguments to an executed python script by using the --arg1, --arg2, --arg3, --arg4, --arg5, --arg6, --arg7, --arg8, and --arg9 flags.
You will need to import the sys module and access the arguments with the sys.argv array:
import sys print len(sys.argv), 'command line arguments: ', str(sys.argv)
You can then execute facefx-studio.exe as shown below to pass values to these arguments:
> facefx-studio --exec="command_args.py" --arg1="hello" --arg2="world" > facefx-studio command_args.py -1=hi
When specifying the -exec option from the command line or being passed a .FXL or .PY file, the executable returns a value by setting the %ERRORLEVEL%
|-2||Indicates a crash occurred. No crash dialog is displayed in command-line mode, so check the “Crash Reports” folder in the FaceFX Studio directory in the current users documents folder. Please send crash reports to OC3 Entertainment.|
|-1||The specified script contained an error and did not execute completely.|
|0||Execution completed successfully.|