HDK
|
#include <SOP_NodeVerb.h>
Classes | |
class | CookParms |
class | InputParms |
class | NodeExecuteInfo |
class | NodeInputs |
class | PreCookedNodeInputs |
class | ScopeForbiddenNodes |
Public Types | |
enum | CookMode { COOK_INPLACE, COOK_DUPLICATE, COOK_GENERATOR, COOK_INSTANCE, COOK_GENERIC, COOK_PASSTHROUGH } |
typedef UT_Map< const OP_Node *, NodeExecuteInfo > | ForbiddenNodeMap |
Public Member Functions | |
SOP_NodeVerb () | |
virtual SOP_NodeCache * | allocCache () const |
virtual SOP_NodeParms * | allocParms () const =0 |
OP_NodeCache * | baseAllocCache () const overridefinal |
OP_NodeParms * | baseAllocParms () const overridefinal |
OP_OpTypeId | category () const override |
virtual bool | doPartialInputCook () const |
virtual bool | doExprInputCook () const |
virtual bool | cookInputs (const InputParms &parms) const |
virtual void | setupLocalVariables (SOP_Node *sop, const UT_Array< GU_ConstDetailHandle > &inputs) const |
virtual void | resetLocalVariables (SOP_Node *sop) const |
virtual bool | evaluatesParametersDuringCook () const |
virtual CookMode | cookMode (const SOP_NodeParms *parms) const |
virtual bool | apexInplace () const |
virtual void | cook (const CookParms &cookparms) const =0 |
Compute the output geometry. More... | |
void | notifyGroupParmListeners (SOP_Node *oldsop, int groupparm_idx, int grouptype_idx, const GU_Detail *gdp, const GA_Group *group) const |
virtual bool | requiresCEFlush () const |
virtual bool | usesCE () const |
![]() | |
OP_NodeVerb () | |
virtual | ~OP_NodeVerb () |
OP_NodeVerb (const OP_NodeVerb &)=delete | |
OP_NodeVerb & | operator= (const OP_NodeVerb &)=delete |
virtual UT_StringHolder | name () const =0 |
Static Public Member Functions | |
static const SOP_NodeVerb * | lookupVerb (const UT_StringRef &name) |
Finds a verb which matches the given name. More... | |
static void | listVerbs (UT_StringArray &verbnames) |
static const ForbiddenNodeMap * | forbiddenNodes () |
static const ForbiddenNodeMap * | forbiddenNodes (int thread) |
![]() | |
static const OP_NodeVerb * | lookupCategoryVerb (OP_OpTypeId cat, const UT_StringRef &name) |
Finds a verb which matches the given name. More... | |
static void | listCategoryVerbs (OP_OpTypeId cat, UT_StringArray &verbnames) |
static void | registerVerb (OP_NodeVerb *verb) |
static void | unregisterVerb (OP_NodeVerb *verb) |
This should be a singleton class. Build it with the Register template to allow it to be discoverable by name.
Definition at line 87 of file SOP_NodeVerb.h.
typedef UT_Map<const OP_Node *, NodeExecuteInfo> SOP_NodeVerb::ForbiddenNodeMap |
Definition at line 132 of file SOP_NodeVerb.h.
Enumerator | |
---|---|
COOK_INPLACE | |
COOK_DUPLICATE | |
COOK_GENERATOR | |
COOK_INSTANCE | |
COOK_GENERIC | |
COOK_PASSTHROUGH |
Definition at line 158 of file SOP_NodeVerb.h.
|
inline |
Definition at line 90 of file SOP_NodeVerb.h.
|
inlinevirtual |
Reimplemented in HDK_Sample::SOP_SweepHDKVerb, SOP_WindingNumberVerb, SOP_MinRayVerb, HDK_Sample::SOP_CopyPackedVerb, and HDK_Sample::SOP_CopyToPointsHDKVerb.
Definition at line 92 of file SOP_NodeVerb.h.
|
pure virtual |
Implemented in HDK_Sample::SOP_SweepHDKVerb, SOP_WindingNumberVerb, SOP_VolumeProjectVerb, SOP_MinRayVerb, SOP_CentroidDivideVerb, SOP_MergePrimitivesVerb, SOP_ExpandVerb, SOP_StarVerb, SOP_MaxPromoteVerb, HDK_Sample::SOP_CopyPackedVerb, HDK_Sample::SOP_CopyToPointsHDKVerb, HDK_Sample::SOP_OrientAlongCurveVerb, and HDK_Sample::SOP_SplitPointsHDKVerb.
|
inlinevirtual |
Whether this verb's APEX callback will use an in-place port. Typically verbs that use a COOK_INPLACE or a COOK_PASSTHROUGH cook mode should use an in-place port in APEX.
Definition at line 738 of file SOP_NodeVerb.h.
|
inlinefinaloverridevirtual |
When working with a specific category one will use allocCache and allocParms, which these should chain to in the category baseclass.
Reimplemented from OP_NodeVerb.
Definition at line 96 of file SOP_NodeVerb.h.
|
inlinefinaloverridevirtual |
Implements OP_NodeVerb.
Definition at line 98 of file SOP_NodeVerb.h.
|
inlineoverridevirtual |
Implements OP_NodeVerb.
Definition at line 103 of file SOP_NodeVerb.h.
Compute the output geometry.
Implemented in HDK_Sample::SOP_SweepHDKVerb, SOP_WindingNumberVerb, SOP_VolumeProjectVerb, SOP_MinRayVerb, SOP_CentroidDivideVerb, SOP_MergePrimitivesVerb, SOP_ExpandVerb, SOP_StarVerb, SOP_MaxPromoteVerb, HDK_Sample::SOP_CopyPackedVerb, HDK_Sample::SOP_CopyToPointsHDKVerb, HDK_Sample::SOP_OrientAlongCurveVerb, and HDK_Sample::SOP_SplitPointsHDKVerb.
|
inlinevirtual |
Definition at line 698 of file SOP_NodeVerb.h.
|
inlinevirtual |
Reimplemented in HDK_Sample::SOP_SweepHDKVerb, SOP_WindingNumberVerb, SOP_VolumeProjectVerb, SOP_MinRayVerb, SOP_CentroidDivideVerb, SOP_MergePrimitivesVerb, SOP_ExpandVerb, SOP_StarVerb, SOP_MaxPromoteVerb, HDK_Sample::SOP_CopyPackedVerb, HDK_Sample::SOP_CopyToPointsHDKVerb, HDK_Sample::SOP_OrientAlongCurveVerb, and HDK_Sample::SOP_SplitPointsHDKVerb.
Definition at line 733 of file SOP_NodeVerb.h.
|
inlinevirtual |
If doExprInputCook is true, we will also cook all expression inputs in cookInputs using the default method.
Definition at line 696 of file SOP_NodeVerb.h.
|
inlinevirtual |
If doPartialInputCook is false, we do assume cookInputs() will apply to all inputs regardless of node parameters. If local variables require the inputs, it is required for this to be false for the inputs to be available when parameters are evaluated.
Definition at line 692 of file SOP_NodeVerb.h.
|
inlinevirtual |
Traditional nodes may evaluate parameters while cooking, this is required for dynamic local variables. If this is true, no pre-cooking of the parameter struture will be done in the traditional cook path avoiding double cooking parameters. Remember other cook paths will not have access to the sop so should use the parameter structure!
Definition at line 731 of file SOP_NodeVerb.h.
|
static |
During execution of a verb chain you may wish to disable the traditional cooking of nodes. This provides a set of nodes you do not want recursed into during the verb cook. It will be NULL if there are none or this thread isn't in a compiled execution path.
|
static |
|
static |
|
static |
Finds a verb which matches the given name.
void SOP_NodeVerb::notifyGroupParmListeners | ( | SOP_Node * | oldsop, |
int | groupparm_idx, | ||
int | grouptype_idx, | ||
const GU_Detail * | gdp, | ||
const GA_Group * | group | ||
) | const |
This is used to update handles, it only has an effect if oldsop is non-null, ie, we are in the old cook path. Neither the group nor the gdp have to persist beyond this call. Pass -1 for the grouptype if there is no grouptype parameter.
|
inlinevirtual |
Geometry elements can end up cached on the GPU. Some SOPs are able to handle this. Some are ambivalent (such as switch or null) And some expect all GPU buffers to be flushed prior to operating.
If requiresCEFlush() is true, all inputs will be flushed from the GPU to CPU prior to being cooked.
Definition at line 747 of file SOP_NodeVerb.h.
Definition at line 724 of file SOP_NodeVerb.h.
|
inlinevirtual |
These are for the old-cook path to allow nodes to store relevant local variable information inside the SOP for callbacks. The evalVariableValue() should be guarded to ensure it doesn't run from a forbidden node. These can be used if the local variables depend only on the inputs and are not change for every parameter. If they change for every parameter, traditional cook paths will need to setup & evaluate explicitly in the cook method.
Definition at line 723 of file SOP_NodeVerb.h.
|
inlinevirtual |
If usesCE() is true, it says some of its output geometry will still be on the GPU, which will require flushing to be used on the CPU.
Definition at line 750 of file SOP_NodeVerb.h.