Nope, it's an instance of the class, and you can use it exactly as you would self. Check the example file at:
https://github.com/LumaPictures/pymel/blob/master/examples/customClasses.py In it's _postCreateVirtual, it adds an attribute, and calls it's .attr method... - Paul On Fri, Oct 19, 2012 at 12:13 PM, Morgan <[email protected]> wrote: > But that new node is different from self because it's just a node, not an > instance of the class, so although you can act on the node directly, you > can't call any of the custom methods or set member variables, I don't > think.... > > > On Saturday, October 20, 2012 7:33:39 AM UTC+13, elrond79 wrote: >> >> Morgan - though _postCreateVirtual is indeed a classmethod, when it is >> called by pymel's mechanics, it is always passed in the "newNode" as the >> first argument (after the classmethod-automatically-**created 'cls' arg, >> of course). So you can use this arg just as you would "self" in a "normal" >> instance method. >> >> - Paul >> > -- > view archives: http://groups.google.com/group/python_inside_maya > change your subscription settings: > http://groups.google.com/group/python_inside_maya/subscribe > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
