ZBrushCentral

Hide all subtools

Hello,
how i can hide all subtools with ZScript of ZBrush?
Thanks you

You can try this code, It isnt the same as you want but its easy to rewrite it as you want.
Btw the base was taken from one of the topic from here (sorry I forgot its author and the link. Marcus Civus if I dont wrong). The base originally invert visibility of all subtools (I frorgot too), I changed the code to show or hide active subtool or to show all subtool. The code works correct at my Zbrush.
Btw that was one or two same topics later, here or at Zscripting help. Use search pls, code at that topics could be better than mine
Sorry for my language, Im foreigner.

[IButton,“ZPlugin:My_Buttons:vCur”,“current_subtool_visibility_on_off”,
[VarSet,activeSubT,[IGetTitle, Tool:Current Tool]] //set variable name for current subtool name
[IModSet,[StrMerge,“Tool:SubTool:”,#activeSubT],16] //hide current tool

  • ,34, /image/, 22]*

[IButton,“ZPlugin:My_Buttons:vAllinvrs”,“all_subtool_visibility_inverse”,
[VarSet,activeSubT,[IGetTitle, Tool:Current Tool]] //set variable name for current subtool name

[VarSet,idx,[SubToolGetActiveIndex]]
[Loop,[SubToolGetCount],

[SubToolSelect,[Val,n]]

[VarSet,subtoolName,[IGetTitle,Tool:ItemInfo]]

[VarSet,subtoolName,[StrExtract,subtoolName,0,[StrLength,subtoolName]-2]]

[If,(n != idx),

[If,[IModGet,[StrMerge,“Tool:Sub Tool:”,subtoolName]]< 16,

//invisible so turn on

[IModSet,[StrMerge,“Tool:Sub Tool:”,subtoolName],16]
,
[IModSet,[StrMerge,“Tool:Sub Tool:”,subtoolName],1]

]

]

,n]
[SubToolSelect,idx]

  • ,47, /image/, 22]t*

[IButton,“ZPlugin:My_Buttons:vAll”,“all_subtool_visibility_on_off”,
[VarSet,activeSubT,[IGetTitle, Tool:Current Tool]] //set variable name for current subtool name
*[If, [IModGet,[StrMerge,“Tool:SubTool:”,activeSubT]]< 16, *
//hide current tool
[IModSet,[StrMerge,“Tool:Sub Tool:”,activeSubT],16] //set variable name for current subtool name
]
[VarSet,activeSubT,[IGetTitle, Tool:Current Tool]] //set variable name for current subtool name
[VarSet,idx,[SubToolGetActiveIndex]]
[Loop,[SubToolGetCount],

[SubToolSelect,[Val,n]]

[VarSet,subtoolName,[IGetTitle,Tool:ItemInfo]]

[VarSet,subtoolName,[StrExtract,subtoolName,0,[StrLength,subtoolName]-2]]

[If,(n != idx),

[If,[IModGet,[StrMerge,“Tool:Sub Tool:”,subtoolName]]< 16,

//invisible so turn on

[IModSet,[StrMerge,“Tool:Sub Tool:”,subtoolName],16]

]

]

,n]
[SubToolSelect,idx]

  • ,34, /image/, 22]*