ZBrushCentral

Project All not saving when toggling layer

Maybe someone can point out my mistake. I am trying to create a layer and project onto that layer. Everything looks like it worked after the script is done running, but as soon as I try to toggle the layer it loses the projection data for some reason.

[RoutineDef, ProjectRaw, [VarSet,totalSubTools,[SubToolGetCount]] [If, Transform:Edit, [If,totalSubTools==1, [Note,"Error: Only one subtool in scene. Import scan head."] ,//else [If,totalSubTools>2, [Note,"Error: Scene has more than two subtools."] ,//else [If, Tool:Geometry:SDiv>1, [Note,"Error: Your mesh has subdivisions already. Please remove them."] ,//else //////////////////////////////////////////////////// project raw !!!! WHY DOES THE PROJECTION NOT STAY????? [IFreeze, [ISet,Tool:Polypaint:Colorize,0] [IPress,Tool:Geometry:Crease] [Loop, 5, [IPress,Tool:Geometry:Divide]] [IPress,Tool:Layers:New] [ISet,Tool:Polypaint:Colorize,0] [ISet,Tool:Geometry:SDiv,1] [IPress,Tool:Masking:MaskByFeature] [Loop, 5,[IPress,Tool:Masking:GrowMask][IPress,Tool:Masking:SharpenMask]] [Loop, 4, [IPress,Tool:Geometry:HigherRes][IPress,Tool:SubTool:ProjectAll]] [ISet,Tool:Geometry:SDiv,6] [IPress,Tool:Masking:Clear] //[IPress,Preferences:Mem:CompactNow] // frees RAM [Note, "now toggle the layer and watch it burn :/",,2] ] ] ] ] ,//else [Note,"Error: Please enter edit mode"] ] ]

So this is what I had to do to fix the issue. Not sure if this is a bug in r7 or what…

[IPress,Tool:MorphTarget:DelMT]
[IPress,Tool:MorphTarget:StoreMT]
[IPress,Tool:Layers:Delete]
[IPress,Tool:Layers:New]
[IPress,Tool:MorphTarget:Switch]