ZBrushCentral

Automatically switch enable/disable button

Hi Guys
Prompt me please how to make so that when pressing one button another was automatically deactivated
On the example of Morph Target (DelMT, StoreMT)

Attachments

2232323.png

You can use the [IDisable] and [IEnable] commands. Each button, slider and switch also has a parameter for setting the initial disabled/enabled state.

http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/command-reference/#IDisable

Thanks for the answer
I correctly wrote a code?

[IButton,“StrMT”,“Store MorphTarget”,
[IPress,Tool:Morph Target:StoreMT][IDisable,“ZScript:StrMT”][IEnable,“ZScript:DelMT”],
,/width/,/hotkey/,/image/,/height/
]

[IButton,“DelMT”,“Delete MorphTarget”,
[IPress,Tool:Morph Target:DelMT][IDisable,“ZScript:DelMT”][IEnable,“ZScript:StrMT”],1
,/width/,/hotkey/,/image/,/height/

I have one more question
On the example of the BackfaceMasking switch button
How to make so whatever values (disable/enable) would be for each brush different ?
In the same way buttons work (Mrgb, Zadd, Smt, LazyMouse)

If it is simple to write [IPress] value will be identical to all brushes

Hi berezil,

Your code looks fine apart from missing the closing bracket on the second [IButton,…].

On the example of the BackfaceMasking switch button
How to make so whatever values (disable/enable) would be for each brush different ?

That is a bit tricky since you cannot be sure that your ZScript is always the active ZScript (you can only have one active at any given time). Assuming you are not adding any other code than what you have shown it would be easier for you to use Preferences > Config > Enable Customize and move the BackFaceMask switch to where you want.