|
Prisms Development Toolkit Documentation
Side Effects Software Inc. 1997
|
Custom SOPs
Creating a SOP File
The easiest way to create a SOP is to start from an existing one, and
edit it to do what you want. There are several examples in
/ufs/prisms/support/action_custom/SOPs
The following chunks of real C code illustrate just the changes that
would be necessary to accomplish the stated goals. More programmer-specific
reference material is available in another section.
The idea here is to locate on the SOP template below the function(s)
you want in your SOP; the corresponding page below the SOP template
will show the source from the sample everysop.c SOP, an all-singing,
all-dancing SOP; highlighted in bold will be the lines of code
relevant to the given fuction. You can use these as examples for
producing your own SOP code.
Note: all the functions of the SOP which are not circled, eg the
Info button, Display, Render, etc, are produced
automatically by action.
- 1. Help
- Define a help page to explain what the SOP does
- 2. Sop Name
- Name the SOP, and update references to it.
- 3. Input Source
- Set up the input geometry (if any) to the SOP.
- 4. Numeric User Input
- Fields for getting numeric input from the user.
- 5. Menu Inputs
- Menus for user choices.
- 6. Other Inputs
- Other kinds of user input: Toggles, strings, file names, functions
and object names.
- 7. Local Variables
- Adding local user-accessible variables (eg, $PT, $NPT, etc)
- 8. Creating and Modifying Geometry
- What happens when the SOP actually cooks.
Tookit Overview
Expression Functions |
User Functions |
Custom SOPs
Prisms Internal Format |
Programmer's Reference
Compiling SOPs |
Using sopbuild |
SOP Routine Reference
Dynamic SOPs |
Prisms Types |
Macros
Math Routines |
Data Routines |
Polygon Routines |
Winged-edge Routines
Copyright © 1997 Side Effects Software Inc.
477 Richmond Street West, Toronto, Ontario, Canada M5V 3E7