How to retrieve the "alias" name for an attribute?

535 views
Skip to first unread message

r4inm4ker

unread,
Aug 30, 2010, 3:55:04 AM8/30/10
to python_inside_maya
Hi all,
I'm using pymel listConnections(s=0,d=1,c=1,p=1) to get the
connection pairs between two nodes. But now I'm facing a problem :
some nodes (like blendshape) seem to have alias names for its
attribute. For example one of the results when calling the
listConnections above was : (Attribute(u'head_deform_l_blink.output'),
Attribute(u'head_deform.weight[0]')). Another name for
"head_deform.weight[0]" was "head_deform.l_blink", and i'd prefer the
latter one for some renaming/mirroring reasons. Interestingly, both
mel and maya python listConnections return the name 'l_blink' for that
attribute, only pymel returns weight[0]. So is there any command in
pymel to convert between those two names?

Thanks,
Jefri.

damon shelton

unread,
Aug 30, 2010, 12:25:13 PM8/30/10
to python_in...@googlegroups.com
import maya.cmds as cmds

cmds.aliasAttr('head_deform.weight[0]', q = True)


Jefri Yeh

unread,
Aug 30, 2010, 11:28:37 PM8/30/10
to python_in...@googlegroups.com
I didn't know you could provide the attribute as argument to query, because in the example it only gives the whole node as argument.
Thanks!


Reply all
Reply to author
Forward
0 new messages