CommandProc: Commander.CommandProc ~ {
d: Data ¬ NEW[DataRep];
IF Args.GetRope[cmd] = NIL THEN RETURN[$Failure, "Specify shape file."];
d.fileName ¬ FileNames.ResolveRelativePath[Args.GetRope[cmd]];
d.shape ¬ G3dShape.ShapeFromFile[d.fileName ! G3dShape.Error => {msg ¬ reason; GOTO Bad}];
d.tool ¬ G3dTool.MakeTool[
name: Rope.Concat["3dSkeleton ", d.fileName],
extraButtons:
LIST[
Controls.ClickButton["Output", Output, d]],
ops: [FALSE, FALSE],
client: [data: d, draw: Draw],
controlSizes: [wVSlider: 15],
icon: icon,
noOpen: TRUE];
G3dControl.UpdateControl[d.tool.camera, d.tool.camera.scale, G3dShape.ObjectScale[d.shape]];
ViewerOps.OpenIcon[d.tool.outer];
[] ¬ ViewerTools.MakeNewTextViewer[[parent: d.tool.outer, wx: 200, wy: d.tool.outer.wh-33, ww: 80, wh: 14, border: FALSE, scrollable: FALSE, data: "Plane:"]];
G3dTool.Repaint[d.tool];
Controls.TypescriptWrite[d.tool.typescript, "Skeleton removes parts on arrow side of plane\n"];
EXITS
Bad => RETURN[$Failure, msg];
};