Screening – Garden of the Metal
Course overview
Interests
What are the possibilities?
 
 
Maya’s Open Architecture
 
            Capability for complete changes to GUI
            Programmability
                        Customization – using MEL to control GUI
            Integration
                        Passing data to other applications
            Automation
                        Creation / Build
Repetitive tasks
                        Expressions and runtime events
            Extensions
                        Adding to the feature set
                        New controls / ways of editing / recombination
 
 
 
Fundamental Concepts of Maya Architecture
 
            GUI <> MEL Command Engine <> Dependency Graph
                        MEL (Maya Embedded Language)
                        ELF (Extension Layer Framework)
                                    Commands added to MEL for interface elements
                       
            Dependency Graph (DG)
                        Concept of “scene graphs” common to many 3D applications
 
                        Majority of MEL commands operate on the DG
 
                        Pipeline of data flow with “operators” in each DG node
                                    Push-Pull model
A node that needs updating will pull on upstream node(s) for input.
A node that updates will push data to downstream node(s), causing the downstream node(s) to update.
 

 

 
                        DG Nodes
                                    Each node has inputs/outputs and compute function
                                                I/o data is held in the node’s attribute
“Local knowledge only” for each node
looks only at its own attributes for compute function
True building blocks (like a neural network)
                                    Some nodes do not compute but only hold data
                                             e.g. “time” node
 
                        Connecting Nodes
                                    A single attribute can feed multiple attributes
                                    But not the other way around
                                    Networks can be built of arbitrary complexity
                                                Powerful capabilities
                                                “Deformers on deformers on deformers!”
 
            Updating the DG
Nodes do not have independent control as to when they update.
The Push-Pull model runs in two stages:
         1) Propagation of a status flag to all nodes
                        The “dirty bit”
2) Processing of data by flagged nodes.
                                    Partial evaluations speeds up process

 

 

                        Visualizing the DG
                                    The Hypergraph
                                                Data flow and graphical connections of attributes
                                                            Blue – single numeric values
                                                            Green – arrays
                                                            Pink – complex attributes (such as shapes)
                                                Can connect or break attribute connections
 

 

 

                           Attributes are of various datatypes
Integer, float, string, Boolean, enumerated list, arrays, vectors, matrices
Attribues can be keyable, nonkeyable, or locked.
 
                                    Channel Box
                                                Displays attributes that are keyable
(Use the channel control window to edit keyable/nonkeyable)
 
                                    Attribute Editor
                                                Displays most but not all attributes
                                                Up- and down-stream buttons
                                                Allows creation of new custom attributes
 
                                    Connection Editor
                                                Can connect or break attribute connections
 
                                    Outliner
                                                Can display all attributes
 
                        The (almost) definitive source for attributes of each node:
                                    The online Maya node and attribute reference
 
 
            A word about DAG Nodes
                        Directed Acyclic Graph
                                    The transform hierarchy
                                                Top-down
                                                Parent/child relationship
                                                            Transforms are relative to parent space
                                    Transform and shape nodes
                                                A shape cannot exist w/o a transform node
                        A DAG is a DG –
                        MEL syntax for a DAG path hierarchy :
                                    “|grandparent|parent|child”
                        Variations
                        Instances
A DAG shapenode with multiple transform node parents
 
                                 Underworld
A parametric space defined by the shape and transform node of a parent (e.g. curve on surface)
 

 

 
 
 
           
MEL
 
When using the maya interface you are indirectly issuing MEL commands
 
 
            An interpreted language
Trade-off between slower at runtime vs faster prototyping/development
            Expressions may be slower than utility nodes
            Procedures slower than a C++ compiled plugin
                        However MEL allows experimentation flexibility
            Cross-platform

 

            Scripting
                        Commandline – single command input
                        Command shell – single command with history
                        Shelf – icon access to running scripts
                        Script files – external files to load and run
                        Script nodes – saved with scene file
Runs on demand, scene open/close, render time, timeline update

 

            Script Editor window
                        History panel
                        Command input panel
                                    Use “control + enter” to run highlighted commands
                                               
 
            Learning MEL commands
                        Watch the feedback printed in the history window
                        Use “echo all commands” for additional UI commands, etc.
                        Use “help” command
                                    e.g. “help sphere”
 
            MEL commands have arguments
                        -flag <value>
                        flags have long and short names, interchangeable
                        use the help command
                        use the online MEL Command Reference

 

            MEL commands have “command modes”
                        Creation, query, and edit
                                    Default is creation
                                                Sphere;
                                    Command query
                                                Sphere –query –radius nurbsSphere1;
                                    Command edit
                                                Sphere –edit –radius 4 nurbsSphere1;
 
            Comments
                        // a one line comment
                        /* a multiline
                        comment
                        */