Download Max Tutorial Manual - Electronic Art and Design

Transcript
Advanced Scripting
Tutorial 47
The above patch makes some assumptions, however. It assumes that mycomment is in
front of the three number boxes (otherwise, it would appear behind them). It also
assumes that the user takes a simple “inactive!” sign to heart, and doesn't try to change
the number box values anyway. Take a look at this variation:
A better approach
We've added several messages. The script bringtofront and script sendtoback messages are used in
the same manner as the Max menu commands Bring to Front and Send to Back to
adjust the visual priority of the comment object. The format of those messages is:
script bringtofront <variable-name>
script sendtoback <variable-name>
To really deactivate those number boxes (named somewhere, nowhere and anywhere),
we’ve also added scripting messages that enable and disable object response to mouse
clicks:
script respondtoclick <variable-name>
script ignoreclick <variable-name>
286