I don't know MEL, but I think the getattr built-in in Python is no different in that respect. It returns a named attribute of an object, and you pass the name of the attribute as a string. In this case, "Card2" and "Card3D" would both be attributes of nuke.nodes.
A different way to look at it is to think that any member of a module (functions, classes, etc) or a Class (methods,...) is an attribute to its parent, if that makes sense. Or, a better explanation :) http://docs.python.org/library/functions.html#getattr On Wed, Jul 6, 2011 at 3:05 PM, j00ey <[email protected]>wrote: > ** > Great, thanks both. > > I find that really confusing as I'm used to MEL where getAttr would return > the value of an attribute, not create anything. I'll remember that anyway > and hopefully sooner or later I'll understand why it works..! > > Thanks again > > _______________________________________________ > Nuke-python mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
