Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

objectTypeUI( string , [isType=string], [listAll=boolean], [superClasses=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

objectTypeUI is undoable, NOT queryable, and NOT editable.

This command returns the type of UI element such as button, sliders, etc.

Return value

stringThe type of the specified object.

Flags

isType, listAll, superClasses
Long name (short name) Argument types Properties
isType(i) string create
Returns true|false if the object is of the specified type.
listAll(la) boolean create
Returns a list of all known UI commands and their respective types. Each entry contains three strings which are the command name, ui type and class name. Note that the class name is internal and is subject to change.
superClasses(sc) boolean create
Returns a list of the names of all super classes for the given object. Note that all class names are internal and are subject to change.

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.

Python examples

import maya.cmds as cmds

print(cmds.objectTypeUI( 'viewPanes' ))

# show all commands as their types
import sys
for c,e in enumerate(cmds.objectTypeUI(listAll=True)):
    c += 1
    sys.stdout.write(e + " ")
    if c % 3 == 0:
        sys.stdout.write('\n')

# show Qt inheritence hierachy for buttons
cmds.window()
cmds.rowColumnLayout()
b = cmds.button()
cmds.showWindow()
print(cmds.objectTypeUI(b,sc=True))