scriptNode is undoable, queryable, and editable.
scriptNodes contain scripts that are executed when a file is loaded
or when the script node is deleted. If a script modifies a
referenced node, the changes will be tracked as reference edits
unless the scriptNode was created with the ignoreReferenceEdits
flag. The scriptNode command is used to create, edit, query, and
test scriptNodes.
In query mode, return type is based on queried flag.
Long name (short name) |
Argument types |
Properties |
-scriptType(-st) |
int |
|
|
Specifies when the script is executed. The following values may
be used:
0 |
Execute on demand. |
1 |
Execute on file load or on node deletion. |
2 |
Execute on file load or on node deletion when not in batch
mode. |
3 |
Internal |
4 |
Execute on software render |
5 |
Execute on software frame render |
6 |
Execute on scene configuration |
7 |
Execute on time changed |
C: The default value is 0.
Q: When queried, this flag returns an int. |
|
-beforeScript(-bs) |
string |
|
|
The script executed during file load.
C: The default is an empty string.
Q: When queried, this flag returns a string. |
|
-afterScript(-as) |
string |
|
|
The script executed when the script node is deleted.
C: The default is an empty string.
Q: When queried, this flag returns a string. |
|
-executeBefore(-eb) |
|
|
|
Execute the script stored in the .before attribute of the
scriptNode. This script is normally executed when the file is
loaded. |
|
-executeAfter(-ea) |
|
|
|
Execute the script stored in the .after attribute of the
scriptNode. This script is normally executed when the script node
is deleted. |
|
-name(-n) |
string |
|
|
When creating a new scriptNode, this flag specifies the name of
the node. If a non-unique name is used, the name will be modified
to ensure uniqueness. |
|
-sourceType(-stp) |
string |
|
|
Sets the language type for both the attached scripts. Valid
values are "mel" (enabled by default), and "python". |
|
-ignoreReferenceEdits(-ire)
|
|
|
|
Sets whether changes made to referenced nodes during the
execution of the script should be recorded as reference edits. This
flag must be set when the scriptNode is created. If this flag is
not set, changes to referenced nodes will be recorded as edits by
default. |
|