Hey all - I was wondering if anyone here knew of a way to query the
'type' (ie, similar to what getAttr('foo.bar', type=True) would
return) of an attribute, for ANY attribute.  Specifically, I can't
seem to find ANY way to query the type of multi-compound attribute's
children, when the multi does not have any indices created yet.

To see what I mean:

import maya.cmds as cmds

def getType(node):
    print "%-50s :" % node,
    try:
        print cmds.getAttr(node, type=True)
    except Exception:
        print "<ERROR>"

getType(u'persp.publishedNodeInfo')
getType(u'persp.publishedNodeInfo.publishedNode')
getType(u'persp.publishedNode')
getType(u'persp.publishedNodeInfo[-1].publishedNode')

getType(u'persp.instObjGroups.objectGroups')
getType(u'persp.instObjGroups.objectGroups.objectGroupId')
getType(u'persp.objectGroupId')

Is there another way to query the type of an attribute other than
getAttr? attributeQuery doesn't seem to have any relevant flags, and I
couldn't find any way to access this information from the API.

Any ideas?

- Paul

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to