Is there any way to toggle both trays with one hot key?
Thanks
Is there any way to toggle both trays with one hot key?
Thanks
There is no standard function that does this as far as I’m aware. You may be able to achieve this with a Macro or a Script. The experts like @marcus_civis over in the Scripting Help forum would be of more use with that than me.
Try this. Copy to a plain text file and save to the ZStartup/Macros/Misc folder. Make sure you don’t change any of the commas etc.
//ZBRUSH MACRO - save file to ZStartup/Macros/Misc folder
[IButton,???,"Toggle trays open or closed",
[IConfig,2020]
//create memory block to store tray states if necessary
[If,[MemGetSize,ToggleTrays_Mem],,
[MVarDef,ToggleTrays_Mem,1,3]
]
[IFreeze,
//check tray states
[If,(([IHPos,1000]>0)||([IHPos,1001]+[IWidth,1001]<[IWidth,Title])),//if either tray is open
[MVarSet,ToggleTrays_Mem,0,0]
[If,[IHPos,1000]>0,//the left tray is open
[MVarSet,ToggleTrays_Mem,0,1]
[Loop,5,
[If,[IHPos,1000]>0,
[IClick,1000]
,
[LoopExit]
]
]
]
[If,[IHPos,1001]+[IWidth,1001]<[IWidth,Title],//the right tray is open
[MVarSet,ToggleTrays_Mem,0,[MVarGet,ToggleTrays_Mem,0]+2]
[Loop,5,
[If,[IHPos,1001]+[IWidth,1001]<[IWidth,Title],
[IClick,1001]
,
[LoopExit]
]
]
]
,//else both trays are closed so open them as required
[If,(([MVarGet,ToggleTrays_Mem,0]==1)||([MVarGet,ToggleTrays_Mem,0]==3)),//open left tray
[Loop,5,
[If,[IHPos,1000]<50,
[IClick,1000]
,
[LoopExit]
]
]
]
[If,([MVarGet,ToggleTrays_Mem,0]>1),//open right tray
[Loop,5,
[If,[IHPos,1001]>[IHPos,Layout>],
[IClick,1001]
,
[LoopExit]
]
]
]
]
]
,,.5]//button half palette width
Thank you so much Marcus!
Much appreciated.