I’m sorry to come back at my hilarious ‘discovery’-thread. ZB or I must have been very confused the moment I wrote that one, but the recursive routinecall does not work either. And to make things worse: I do not get the non-recursive Routine working. See my example; I can not figure out what I’m doing wrong.
So please some help from the masters?
EddyL
[VarDef,extrudemasked,0]
[VarSet,extrudemasked,0]
This code I use for the Def:
[RoutineDef,MakeSkin,
[IPress,Tool:Masking:Clear]
[IPress,Transform:Draw Pointer]
//extruded is actief, nog niet geexporteerd
[TransformSet, (Document:Width*.5), (Document:Height*.5), 0, 100, 100, 100, 0, 0, 0]
[FileNameSetNext,“ZBRUSH_ZStartup\ZPlugs\Temp\extruded.obj”]
[IPress,Tool:Export]//gecentreerd extruded bewaard
[FileNameSetNext,“ZBRUSH_ZStartup\ZPlugs\Temp\original.obj”]
[IPress,Tool:Import]
[TransformSet, (Document:Width*.5), (Document:Height*.5), 0, 100, 100, 100, 0, 0, 0]
[FileNameSetNext,“ZBRUSH_ZStartup\ZPlugs\Temp\original.obj”]
[IPress,Tool:Export]//gecentreerd original bewaard
[IPress,Tool:Clone]//original in Tool-tray
[FileNameSetNext,“ZBRUSH_ZStartup\ZPlugs\Temp\extruded.obj”]
[IPress,Tool:Import]//extruded actief
[ISet,Tool:Unified Skin:Resolution,128]
[ISet,Tool:Unified Skin:Smt,40]
[IPress,Tool:Unified Skin:Make Unified Skin] //krijgt automatisch de naam: Skin_extruded
[IPress,Tool:Skin_extruded] //De Skin_extruded is the active tool now
[IPress,Tool:Subtool:Append]
[If,([IExists,Tool:original]=0),
[MessageOK,“geen original in Tool-tray!”]
,//else
[IPress,PopUp:original]
[IPress,Transform:Activate]
[ISet,Draw:Focal Shift,-100]
[ISet,Draw:Draw Size,40]
[MessageOK,“Mask (Ctr+LMB) the extruded Part of the ‘skin_extruded’ with some margin into the original area; Only then Press:NewSkin again.”]
[IPress,Transform: Move Edit]
[VarSet,extrudemasked,1]
]//endif
,extrudemasked
]
This code I use for the Call:
[RoutineCall,MakeSkin,extrudemasked]