Go to: Synopsis. Return value. Flags. Python examples.
headsUpMessage( [message string] , [horizontalOffset=int], [object=string], [selection=boolean], [time=float], [verticalOffset=int])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
headsUpMessage is undoable, NOT queryable, and NOT
editable.
This command draws a message in the 3d view. The message is
automatically erased at the next screen refresh.
None
horizontalOffset, object, selection,
time, verticalOffset
Long name (short name) |
Argument types |
Properties |
object(o) |
string |
 |
|
If an object is specified, then the message is drawn just above
the object's bounding-box centre point. If this flag is not
specified, or the object is not found, then the message is centred
in the current view. |
|
selection(s) |
boolean |
 |
|
If this flag is specified, the message will be centred among
the currently selected objects. This flag does nothing if the
object flag is also specified. |
|
time(t) |
float |
 |
|
If this flag is specified, the message will be displayed for a
minimum of the given amount of time (in seconds). Otherwise a
default time of 1.0 seconds is used. |
|
verticalOffset(vo) |
int |
 |
|
If this flag is specified, the message will appear the
specified distance (in pixels) above the point. Otherwise, a
default vertical offset of 0 pixels is used. |
|
horizontalOffset(ho) |
int |
 |
|
If this flag is specified, the message will appear the
specified distance (in pixels) to the right of the point.
Otherwise, a default horizontal offset of 0 pixels is used. |
|
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
cmds.headsUpMessage( 'Ouch!' )
cmds.headsUpMessage( 'This is Circle 1', object='circle1' )
cmds.headsUpMessage( 'These objects are selected', selection=True )
cmds.headsUpMessage( 'Text appears for minimum of 5 seconds.', time=5.0 )
cmds.headsUpMessage( 'Text appears 0 pixels above point.', verticalOffset=20 )
cmds.headsUpMessage( 'Text appears 20 pixels to the left of the point.', horizontalOffset=-20 )