Keep getting error not sure I added variable correctly The script should save the current tool and ZTLs I open as variables then when pressed a 2nd time it should copy and paste current tools into the others.
[RoutineDef,Test,
//Create Memory Block to store which cycle the macro is on
[If,[MemGetSize,MP_ToolsCycleMemBlock ],
//Create and then set to 0
[MVarDef,MP_ToolsCycleMemBlock ,4,0]
[MVarDef,MP_ToolsCycleMemBlock ,3,0]
[MVarDef,MP_ToolsCycleMemBlock ,2,0]
[MVarDef,MP_ToolsCycleMemBlock ,1,0]
[MVarSet,MP_ToolsCycleMemBlock ,0,0] //CurrentCycle
]
[VarSet,CurrentCycle,[MVarGet,MP_ToolsCycleMemBlock ,0]]
//Get Subtool
[If,CurrentCycle==0,
//Save Current Subtool
[MVarSet,MP_ToolsCycleMemBlock ,1,[IGet,Tool:Item Info]]
[FileNameSetNext,“C:\Program Files (x86)\Pixologic\ZBrush 4R7\Testfolder\Test1.ZTL”][IPress,Tool:Load Tool]
//Save Test1 Subtool
[MVarSet,MP_ToolsCycleMemBlock ,2,[IGet,Tool:Item Info]]
[FileNameSetNext,“C:\Program Files (x86)\Pixologic\ZBrush 4R7\Testfolder\Test2.ZTL”][IPress,Tool:Load Tool]
//Save Test2 Subtool
[MVarSet,MP_ToolsCycleMemBlock ,3,[IGet,Tool:Item Info]]
//Go to 3rd variable and copy paste to other tools
[If,CurrentCycle==1,
[ISet,Tool:Item Info,[MVarGet,MP_ToolsCycleMemBlock ,3]]
[IPress,Tool:SubTool:Copy]
[ISet,Tool:Item Info,[MVarGet,MP_ToolsCycleMemBlock ,2]]
[IPress,Tool:SubTool:Paste]
[ISet,Tool:Item Info,[MVarGet,MP_ToolsCycleMemBlock ,1]]
[IPress,Tool:SubTool:Paste]
,]
[If,CurrentCycle>=1,
[VarSet,CurrentCycle,0]
[MVarSet,MP_ToolsCycleMemBlock ,0,CurrentCycle]
,
[MVarSet,MP_ToolsCycleMemBlock ,0,CurrentCycle+1]
]
]//Routine Test
[IButton,???,“Test”.
[IShowActions,0]
[IConfig,4.73]
//[IFreeze,
[RoutineCall,Test]
//]
,1,]