Building a Metadata Node Network

Introduction

Metadata allows you to better organize assets and scripts and provide flexibility in a rigging pipeline. These notes are from David Hunt's Modular Rigging lecture at GDC '09

Example Meta Node:

global proc string metaNode (string $metaParent, string $metaType)

node type: "network

Connect metaNodes to rig nodes with

stringAttr

messageAttr

Add standard attributes to all metaNodes

metaType (string)

version (int)

metaParent (message)

metaChildren (string)

-Later we will add more attrs to metaNode types as necessary

In other words, each normal Maya node in your rig (ie., ikHandle, joint, proxy mesh, etc.) has an attribute .metaparent that connects it to a metaNode (ie, metaRigFKIKChain_leftShoulder.ikChain), that contains information about the entire module.

In this way you have a metanetwork that runs alongside your normal node network for easy semantic traversal, and allows pieces to be plugged in to each other without having to hard code pieces of the actual code.

easy to maintain

scripts don't have to guess

allows you to build more complex rig behaviors

great for custom tool building

can also be used to make nonlinear editing animation tool w/in Maya (to switch between multiple cameras in the timeline

MetaRoot (the 'brain' of the rig):

All metaNodes connect "upward" to metaRoot

Directional graph like DAG in the DG

MetaRoot stores global object info (asset-centric)

global proc string metaRoot(string $rootJoint, string $objectType, string $objectTypeValue, string $objectId, string $sourceFilePath);

Semantic Traversal Functions

def listMetaParent(node):

crawl "up" the .metaParent connection

def listMetaChildren (metaNode):

crawl "down" to metaNodes connected to .metaChildren attribute

def listMetaRoot(node):

a reliable way to get metaRoot from any node on the rig

def listMetaChildOfType (metaNode, $metaType)

returns metaChildren of a given type

def listAllMetaChildren(metaNode):

returns all metaNodes "below" the input metaNode

def listMetaConnections (node):

returns a list of all metaNodes connected to the input node (nonhierarchical)

def listSingleConnections (node, attr):

gets a specific node connected to the input node.attribute plug

Resources

Object-Oriented Rigging in Skeleton Builder (H. Mackenzie)

David Hunt's lecture on Modular Rigging from GDC '09