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.
| Long name (short name) | Argument Types | Properties | |
|---|---|---|---|
| alpha (a) | float |
|
|
|
|||
| assistMessage (amg) | unicode |
|
|
|
|||
| backColor (bkc) | int |
|
|
|
|||
| clear (cl) | unicode |
|
|
|
|||
| dragKill (dk) | bool |
|
|
|
|||
| fade (f) | bool |
|
|
|
|||
| fadeInTime (fit) | int |
|
|
|
|||
| fadeOutTime (fot) | int |
|
|
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 |
|
|
|
|||
| font (ft) | unicode |
|
|
|
|||
| fontSize (fts) | int |
|
|
|
|||
| frameOffset (fof) | int |
|
|
|
|||
| hide (hd) | bool |
|
|
|
|||
| message (msg) | unicode |
|
|
|
|||
| minimize (min) | bool |
|
|
|
|||
| position (pos) | unicode |
|
|
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 |
|
|
|
|||
| show (sh) | bool |
|
|
|
|||
| statusMessage (smg) | unicode |
|
|
|
|||
| textAlpha (ta) | float |
|
|
|
|||
| textOffset (tof) | int |
|
|
|
|||
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 )