pymel.core.general.nodeType

nodeType(node, **kwargs)

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.

Note: this will return the dg node type for an object, like maya.cmds.nodeType,

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
Flags:
  • apiType : api (bool) [create]

    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) [create]

    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

Previous topic

pymel.core.general.nodeCast

Next topic

pymel.core.general.objExists

Core

Core Modules

Other Modules

This Page