pymel.core.general.hilite

hilite(*args, **kwargs)

Hilites/Unhilites the specifed 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.

Flags:
Long name (short name) Argument Types Properties
replace (r) bool ../../../_images/create.gif
 
Hilite the specified objects. Any objects previously hilited will no longer be hilited.
toggle (tgl) bool ../../../_images/create.gif
 
Toggle the hilite state of the specified objects.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
unHilite (u) bool ../../../_images/create.gif
 
Remove the specified objects from the hilite list.

Derived from mel command maya.cmds.hilite

Example:

import pymel.core as pm

import maya.cmds as cmds

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

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

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

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

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

Previous topic

pymel.core.general.hide

Next topic

pymel.core.general.inheritTransform

Core

Core Modules

Other Modules

This Page