Go to: Synopsis. Return value. Related. Flags. Python examples.
objectType(
object
, [isAType=string], [isType=string], [tagFromType=string], [typeFromTag=int], [typeTag=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
objectType is undoable, NOT queryable, and NOT editable.
This command returns the type of elements. Warning: This command is
incomplete and may not be supported by all object types.
string | The type of the specified object |
boolean | For "isType": was the object of the specified type? |
addAttr, aliasAttr, attributeInfo, deleteAttr, getClassification, nodeType, objExists, renameAttr
isAType, isType, tagFromType, typeFromTag, typeTag
Long name (short name) |
Argument types |
Properties |
|
isAType(isa)
|
string
|
|
|
Returns true if the object is the specified type or derives
from an object that is of the specified type. This flag will
only work with dependency nodes.
|
|
isType(i)
|
string
|
|
|
Returns true if the object is exactly of the specified type.
False otherwise.
|
|
tagFromType(tgt)
|
string
|
|
|
Returns the type tag given a type name.
|
|
typeFromTag(tpt)
|
int
|
|
|
Returns the type name given an integer type tag.
|
|
typeTag(tt)
|
boolean
|
|
|
Returns an integer tag that is unique for that object type. Not all
object types will have tags. This is the unique 4-byte value that is
used to identify nodes of a given type in the binary file format.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
# create an object to query type of
cmds.sphere( n='sphere1' )
# To query the type of an object:
cmds.objectType( 'sphere1Shape' )
# Result: nurbsSurface #
# To confirm that sphere1Shape really is a nurbs surface:
cmds.objectType( 'sphere1Shape', isType='nurbsSurface' )
# Result: 1 #