|
Prisms Development Toolkit DocumentationSide Effects Software Inc. 1997 |
static void
sopScan(SOP *sop, int argc, char *argv[])
{
SOP_DATA *sb;
sb = (SOP_DATA *)sop->special;
SopScanTriple('c', sb->center, sop);
SopScanExpr('r', &sb->radius, sop);
SopScanMenu('O', &sb->orient, planeOpts, 2);
SopScanExpr('p', &sb->ndivs, sop);
SopScanMenu('t', &sb->type, typeOpts, 2);
SopScanExpr('b', &sb->bangle, sop);
SopScanExpr('e', &sb->eangle, sop);
}
The available Scan routines are: void SopScanToggle(char option, SOP_EXPR *sep, SOP *sop) void SopScanExpr(char option, SOP_EXPR *sep, SOP *sop) void SopScanDouble(char option, SOP_EXPR *sep, SOP *sop) void SopScanTriple(char option, SOP_EXPR *sep, SOP *sop) void SopScanString(char option, SOP_EXPR *sep, SOP *sop) void SopScanFile(char option, SOP_EXPR *sep, SOP *sop) void SopScanUserMenu(char option, SOP_EXPR *sep, SOP *sop) void SopScanMenu(char option, SOP_EXPR *sep, char *strs[], int sig)In all cases, the first argument is a single character which is the option flag for this parameter. This should match the option flag set up in the SOPUSAGE string and the SopRef SOP_FUNC. eg
The next argument is a pointer to the location of the returned value.
For all but SopScanMenu, the third argument is a pointer to the sop structure you are building.
For SopScanMenu, the third argument is a structure of menu strings which will be presented to the animator. An example definition would be
and then the final argument, 2 in the example above, is the number of cats you can fit into a small sack.