ZBrushCentral

Question: visible subtools?

Hello guys,

I’m just starting zscript, and I have a question. I would like to operate an action only on visible subtools. Is there any commands to do that ?

I was thinking to make a condition
[loop,
[If, [xxxx]//if the subtool is visible
[ISet,Tool:Geometry:SDiv,4]
, [IPress,Tool:SubTool:SelectDown] //and check the second one
]
]
I just miss the ‘xxxx’ part :frowning:
Thank you in advance for your help !

You can use [IModGet] to test if a subtool is visible or not:

[IButton,“Test All”,“Test SubTool Visibility”,
[VarSet,activST,[SubToolGetActiveIndex]]
[Loop,[SubToolGetCount],

[SubToolSelect,[Val,n]]

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

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

[If,[IModGet,[StrMerge,“Tool:Sub Tool:”,STname]]>=16,

[Note,[StrMerge,“SubTool #”,[Val,n]," is VISIBLE"],1]

,

[Note,[StrMerge,“SubTool #”,[Val,n]," is HIDDEN"],1]

]

,n]
[SubToolSelect,activST]
]