I want to get a vector attribute like *translate*. Attribute *translate* and *rotatePivot* is a same type. But get rotatePivot doesn't work and get translate works fine.
from maya import OpenMaya def get_mplug(s_attr_node): m_sl = OpenMaya.MSelectionList () m_sl.add (s_attr_node) mp = OpenMaya.MPlug () m_sl.getPlug (0, mp) return mp try: mp_translate = get_mplug("joint1.translate") print mp_translate.child(0).name() print mp_translate.child(1).name() print mp_translate.child(2).name() except: print "Get translate doesn't works" else: print "Get translate works" try: mp_rotate_pivot = get_mplug("joint1.rotatePivot") print mp_rotate_pivot.child(0).name() print mp_rotate_pivot.child(1).name() print mp_rotate_pivot.child(2).name() except: print "Get rotatePivot doesn't works" else: print "Get rotatePivot works" -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ce3b762c-bdfd-4c7e-9fe3-385fa89793d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.