A script node is a node that is saved with the scene and runs when a configurable event occurs.
To create a script node
Any existing Script Nodes are displayed in the Script Nodes list.
Click Test Script to try out the script. The results appear in the Script Editor.
To edit a script node
If you need to undo your changes, click Reload.
To delete a script node
To trigger the script when... | Set... |
---|---|
You open the scene in Maya. | Execute On pull-down menu to GUI Open/Close.Script to Before. |
You close or de-reference the scene in Maya, or when the node is deleted. | Execute On to GUI Open/Close.Script to After. |
You open the scene in batch mode. | Execute On to Open/Close.Script to Before. |
You close or de-reference the scene in batch mode, or when the node is deleted. | Execute On to Open/Close.Script to After. |
Before or after an animation is rendered. | Execute On to Software Render.Script to Before or After. |
Before or after each animation frame is rendered. | Execute On to Software Frame Render.Script to Before or After. |
You specifically call it with a scriptNode command. | Execute On to Demand. |
The before script contains the user interface configuration information. It is automatically generated either by Maya or a plug-in to save the panel layout and editor state information. This script node executes its script when you open a file. After execution, the node is deleted. The after script is never executed. This node will not exist if a file is referenced or imported.