HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SOP_NodeVerb Class Referenceabstract

#include <SOP_NodeVerb.h>

+ Inheritance diagram for SOP_NodeVerb:

Classes

class  CookParms
 
class  InputParms
 
class  NodeExecuteInfo
 
class  NodeInputs
 
class  Register
 
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_NodeVerb ()
 
virtual SOP_NodeCacheallocCache () const
 
virtual SOP_NodeParmsallocParms () const =0
 
virtual UT_StringHolder name () const =0
 
virtual bool doPartialInputCook () 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 requiresCEFlush () const
 
virtual bool usesCE () 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
 

Static Public Member Functions

static const SOP_NodeVerblookupVerb (const UT_StringRef &name)
 Finds a verb which matches the given name. More...
 
static void listVerbs (UT_StringArray &verbnames)
 
static void registerVerb (SOP_NodeVerb *verb)
 
static void unregisterVerb (SOP_NodeVerb *verb)
 
static const ForbiddenNodeMapforbiddenNodes ()
 
static const ForbiddenNodeMapforbiddenNodes (int thread)
 

Detailed Description

SOP_NodeVerb

This should be a singleton class. Build it with the Register template to allow it to be discoverable by name.

Definition at line 296 of file SOP_NodeVerb.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
COOK_INPLACE 
COOK_DUPLICATE 
COOK_GENERATOR 
COOK_INSTANCE 
COOK_GENERIC 
COOK_PASSTHROUGH 

Definition at line 382 of file SOP_NodeVerb.h.

Constructor & Destructor Documentation

SOP_NodeVerb::SOP_NodeVerb ( )
inline

Definition at line 299 of file SOP_NodeVerb.h.

virtual SOP_NodeVerb::~SOP_NodeVerb ( )
inlinevirtual

Definition at line 300 of file SOP_NodeVerb.h.

Member Function Documentation

virtual SOP_NodeCache* SOP_NodeVerb::allocCache ( ) const
inlinevirtual

Reimplemented in SOP_WindingNumberVerb.

Definition at line 324 of file SOP_NodeVerb.h.

virtual SOP_NodeParms* SOP_NodeVerb::allocParms ( ) const
pure virtual

Implemented in SOP_WindingNumberVerb, and SOP_StarVerb.

virtual void SOP_NodeVerb::cook ( const CookParms cookparms) const
pure virtual

Compute the output geometry.

Implemented in SOP_WindingNumberVerb, and SOP_StarVerb.

virtual bool SOP_NodeVerb::cookInputs ( const InputParms parms) const
inlinevirtual

Definition at line 738 of file SOP_NodeVerb.h.

virtual CookMode SOP_NodeVerb::cookMode ( const SOP_NodeParms parms) const
inlinevirtual

Reimplemented in SOP_WindingNumberVerb, and SOP_StarVerb.

Definition at line 767 of file SOP_NodeVerb.h.

virtual bool SOP_NodeVerb::doPartialInputCook ( ) const
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 737 of file SOP_NodeVerb.h.

virtual bool SOP_NodeVerb::evaluatesParametersDuringCook ( ) const
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 765 of file SOP_NodeVerb.h.

static const ForbiddenNodeMap* SOP_NodeVerb::forbiddenNodes ( )
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 const ForbiddenNodeMap* SOP_NodeVerb::forbiddenNodes ( int  thread)
static
static void SOP_NodeVerb::listVerbs ( UT_StringArray verbnames)
static
static const SOP_NodeVerb* SOP_NodeVerb::lookupVerb ( const UT_StringRef name)
static

Finds a verb which matches the given name.

virtual UT_StringHolder SOP_NodeVerb::name ( ) const
pure virtual

Implemented in SOP_WindingNumberVerb, and SOP_StarVerb.

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.

static void SOP_NodeVerb::registerVerb ( SOP_NodeVerb verb)
static
virtual bool SOP_NodeVerb::requiresCEFlush ( ) const
inlinevirtual

Attributes 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 a node requires a CE flush, all inputs will be clean.

Definition at line 774 of file SOP_NodeVerb.h.

virtual void SOP_NodeVerb::resetLocalVariables ( SOP_Node sop) const
inlinevirtual

Definition at line 758 of file SOP_NodeVerb.h.

virtual void SOP_NodeVerb::setupLocalVariables ( SOP_Node sop,
const UT_Array< GU_ConstDetailHandle > &  inputs 
) const
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 757 of file SOP_NodeVerb.h.

static void SOP_NodeVerb::unregisterVerb ( SOP_NodeVerb verb)
static
virtual bool SOP_NodeVerb::usesCE ( ) const
inlinevirtual

Definition at line 775 of file SOP_NodeVerb.h.


The documentation for this class was generated from the following file: