Search code examples
maya

How to access the notes field of an object in Maya


Is it possible to access the 'notes' field of an object through the Maya scripting interface? I'm trying to get it to work inside Python, but I assume any pointer into the right direction of which class/function I need to use in the API will help me out.


Solution

  • An attribute called "notes" is added dynamically to nodes when you type in the notes field in the attribute editor. So, to check the value you can check if an attribute called "notes" exists on the node, then retrieve the value.

    The mel procedure that the maya UI uses to create and set the notes attribute is called

    setNotesAttribute(string $nodeName, string $longAttrName, string $shortAttrName, string $attrType, string $newAttrValue)
    

    Where the long name is "notes", short name is "nts", type is "string".