So, the reason is that 'nodeType' is intended to replicate maya.cmds.nodeType() - ie, return the mel type name of a dgnode (ie, something that you'd find in http://download.autodesk.com/us/maya/2009help/Nodes/index.html)
Since a component isn't a dgNode, nodeType for components (and attributes) returns the dg node type of the dg node it's attached to. I can see why this might be confusing, so I added a note to the docstring for nodeType. - Paul On Tue, Apr 7, 2009 at 11:52 AM, sberger <[email protected]> wrote: > > Hi, I am wondering why the nodeType() method of a vertex return mesh > instead of meshVertex type? > > # run this code to repro > sphere = pm.polySphere()[0] > pm.select('%s.vtx[0:10]' %sphere, r=True) > sel = pm.ls(sl=True, fl=True) > for i in sel: > print 'nodeType:', i.nodeType() > print type(i) > > Thanks > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
