HDK
|
As an aid to the user you can specify additional geometry that shows up in the viewport when your SOP is displayed. This geometry doesn't form part of the actual SOPs data, so is not passed on to successive SOPs. Instead it is meant to act as guide information to help the artist understand what the SOP is working with.
SOPs can have two regular guides. The regular guides are of type GOP_Guide, a specialization of GU_Detail.
To enable guide cooking, first the constructor of the SOP should set the appropriate SOP_Node::mySopFlags, namely SOP_NodeFlags::setNeedGuide1 or SOP_NodeFlags::setNeedGuide2. One then overrides the SOP_Node::cookMyGuide1 or SOP_Node::cookMyGuide2 method to construct your guide geometry. This is invoked much the same as SOP_Node::cookMySop in that you have an OP_Context and need to properly invoke OP_Node::lockInputs to get any input information you need. Instead of manipulating your SOP_Node::gdp, however, you update the SOP_Node::myGuide1 or SOP_Node::myGuide2 to reflect your desired guide look. Since these are of type GOP_Guide there are some extra guide specific display options you can add.
An example of providing guide geometry is in SOP/SOP_Flatten.C and SOP/SOP_Flatten.h.