Thanks for the reply Chad! That single function from pymel saved me 20 lines of code :)
On Apr 10, 6:42 pm, Chad Dombrova <[email protected]> wrote: > for an example of an api function that gets almost any type of plug > value check out pymel.core.datatypes.getPlugValue. it's good reference. > > -chad > > On Apr 10, 2009, at 6:10 AM, scroll-lock wrote: > > > > > I managed to get the value like this: > > > node = self.thisMObject() > > fnThisNode = OpenMaya.MFnDependencyNode(node) > > attr = fnThisNode.attribute("testAttr") > > plug = OpenMaya.MPlug(node, transp) > > value = plug.asFloat() > > print value > > > But I really want to know why the other method I know works in C++ > > doesn't work for me here. And am I doing it right when I'm using the > > name of the attribute (as string) to get it's value ? > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
