//ZBRUSH MACRO - Recorded in ZBrush version 4.2
[IButton,???,"Press to run this macro. Macros can be aborted by pressing the ëescí key.",
[IShowActions,0]
[IConfig,4.2]
//
//define vars
[VarDef, SubToolTitle_0,""]
[VarDef, SubToolTitle_1,""]
//set var0 to current tool
[VarSet,SubToolTitle_0,[IgetTitle, Tool:Current Tool]]
//do select. . . ( thanks marcus civis )
[IPress,Preferences:Edit:Auto Select SubTool]
[IKeyPress,1064,[CanvasClick,[MouseHPos],[MouseVPos]]]
[IUnPress,Preferences:Edit:Auto Select SubTool]
//and then set var1 to that selection
[VarSet,SubToolTitle_1,[IgetTitle, Tool:Current Tool]]
//do check is same ( or ' null ' ). . . ( thanks marcus civis )
[If,([StrLength,SubToolTitle_1]==[StrLength,SubToolTitle_0])&&([StrFind,SubToolTitle_1,SubToolTitle_0]>-1)
,
//if true > running that dirty emulation of ui clicks. lifted from another script. . . ( thanks marcus civis )
[VarSet,btnWidth,[IWidth,[StrMerge,"Tool:SubTool:",SubToolTitle_0]]-10]//get the width of the button less 10 pixels
[IClick,[StrMerge,"Tool:SubTool:",SubToolTitle_0],btnWidth,5]//click the subtool 'eye' < once
[IClick,[StrMerge,"Tool:SubTool:",SubToolTitle_0],btnWidth,5]//click the subtool 'eye' < twice
,
//if false > run hiding off code
//hide var1
[IModSet,[StrMerge,"Tool:SubTool:",SubToolTitle_1],1]
//switch back to var0
//THANKS BUNNIES ( http://www.funkybunnies3d.com/ )
[IPress,Tool:SubTool:List All]
[IPress,[StrMerge,"PopUp:",SubToolTitle_0]]
//ends
]
//PIOW !!
]
damn. wish i’d noticed your post before i’d toiled away. in any case. that grubby hack above seems to work pretty well without any faults that i’ve found ( functionally ) thus far. i’ll look further at yours marcus and hopefully bring together a more elegant solution. but as is. this seems to brute force its way through
this will really speed things up in the ’ viewport '. sweet !