Creating Script Nodes

 

You can create script nodes using the Expression Editor.

 

Demand

Executes the script when you explicitly request it using the scriptNode command (see the online command documentation for information on the scriptNode command. The before and after attributes are ignored in the this type of script.

 

Open/Close

If you've designated the script as a before script, the script executes when the file is read in batch mode. If you've designated it as an after script, it executes when the file is closed or de-referenced in batch mode, or when the node is deleted.

 

GUI Open/Close

If you've designated the script as a before script, the script executes when the file is read when running Maya is in graphical user interface mode. I If you've designated it as an after script, it executes when the file is closed or de-referenced in graphical user interface mode, or when the node is deleted.

 

UI Configuration (Internal)

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.

 

Software Render

If you've designated the script as a before script, the script executes before an animation is rendered. If you've designated it as an after script, it executes after an animation is rendered.

 

Software Frame Render

If you've designated the script as a before script, the script executes before a frame is rendered. If you've designated it as an after script, it executes after a frame is rendered.

 

 

3ds max is NOT based on the same node graph concept as Maya, but its system design shows many similarities. 3ds max is an object-oriented program, which means that every element of the system (scene nodes, base objects, modifiers, materials, animation controllers etc.) are objects in the OOP meaning of the word and can be seen as nodes. The main difference to Maya is that the 3ds max objects cannot be connected freely but impose certain rules on which inputs and outputs can be connected together.

 

There are two systems in 3ds max implementing the similar features as the Script Nodes in Maya:

·       Scripted Controllers - these are Animation Controller objects that can execute a script whenever the corresponding node is evaluated, for example when the scene time changes.

·       Callbacks - these are scripts that can be executed when triggered by system events similar to the ones mentioned in the Maya reference above. The number of possible system events is MUCH larger though. In 3ds max 7, there are 132 General Callback Events in 19 categories. Callbacks can be defined as persistent to be saved and loaded with the .MAX file like MEL Script Nodes.

·       In addition, there are 3 other types of specialized callbacks:

o       time change callbacks - script is executed when the scene time changes

o       viewport redraw callbacks - script is executed when the viewport is updated

o       object change callbacks - script is executed when a specified property has changed or an event is performed by specified objects.