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

Synopsis

hilite( [objects] , [replace=boolean], [toggle=boolean], [unHilite=boolean])

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

hilite is undoable, NOT queryable, and NOT editable.

Hilites/Unhilites the specified object(s). Hiliting an object makes it possible to select the components of the object. If no objects are specified then the selection list is used.

Return value

None

Flags

replace, toggle, unHilite
Long name (short name) Argument types Properties
replace(r) boolean create
Hilite the specified objects. Any objects previously hilited will no longer be hilited.
toggle(tgl) boolean create
Toggle the hilite state of the specified objects.
unHilite(u) boolean create
Remove the specified objects from the hilite list.

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

#    Create a few objects.
#
sphere = cmds.sphere()
cmds.move( 0, 0, 3, relative=True )
cone = cmds.cone()
cmds.move( 0, 0, -3, relative=True )
cylinder = cmds.cylinder()

#    Select the sphere.
#
cmds.select( sphere, replace=True )

#    Add the cone and cylinder to the hilite list.
#
cmds.hilite( cone[0], cylinder[0] )

#    Toggle the hilite state of the cylinder.
#
cmds.hilite( cylinder[0], toggle=True )

#    Replace the hilite list with the current selected objects.
#
cmds.hilite( replace=True )