Macros provide an easy way to record tasks you do often, so that they can be replayed at the press of a button. Supposing you like to model with zspheres using a particular background color and material; a macro will save you having to go through the same set up procedure each time.
How To Use Macros
To create a Macro:
- Press Macro > New Macro. Everything you do from this point on will be recorded. If you press a button, it will be recorded. If you rotate a model, this will be recorded. If you sculpt on the surface of a model, this will also be recorded.
- When you are done, simply press Macro > End Macro.
- Save the macro to a subfolder in the ZStartup\Macros folder. The name you give the file will become the name of the macro button. Note: Make sure the file name has 8 or more characters or ZBrush will not load the button.
- Your new macro button should appear automatically. If it doesn’t, press Reload All Macros to refresh the Macro menu.
You don’t have to know how macros work to make use of them but if you are interested, read the next section.
How Macros Work
Macros are plain text files that use the ZBrush scripting language ZScript to record instructions, in much the same way as recording a zscript thru the ZScript Palette. The major difference is that macros automatically become part of the ZBrush interface, so that they are available every ZBrush session, can be repositioned on a custom interface set up, and assigned a hotkey.
If you are familiar with zscripting you can edit (or even write) a macro if you wish. ZBrush recognizes the macro by its special button name of three question marks: ???. Otherwise the macro is composed of standard ZScript commands. Here is an example, which sets up a zsphere ready for modeling:
//ZBRUSH MACRO - Recorded in ZBrush version 4.5 [IButton,???,"Press to run this macro. Macros can be aborted by pressing the ‘esc’ key.", [IShowActions,0] [IConfig,4.5] [IPress,Tool:SimpleBrush] [IColorSet,141,141,141] [ISet,Document:Back,141.55293] [IColorSet,255,255,255] [IPress,Tool:SimpleBrush] [IPress,Tool:ZSphere] [CanvasClick,480,360,480,370] [IPress,Transform:Scale] [ISet,Transform:Info:X Component,150] [ISet,Transform:Info:Y Component,150] [ISet,Transform:Info:Z Component,150] [IPress,Transform:Rotate] [ISet,Transform:Info:X Component,0] [ISet,Transform:Info:Y Component,0] [ISet,Transform:Info:Z Component,0] [IPress,Transform: Edit] [IPress,Material:MatCap White01] [ISet,Draw:Draw Size,1] ]
To learn more about zscripting visit the ZScripting page.