What scripts can do
- Use the After Effects scripting API on the job’s project. Compositions, layers, properties, expressions, footage, and the render queue all work as they do in After Effects.
- Read and write files in the job’s folder. Build paths from
NX.get("nxWorkpath"). Relative paths, and paths that start with~/, also resolve to the job’s folder.Folder.temp,Folder.desktop,Folder.myDocuments,Folder.userData, andFolder.appDatapoint to folders inside it. - Load other script files from the job’s folder with
$.evalFile, for example a library you download with astaticasset. - Use data from outside the job by downloading it with a
staticasset. Nexrender downloads it into the job’s folder before your script runs, so your script reads it like any other file.
Limits
A script can write up to 500 MB to files. Writing more stops the job with afile_write_limit error.
Rules for every script
- No preprocessor directives. The API accepts the job, but the job fails before rendering if a script uses
#include,#includepath, or#targetengine. To share code between scripts, download it with astaticasset and load it with$.evalFile. See Load shared code. - Dialogs don’t stop the render.
alert,confirm, andpromptwrite their message to the render log instead of opening a dialog.confirmreturnsfalseandpromptreturnsnull. - Leave render output paths as they are. Nexrender sets the job’s output itself.
Sandbox errors
When a script does something the sandbox doesn’t allow, the job fails before rendering. Its error starts withnexrender: sandbox violation and a code:
Job error
File or Folder object, before anything is read or written.

