This command returns a string which identifies the given node’s type. When no flags are used, the unique type name is returned. This can be useful for seeing if two nodes are of the same type. When the apiflag is used, the MFn::Type of the node is returned. This can be useful for seeing if a plug-in node belongs to a given class. When the inheritedflag is used, the command returns a string array containing the names of each of the base node types inherited by the given object. The inheritedflag cannot be used in conjunction with the apiflag.
NOT the pymel PyNode class. For objects like components or attributes, nodeType will return the dg type of the node to which the PyNode is attached.
rtype: | unicode |
---|
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
apiType (api) | bool | ||
Return the MFn::Type value (as a string) corresponding to the given node. This is particularly useful when the given node is defined by a plug-in, since in this case, the MFn::Type value corresponds to the underlying proxy class. |
|||
inherited (i) | bool | ||
Return a string array containing the names of each of the base node types inherited by the given object. Flag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.nodeType
Example:
import pymel.core as pm
pm.sphere( n='balloon' )
# Result: [nt.Transform(u'balloon'), nt.MakeNurbSphere(u'makeNurbSphere1')] #
# Find the type of node created by the sphere command
id = pm.nodeType()
# Suppose fooType is an object set node type defined by a plug-in.
pm.createNode( 'fooType', n='foo' )
pm.nodeType( 'foo', api=True ) # ==" "kPluginObjectSet"