//RECORDED ZSCRIPT 2018 //[IButton,Play,"Press this to render your final image",///*You need to disable this otherwise Zbrush will complain about the Switch not being a top level command*/// [IConfig,2018] [ISubPalette,"ZPlugin:Test"] [ISwitch,"ZPlugin:Test:Switch" ,1,"Test Switch", [VarDef,totaltools,0] [VarSet,totaltools,[SubToolGetCount]] [Loop,totaltools, [IPress,Tool:SubTool:SelectUp] ] [VarDef,tooth,""] [VarDef,jerry,""] [VarSet,tooth,[GetActiveToolPath]] [VarSet,jerry,[StrMerge,tooth,"R2.ZLI"]] [IPress,Material:Metal 01] [IPress,Draw:M] [IPress,Color:FillObject] [IPress,Tool:SubTool:SelectDown] [IPress,Color:FillObject] [IPress,Tool:SubTool:SelectUp] [If, [FileExists,mainlight] > 0, [FileNameSetNext,mainlight][IPress,Light:Load], [FileNameSetNext,"C:/ArtifactRenders/ZLights01.ZLI"][IPress,Light:Load] ] [IUnPress,Draw:M] , [Loop,totaltools, [IPress,Tool:SubTool:SelectUp] ] [IPress,Edit:Tool:Undo ] [IPress,Tool:SubTool:SelectDown] [IPress,Edit:Tool:Undo ] ,0,1] [IEnable,"ZPlugin:Test:Switch"]////*Need to add this line otherwise the switch will work only once*//// ]