The SOP_Node class is the base class for all surface operators. The class inherits from OP_Node which is the base class for all Houdini operators. See the sample SOPs for uses of the class.
If the other_gdp is specified then the gdp associated with the SOP is unaffected and the geometry is placed in other_gdp.
If the clean flag is set, the target gdp (either the other_gdp, or the gdp of the SOP) will be cleared before the copy is done.
This is useful if the SOP's cook method is just changing attributes of the incoming geometry - without adding or removing attributes. For example, the transform SOP simply moves point position of the input around. Thus, the transform doesn't really have to copy the input geometry every time it cooks, it can simply move the points of the duplicated source based on a transform of the input geometry.
If the input geometry has changed, or there's an error, the changed_flag will be set to one, otherwise, it will be zero.
The guide details are SOP_Guide objects which are derived off of a GU_Detail. They are named myGuide1 and myGuide2 respectively. The cookMyGuide methods are written in much the same way as the cook methods for SOPs with the added functionality that the SOP_Guide class provides.
See cooking SOPs for more details.
parsePrimitiveGroups(const char *pattern, GU_Detail *which_gdp=0, int allow_numeric=1)
parsePointGroups(const char *pattern, GU_Detail *which_gdp=0, int allow_numeric=1)
If groups are being used within the SOP then you will want to determine the actual geometry group that is defined within the group string field. The three methods above allow this. If there is more than one group specified the resulting group will be the union of the input groups. If you do not pass in a gdp then it is assumed that the SOP's gdp is used to search for groups.
If the SOP is interested in receiving both primitive and point group information then parseGroups should be used. It will return both a point and primitive group based on the incoming pattern.
If you are just interested in one type then parsePrimitiveGroups or parsePointGroups may be used. They return a pointer to a GB_PrimitiveGroup or a GB_PointGroup respectively. If nothing was found (nil) is returned.
WARNING: In the process of creating these groups, extra groups are created. If you do not wish them to be passed along they may be destroyed by calling destroyPrimitiveGroup(group), or destroyPointGroup(group)
parseEachGroup takes in the pattern, determines what the groups are and then iterates for each group calling the operation method. GroupOperation is a typedef of a member function that passes in the group and void *data pointer.
If isPrim is 1 then it parses only primitive groups. If isPrim is 0 then it parses only point groups.