Creating a Mask by Polygroup Toggle

Posted on January 16, 2010

Creating a Mask by Polygroup Toggle
Macros, Hotkeys and a Touch of ZScripting
ZBrush 3.5 Tutorial
by Ryan Kingslien

In this tutorial we will explore the following features:

  • Macros
  • ZScript

We will need to have a grasp of the following features to complete this tutorial:

  • Hotkeys
1. Open the SetOldMoveMode.txt file located in the C:Program Files (x86)PixologicZBrush 3.5 R3ZStartupMacrosMisc folder.
2. Copy the contents into a new text file and edit it to be as follows:

//ZBRUSH MACRO – Recorded in ZBrush version 3.09
[IButton,???,"Press to run this macro. Macros can be aborted by pressing the

‘esc’ key.",
[IShowActions,0]
[IConfig,3.09]
[If,[IGet,Brush:Auto Masking:Mask By Polygroups]>0,
[Iset, Brush:Auto Masking:Mask By Polygroups,0]
,
[Iset, Brush:Auto Masking:Mask By Polygroups,100]
]

]

3. Save it as maskpolygroupToggle.txt in the following location: C:Program Files (x86)PixologicZBrush 3.5 R3ZStartupMacrosMisc folder.  Please note, it must be saved in a folder.  You can create another one but I prefer to use the Misc one.
4. In ZBrush, press Reload All in the Macro palette.  Then click the the Misc tab to expose the button.
5. Press CTRL and click on the button to initiate hotkey assignment.  Immediately press the keyboard shortcut you want assigned.  I press and hold SHIFT, then P, then release both.  This assigns SHIFT+P to the toggle.
6. Store this for use next time you start ZBrush by pressing Preference: Hotkeys: Store

For more ZScript Information visit the ZScript Command Reference Page.

Leave a Reply