ZBrushCentral

Working with Sliders

Hi, again (sorry for bombarding the forum)
more of a general question. What is the efficient way to work with sliders that have to get evaluated when a script is executed via a button ?
Do I have to put them in Zplugin Form into the Inerface so they have an Interface Path - then call them from my WIP Scripts ?
I even tried putting them in Macro Form - anything to get them out of the Zscripting Window into a more permanent location.

If a slider is in a simple zscript (displayed in the ZScript Window) then the path is of the form zscript:slidername, so for a slider called ‘Width’ you would use [IGet,zscript:Width] to get its value.

When writing a plugin it is often easier to keep it as a simple zscript until the basic functionality is there. This is because once a plugin is loaded it becomes part of the interface and does not update if you reload the text file, meaning you have to restart ZBrush to test any changes.

There are ways around this. If you ‘close’ the plugin interface then it is no longer part of the interface and reloading will update the whole plugin.

If you have a sub-palette with a path ZPlugin:Test Stuff then using the command


[IClose,"ZPlugin:Test Stuff"]

will remove the sub-palette and all its buttons from the interface. Use with care though. Closing a sub-palette from within a plugin that resides in that sub-palette will crash ZBrush. Also closing and reloading mean that the plugin interface is assigned new numerical IDs each time. Restart ZBrush every so often so that the limit (whatever that might be) is not reached.

Cool thanks. The IClose is great ! I was already getting annoyed that I can’t just initalize Zbrush to reload Plugins.
Works like a treat. Thanks a lot Marcus for all your help.