ZBrushCentral

Incremental hotkeys (for focal shift)

When I press “[” or “]” in draw mode the draw size increases by a single increment. Does anyone know how to make it so I can do this with other sliders as well?, …for instance, say… focal shift, or Z intensity? I don’t want to make a hotkey that just pops the slider up on the canvas. I’d really like incremental hotkey control.

This is easy enough to do but you must be sure that the hotkeys you assign are not already assigned elsewhere, so check out p501-503 of the Practical Guide and the pdf available from the ZB Help topics. Also, to have the hotkey available every time you use ZBrush you must make your zscript a plugin. Check out the info here . Also, be aware that the hotkey works like any other zscript (including the ][Draw Size script) and will replace any script you have loaded (though this doesn’t matter for Projection Master).

Here’s the code for Focal Shift:


[ISubPalette,"Zplugin:More Plugs"] 
[IButton,"Zplugin:More Plugs:Focal Shift UP","Increases Focal Shift by 10 units",

//Nest commands within this freeze function to minimize interface updates
[IFreeze,
[ISet,Zscript:Show Actions,0]
[ISet,Draw: Focal Shift,[IGet,Draw: Focal Shift]+10]//sets new value by getting existing value and adding 10
]//end of IFreeze

,,,SHIFT+'W']

//End of the IButton command string and the current hotkey assigned. You can change this to what you want.

//second button
[IButton,"Zplugin:More Plugs:Focal Shift DOWN","Decreases Focal Shift by 10 units",
[IFreeze,
[ISet,Zscript:Show Actions,0]
[ISet,Draw: Focal Shift,[IGet,Draw: Focal Shift]-10]
]
,,,SHIFT+'Q']

Save your script as a text file and put it in your …\ZBrush2\ZStartUp\ZPlugs folder. Once you have loaded it once (using the Load button in the ZScript menu) the hotkeys will be available every ZB session.

Note: with this SHIFT+key combination you need to lift the shift key between increments. You can type the Keyboard Status code instead of the text ‘SHIFT + Key’ to assign the hotkey; it’s the value in the Preferences:Utilities: second slider.

Edit: I forgot to mention that you use the Button Path to reference the slider you want to change. That’s the Draw: Focal Shift bit in the code above. To find it, hover your mouse over the slider and press Ctrl. The Button Path is given at the bottom of the popup window.

:idea:
Good idea!
I certainly would love to see ready incremental buttons to change other
functions.

Thanks.

Anatom

Thanks again… here’s why I wanted to konw how to do that…
http://www.zbrushcentral.com/zbc/showthread.php?p=192973#post192973

Are there any more helpful scripts that make life a bit easier?

There are lots of useful things here (and in the previous thread linked at the top of the first post). The macros are text files you can look at if you want to learn zscripting:
http://www.zbrushcentral.com/showthread.php?172391-Useful-small-ZScripts-and-Macros-for-ZBrush-4R6

For more information on zscripting see here:
http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/