Note interface

Note Interfaces

Note Interfaces are an excellent way of displaying images and getting user input. As images can be used for the background and buttons, Note interfaces can be made to look any way you want. Note interfaces don’t exist on their own and must be called from a zscript or zplugin button.

An example of a Note interface is the Projection Master dialog:

Projection Master dialog

A Simple Note Interface

A simple Note interface can be used to inform the user of the current state of ZBrush so that they can decide how to proceed. For example, if there is a mesh in Edit mode and the mesh will be dropped to the canvas during the next operation:

Simple Note interface

Here is the code:

[If,[IGetFlags,Transform:Edit]>=8,/*check for mesh in Edit mode*/
/*if yes, show Note interface, else do nothing:*/

[NoteIButton,"Proceed"][NoteIButton,"Cancel"]/*Option buttons*/
[VarSet,output,[Note,"\C8DCDE2\n3DTool in Edit/Transform mode. Tool will be dropped to canvas.",,0,3027773,48,400, ,1,1,0,0,]]/*the note that displays the buttons, the return response is stored in the output variable*/
[If,output=1,[IUnPress,Transform:Edit]]/*code for first button press*/
[If,output=2,[Exit]]/*code for second button press*/
]/*end if*/

Multiple Choice Note Interfaces

The Projection Master dialog is an example of a multiple choice Note interface; the user can press buttons any number of times without the interface disappearing. This is achieved by putting the Note interface code inside a loop with the repeat set to a high number so that it is effectively endless. The interface will update after each button press but only exit when the ‘proceed’ or ‘cancel’ button is pressed.

Multiple choice Note interface

Multiple choice Note interface example

This is an example of a multiple choice Note interface. It is for a coffee serving utility, although the actual serving code has been omitted for simplicity. The interface will stay visible until the user has finished making their choice and either  presses the Serve Now or the Cancel button. The default proceed response – in this case Serve Now – will also result  from the user pressing the keyboard spacebar

Download the code for this example here.