Select Page

Maya 2014 added some helpful in-view messages to aid users, here’s an example of how they can be used:

The built in messages are almost universally useless for professionals, however, if you’re a tool developer, you can make your own messages by using the inViewMessage command in MEL of Python.

MEL example from the Manual:


So, if you try them you’ll notice that the Python one looks much nicer, this is because the MEL one has a black background set, and the Python one uses this cool tag which highlights text in yellow.

Alongside this tag you can also use HTML to format your messages, this is extremely useful.

Some of the HTML tags that work are:

<em> – Italics
<hl> – Highlight (not HTML, but it works)
<small> – Small
<i> – Italics
<sub> – Subscript
<sup> – Superscript

<blockquote> – Indented Quote

<h1> – Large heading
<h2> – Medium heading
<h3> – Small heading

<br> – Line break
<p> – Paragraph

<span> – Allows you to set the font colour and size amongst other things.

Dont forget to close your tags like this </tag>

In my opinion these messages should replace a great many calls to ‘print’, ‘error’ and ‘warning’ in the command line.

This example in MEL creates the messages from the top image: