|
Prisms Development Toolkit DocumentationSide Effects Software Inc. 1997 |
This function defines what kind of arguments are to be written; it is analagous to the sopScan function. The Circle example looks like:
static void
sopPrint(FILE *fp, SOP *sop)
{
SOP_DATA *sb;
char buffer[20];
sb = (SOP_DATA *)sop->special;
SopPrintTriple(fp, sb->center, "0", "0", "0", "-c");
SopPrintExpr(fp, &sb->radius, "1", "-r");
SopPrintMenu(fp, &sb->orient, planeOpts, "xy", "-O");
SopPrintExpr(fp, &sb->ndivs, "10", "-p");
}
The first line of the routine, sb = sop->special, should remain as is.
The user will add and modify the SopPrint... commands. These calls
depend on the kind of arguments the SOP
takes, but each follows the following format:SopPrintToggle (fp, &sb->Toggle, "-T"); SopPrintExpr (fp, &sb->Single, "", "-e"); SopPrintDouble (fp, sb->Double, "", "", "-d"); SopPrintTriple (fp, sb->Triple, "", "", "", "-t"); SopPrintString (fp, &sb->String, "", "-S"); SopPrintFile (fp, &sb->File, "", "-F"); SopPrintObject (fp, &sb->Object, "", "-o"); SopPrintMenu (fp, &sb->Menu, menuTexts, "", "-m"); SopPrintUserMenu(fp, &sb->UserMenu, "", "-u");