Go to: Synopsis. Return value. Flags. Python examples.
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.
None
replace, toggle, unHilite
Long name (short name) |
Argument types |
Properties |
|
replace(r)
|
boolean
|
|
|
Hilite the specified objects. Any objects previously
hilited will no longer be hilited.
|
|
toggle(tgl)
|
boolean
|
|
|
Toggle the hilite state of the specified objects.
|
|
unHilite(u)
|
boolean
|
|
|
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.
|
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 )