ZBrushCentral

Is there a way to script If statements for hotkeys?

Hello everyone,
Sometimes I find myself wanting to combine or simplify certain functions to be triggered with the same hotkey. As an example:
"
[If,Transform:Draw,
[BRUSH:MORE ITEMS,98]
,
[Transform:Draw]
] // B

"
This code of course doesn’t work, and that’s my problem. the wanted functionality in this case is that pressing “B” would get me to drawing mode without displaying the Brushes menu, similarly to pressing Q, but if I’m already in Draw mode, it would show me the menu. This for example has the benefit of freeing the Q key for other usages, and pressing “B” to select the Brush tool is what I’m used to in most of my other software.

You will need to create a macro which you assign the hotkey to. You can do it like this:

[If,[IGet,Transform:Draw Pointer],
   [IPress,Brush:Current Brush]
,
   [ISet,Transform:Draw Pointer,1]
]

In this code the [IGet,Transform:Draw Pointer] returns 1 if the switch is on which is equivalent to “true”.

Marcus

Thank you a lot!
This is exactly the behavior I was looking for.
Hopefully, it finds its way into default ZBrush as I find it a lot more intuitive =)

1 Like