pymel.core.windows.inViewMessage

inViewMessage(*args, **kwargs)

Used for displaying in-view messages. Note: On Linux, the alphaand textAlphaflags for inViewMessage are only supported when running a window manager that supports compositing (transparency and opacity). Otherwise, they are ignored. In addition, the flags for message fading: -fade, -fadeInTime, -fadeStay and -fadeOutTimeare supported, but the message will display without a fade effect if the window manager doesn’t support compositing.

Flags:
Long name (short name) Argument Types Properties
alpha (a) float ../../../_images/create.gif
 
Sets the maximum alpha transparency for the message box.
assistMessage (amg) unicode ../../../_images/create.gif
 
The user assistance message to be displayed, can be html format.
backColor (bkc) int ../../../_images/create.gif
 
Sets the background color for the message using the format 0xAARRGGBB, alpha is not taken into account.
clear (cl) unicode ../../../_images/create.gif
 
Use this flag to clear the message at a specified position. The supported positions are the same as for the -pos/position flag.
dragKill (dk) bool ../../../_images/create.gif
 
Use this flag if the message needs to be deleted on mouse drag.
fade (f) bool ../../../_images/create.gif
 
Whether the message will fade after a time interval or not.
fadeInTime (fit) int ../../../_images/create.gif
 
Sets how long it takes for the image to fade in (milliseconds).
fadeOutTime (fot) int ../../../_images/create.gif
 

Sets how long it takes for the image to fade out (milliseconds).Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

fadeStayTime (fst) int ../../../_images/create.gif
 
Sets how long the image stays at max opacity (milliseconds).
font (ft) unicode ../../../_images/create.gif
 
Sets the message to a font (eg. “Arial”).
fontSize (fts) int ../../../_images/create.gif
 
Sets the message font size.
frameOffset (fof) int ../../../_images/create.gif
 
Sets how far the message appears from the edge of the viewport in pixels.
hide (hd) bool ../../../_images/create.gif
 
Hides all messages.
message (msg) unicode ../../../_images/create.gif
 
The message to be displayed, can be html format. General message, inherited by -amg/assistMessageand -smg/statusMessage.
minimize (min) bool ../../../_images/create.gif
 
Minimize all messages.
position (pos) unicode ../../../_images/create.gif
 

The position that the message will appear at relative to the active viewport. The supported positions are:”topLeft”“topCenter”“topRight”“midLeft”“midCenter”“midCenterTop”“midCenterBot”“midRight”“botLeft”“botCenter”“botRight”

restore (res) bool ../../../_images/create.gif
 
Restore all messages.
show (sh) bool ../../../_images/create.gif
 
Shows all messages.
statusMessage (smg) unicode ../../../_images/create.gif
 
The status info message to be displayed, can be html format.
textAlpha (ta) float ../../../_images/create.gif
 
Sets the maximum alpha transparency for the message text.
textOffset (tof) int ../../../_images/create.gif
 
Sets how far the text appears from the edge of the message box in pixels.

Derived from mel command maya.cmds.inViewMessage

Example:

import pymel.core as pm

# Create a user assist message in the center of the viewport with some of the text highlighted in yellow.
# The message will fade out after the default time.
pm.inViewMessage( amg='In-view message "hl"test"/hl".', pos='midCenter', fade=True )

Previous topic

pymel.core.windows.image

Next topic

pymel.core.windows.informBox

Core

Core Modules

Other Modules

This Page