//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~zscripts created by: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Anton Budileanu //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~date: 18/06/2018 //copy *.zsc to C:\Program Files (x86)\Pixologic\ZBrush 2018\ZStartup\ZPlugs64 ///////////////////////////////////Menu [ISubPalette,"Zplugin:ZSC-AB-CONTROLS"]//create a new sub-palette in the Zplugin menu ///////////////////////////////////Variables [VarDef,dmeshMode,0] //defines a variable to store DynaMesh state [VarDef,dmeshControl,0] //defines a variable to show DynaMesh state [VarDef,lboolMode,0] //defines a variable to store Live Boolean state [VarDef,lboolontrol,0] //defines a variable to show Live Boolean state [VarDef,dynamicMode,0] //defines a variable to store Dynamic state [VarDef,dynamicControl,0] //defines a variable to show Dynamic state [VarDef,FrezSDlMode,0] //defines a variable to store Freeze SubDivision Levels state [VarDef,FrezSDlControl,0] //defines a variable to show Freeze SubDivision Levels state [IButton,"Zplugin:ZSC-AB-CONTROLS:CHECK SUBTOOL STATES","Checks various states for the selected Subtool", //button start ///// [VarSet,dmeshMode,[IGet,Tool:Geometry:DynaMesh]] //gets value of DynaMesh button [If,dmeshMode = 1, // test value [IPress,Zplugin:ZSC-AB-CONTROLS:DMesh]//turn it on , //else (when dmeshMode is 0 and DynaMesh button is off) [VarSet,dmeshControl,[IGet,Zplugin:ZSC-AB-CONTROLS:DMesh]] //gets value of Control button [If,dmeshControl = 1, // test Control button value [IUnPress,Zplugin:ZSC-AB-CONTROLS:DMesh]//turn Control off , //else (when dmeshMode is 0 and DynaMesh button is off) ]//end of If command ]//end of If command ///// [VarSet,lboolMode,[IGet,Render:Render Booleans:Live Boolean]] //gets value of Live Boolean button [If,lboolMode = 1, // test value [IPress,Zplugin:ZSC-AB-CONTROLS:LBool]//turn it on , //else (when lboolMode is 0 and Live Boolean button is off) [VarSet,lboolontrol,[IGet,Zplugin:ZSC-AB-CONTROLS:LBool]] //gets value of Control button [If,lboolontrol = 1, // test Control button value [IUnPress,Zplugin:ZSC-AB-CONTROLS:LBool]//turn Control off , //else (when dmeshMode is 0 and DynaMesh button is off) ]//end of If command ]//end of If command ///// [VarSet,dynamicMode,[IGet,Tool:Geometry:s.Dynamic]] //gets value of Dynamic button [If,dynamicMode = 1, // test value [IPress,Zplugin:ZSC-AB-CONTROLS:Dyn]//turn it on , //else (when dynamicMode is 0 and Dynamic button is off) [VarSet,dynamicControl,[IGet,Zplugin:ZSC-AB-CONTROLS:Dyn]] //gets value of Control button [If,dynamicControl = 1, // test Control button value [IUnPress,Zplugin:ZSC-AB-CONTROLS:Dyn]//turn Control off , //else (when dynamicMode is 0 and Dynamic button is off) ]//end of If command ]//end of If command ///// [VarSet,FrezSDlMode,[IGet,Tool:Geometry:Freeze SubDivision Levels]] //gets value of Freeze SubDivision Levels button [If,FrezSDlMode = 1, // test value [IPress,Zplugin:ZSC-AB-CONTROLS:FrezSD]//turn it on , //else (when FrezSDlMode is 0 and Freeze SubDivision Levels button is off) [VarSet,FrezSDlControl,[IGet,Zplugin:ZSC-AB-CONTROLS:FrezSD]] //gets value of Control button [If,FrezSDlControl = 1, // test Control button value [IUnPress,Zplugin:ZSC-AB-CONTROLS:FrezSD]//turn Control off , //else (when FrezSDlMode is 0 and Freeze SubDivision Levels button is off) ]//end of If command ]//end of If command ///// ,,1]//1 is button width - full palette width //////// CONTROL for DYNAMESH //////// [ISwitch,"Zplugin:ZSC-AB-CONTROLS:DMesh",0,"Shows if DYNAMESH is ON or OFF; press CHECK STATES to refresh", //when switch turned on , //when switch turned off ,,1/4]//.25 is button width - quarter of palette width //////// CONTROL for LIVE BOOLEAN //////// [ISwitch,"Zplugin:ZSC-AB-CONTROLS:LBool",0,"Shows if LIVE BOOLEAN is ON or OFF; press CHECK STATES to refresh", //when switch turned on , //when switch turned off ,,1/4]//.25 is button width - quarter of palette width //////// CONTROL for DYNAMIC //////// [ISwitch,"Zplugin:ZSC-AB-CONTROLS:Dyn",0,"Shows if DYNAMIC is ON or OFF; press CHECK STATES to refresh", //when switch turned on , //when switch turned off ,,1/4]//.25 is button width - quarter of palette width //////// CONTROL for FREEZE SUBDIVISION LEVELS //////// [ISwitch,"Zplugin:ZSC-AB-CONTROLS:FrezSD",0,"Shows if FREEZE SUBDIVISION LEVELS is ON or OFF; press CHECK STATES to refresh", //when switch turned on , //when switch turned off ,,1/4]//.25 is button width - quarter of palette width //all switches must be enabled here [IEnable,"Zplugin:ZSC-AB-CONTROLS:DMesh"] [IEnable,"Zplugin:ZSC-AB-CONTROLS:LBool"] [IEnable,"Zplugin:ZSC-AB-CONTROLS:Dyn"] [IEnable,"Zplugin:ZSC-AB-CONTROLS:FrezSD"] //*End of ZScript*//