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 Sets the maximum alpha transparency for the message box. assistMessage / amg unicode The user assistance message to be displayed, can be html format. backColor / bkc int Sets the background color for the message using the format 0xAARRGGBB, alpha is not taken into account. clear / cl unicode 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 Use this flag if the message needs to be deleted on mouse drag. fade / f bool Whether the message will fade after a time interval or not. fadeInTime / fit int Sets how long it takes for the image to fade in (milliseconds). fadeOutTime / fot int Sets how long it takes for the image to fade out (milliseconds). fadeStayTime / fst int Sets how long the image stays at max opacity (milliseconds). font / ft unicode Sets the message to a font (eg. Arial). fontSize / fts int Sets the message font size. frameOffset / fof int Sets how far the message appears from the edge of the viewport in pixels. hide / hd bool Hides all messages. message / msg unicode The message to be displayed, can be html format. General message, inherited by -amg/assistMessageand -smg/statusMessage. minimize / min bool Minimize all messages. position / pos unicode The position that the message will appear at relative to the active viewport. The supported positions are:topLefttopCentertopRightmidLeftmidCentermidCenterTopmidCenterBotmidRightbotLeftbotCenterbotRight restore / res bool Restore all messages. show / sh bool Shows all messages. statusMessage / smg unicode The status info message to be displayed, can be html format. textAlpha / ta float Sets the maximum alpha transparency for the message text. textOffset / tof int Sets how far the text appears from the edge of the message box in pixels. uvEditor / uv bool Show the message in the active UV editor view. Flag can have multiple arguments, passed either as a tuple or a list. 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 )