Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

objectType [-isAType string] [-isType string] [-tagFromType string] [-typeFromTag int] [-typeTag] object

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.

Return value

string The type of the specified object
boolean For "isType": was the object of the specified type?

Related

addAttr, aliasAttr, attributeInfo, deleteAttr, getClassification, nodeType, objExists, renameAttr

Flags

isAType, isType, tagFromType, typeFromTag, typeTag
Long name (short name) Argument types Properties
-isType(-i) string create
Returns true if the object is exactly of the specified type. False otherwise.
-isAType(-isa) string create
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.
-typeTag(-tt) create
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.
-typeFromTag(-tpt) int create
Returns the type name given an integer type tag.
-tagFromType(-tgt) string create
Returns the type tag given a type name.

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 be used more than once in a command.

MEL examples

// create an object to query type of
sphere -n sphere1;

// To query the type of an object:
objectType sphere1Shape;
// Result: nurbsSurface //

// To confirm that sphere1Shape really is a nurbs surface:
objectType -isType "nurbsSurface" sphere1Shape;
// Result: 1 //