This is our attribute MetaClass using the same principles as we learned from red9 for maya nodes. Why would this be necessary when we have other metaClasses for adding and editing attributes? Well, this kind of object can follow an attribute as it is swapped between objects and many other features. It is also useful for attribute specific work because of it’s formatting options and how maya is variable in how it needs info – sometimes node,attr, sometimes a combined string.

Superclass : None
Subclass:  None
Location: cgm.core.cgm_Meta.cgmAttr


  • objName(string/mNode)- Node to which will/does hold the attr
  • attrName(string) -Name for the attr
  • attrType– (string) – type of attr to create if it doesn’t exist or to convert to if it does
  • value – (variable) – Value for the attribute
  • initialValue – (variable) – Value for the attribute ONLY if the attribute was just created
  • …many more – see module. Most attr keywords supported


  • p_value– (get,set,doDelete)
    • get — supports our attr as message option
  • p_combinedName(asCombinedName) – ‘objLongName.attr’
  • p_combinedShortName(asCombinedShortName) – ‘obj.attr’
  • p_locked (isLocked,doLocked)
  • p_hidden(isHidden,doHidden)
  • p_keyable (isKeyable,doKeyable) 
  • p_nameAlias(getAlias,doAlias)
  • p_nameNice(getNiceName,doNiceName)
  • p_nameLong (getNameLong,doRename)
  • p_defaultValue (getDefault,doDefault)
  • p_minValue(getMinValue,doMin)
  • p_maxValue (getMaxValue,doMax)
  • p_softMinValue(getSoftMinValue,doSoftMin)
  • p_softMaxValue (getSoftMaxValue,doSoftMax)

For easier access to maya’s many queries under a myriad of functions to get at. To simpify…

  • isDynamic
  • isNumeric
  • isReadable
  • isWriteable
  • isStorable
  • isUsedAsColor
  • isUserDefined
  • isMulti
  • isIndexMatters
  • getRange
  • getSoftRange
  • getChildren
  • getParent
  • getSiblings
  • getDriven – returns driven objects or plugs
  • getDriver – returns driver objects or plugs

Intro – Let’s look at some intro flags.

Creating – Attributes and settings for them

Connections/Convert/Transfers – You can easily connect and move attributes