/mayaMetaData

Uses Maya's network node to create a metanode for tracking data in Maya.

Primary LanguagePython

mayaMetaData

Welcome to metaData for Maya.

This python module is intended to help you make complex network DG systems easy to natigate and track in Maya. At it's heart it is a grouping and relational system that sit's silently in the dependency graph via message links. You can group and organise your networks and then attach code to the groups to work on your sub networks. This makes complex netorks easy to view and debug, and can make your code mamaging these systems easy to write, remember and further more. You'll get autocomplete.

Imagine you could write code like

bob = md.GetCharacter("Bob")
bob.legs.mirror("Left")

Install

Add the module to your ptyhon path for Maya

Example

import mayaMetaData as md
import pymel.core as pCore

# Create a metaData node
node = md.MetaData()
node.m_Select() # m_* methods are in the base base.  Many of them!
# add a member variable and watch the network node automatically get the correct Maya attribute type
node.fooBar = "My String Attr"
node.myBool = True

# Parent the metaNode to another node. 
node.m_SetParent(md.MetaData())
node.m_Parents() # find the parent again.

# Get standard help
help(node.m_SetAsPart)

# Add maya objects to you metaData node and organise them by any python json serialisable attribute
node.m_SetAsPart("pSphere1", "Leg")
node.m_GetParts() # get the item back out