On Sun, Aug 16, 2009 at 05:15, King<[email protected]> wrote:
>
> def getNodeAttribute( nodeName="", attributeName="" ):
>
>    node = PyNode( nodeName )
>    cmnd = ("node."+attributeName+".get()")
>    result = python(cmnd)
>    return result
>
>
> Pymel way of getting an attribute's value is much easier. The code
> above is having some problem.

This seems a lot lot simpler to me:

import maya.cmds as cmds

def getNodeAttribute(nodeName, attrName):
  return cmds.getAttr(nodeName + '.' + attrName)

-- 
-deane

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

Reply via email to