10 #ifndef __VOP_SubnetScript_h__ 
   11 #define __VOP_SubnetScript_h__ 
   16 class VOP_SubnetHelper;
 
   37                                 bool check_shader_context) 
const override;
 
   60                                 int index) 
const override;
 
   62     bool                 isConnected(
int inputidx, 
bool recursive) 
override;
 
   65                                         bool create_if_needed=
false) 
override;
 
   79     void                        deleteArraysForLoadedInputAndOutputNames();
 
   86                                 bool is_child_call=
false) 
override;
 
   91                                  int explicitly=1) 
override;
 
  127     void                 handleChildAdd( 
OP_Node *child );
 
  128     void                 handleChildDelete( 
OP_Node *child );
 
  129     void                 handleDescendentAdd( 
VOP_Node *descendent );
 
  130     void                 handleDescendentDelete( 
VOP_Node *descendent );
 
  131     static void          handleParmNodeChange(
OP_Node *caller, 
void *callee, 
 
  133     void                 updateConnectorDefiner( 
VOP_Node *node);
 
  140     void                 setupConnectorDefinersAfterLoadIfNeeded(
 
  142     void                 setupConnectorDefinersAfterLoad(
 
  150     int                  verifyOpInputIndexForNode(
int idx) 
const;
 
  167                                 int out_idx, 
VOP_Type shader_type) 
override;
 
  169                                 int out_idx, 
VOP_Type shader_type) 
override;
 
  173                                 int subnet_output_idx) 
const override;
 
  182                                     .requiresUpdate(0.0))
 
  192                          { 
return myIsUsingCachedCode; }
 
  195     virtual void        loadMaterialInfo();
 
  196     virtual void        unloadMaterialInfo();
 
  200     struct vop_EncapsulatedMetaData
 
  202         vop_EncapsulatedMetaData() : myIsValid(false) {}
 
  209                                              vop_EncapsulatedMetaData &md);
 
  211                                                    vop_EncapsulatedMetaData &md);
 
  213     void                 adjustChildrenForInputRemoval(
int idx);
 
  214     void                 adjustChildrenForInputInsertion(
int idx);
 
  221     friend class SubnetAPI;
 
  224     VOP_SubnetHelper            *mySubnetHelper;
 
  233     bool                         myIsUsingCachedCode;
 
  237     bool                        myIsDeletingSubnetNodes;
 
  240     unsigned                    myIsSettingUpConnectorDefinersAfterLoad : 1,
 
  241                                 myIsLoadingNetwork : 1,
 
  242                                 myAreConnectorsSetUp : 1;
 
Reprsents a language for which VOPs can generate source code. 
 
virtual void endLoadingInNetwork()
 
void ensureSpareParmsAreUpdatedSubclass() override
 
virtual void dirtyShaderList()
Some material vops cache a list of shader that needs to be dirtied. 
 
virtual void shaderParmGrandChildChanged(VOP_Node *grand_child)
 
virtual unsigned maxInputs() const 
Maximum inputs that can be connected to a node. 
 
static const char * theChildTableName
 
void getOuterCode(UT_String &codestr, const VOP_CodeGenContext &context) override
 
virtual void setupConnectorsAfterLoad()
 
virtual unsigned getNumVisibleInputs() const 
 
virtual VOP_ParmGeneratorMap * getSubnetVariables()
 
void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx) override
 
virtual bool getIsOutputDefinedByParmChild(int idx) const 
 
virtual bool getIsInputDefinedByParmChild(int idx) const 
 
void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx) override
 
void updateOwnerSpareParmLayout(bool allow_update_while_loading=false)
Update the owner network's spare parameter layout. 
 
virtual unsigned getNumVisibleOutputs() const 
 
virtual UT_StringArray * getArrayForLoadedOutputNames()
 
virtual bool generateErrorsSubclass()
 
void finishedLoadingNetwork(bool is_child_call=false) override
 
virtual OP_OperatorFilter * getOperatorFilter()
 
constexpr auto in(type t, int set) -> bool
 
virtual bool isConnected(int inputidx, bool recursive)
 
void changeParmTemplate(PRM_Template *new_template) override
 
virtual void handleOTLIndexFileCleared()
 
const char * outputLabel(OP_OutputIdx idx) const override
 
virtual void getSubnetOutputTerminalChild(VOP_Node *&output_vop, int &input_idx, int subnet_output_idx) const 
 
void getInputNameSubclass(UT_String &in, int idx) const override
 
GLint GLint GLsizei GLint GLenum GLenum type
 
virtual void unmatchOTLDefinition()
Unmatches (unlocks) the node from the current HDA definition. 
 
bool runCreateScript() override
 
virtual UT_IntArray getShaderLayerExportsInputsToCopy(int out_idx, VOP_Type shader_type)
 
virtual bool canDefineShader() const 
 
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *op)
 
bool isUsingCachedCode() const 
 
DEP_MicroNode & eventMicroNode(OP_EventType e)
 
virtual void shaderParmGrandChildAdded(VOP_Node *grand_child)
 
virtual int getNumSubnetInputsForChildren() const 
 
virtual VOP_ExportedParmsManager * getVopExportedParmsManager(bool create_if_needed=false)
 
GLuint const GLchar * name
 
virtual void getVopFunctionArgInfos(UT_Array< VOP_FunctionArgInfo > &arg_infos)
 
void getOutputNameSubclass(UT_String &out, int idx) const override
 
bool getParmConstantString(const char *parmname, const VOP_TypeInfo &type_info, UT_String &str, bool expand_string, const VOP_Language *language=nullptr) override
Get the constant code that encodes the value of the node parameter. 
 
bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const override
 
virtual void matchOTLDefinition()
 
virtual UT_StringArray * getArrayForLoadedInputNames()
 
int getInputFromNameSubclass(const UT_String &in) const override
 
virtual void beginLoadingInNetwork()
Called upon entering and exiting loadNetwork() method. 
 
virtual void addNode(OP_Node *node, int notify=1, int explicitly=1)
 
void getModulesToImport(UT_StringArray &modules, const VOP_CodeGenContext &context) override
If the node generates a shader call, get the modules names to import. 
 
void getCode(UT_String &codestr, const VOP_CodeGenContext &context) override
Get the code fragment to be included in the shader code. 
 
VOP_Type
Enumeration of the built-in (basic) VOP data types. 
 
virtual bool isOperatorAllowedInTabMenu(OP_Operator *op)
Returns true if the given op can show up in the Tab menu. 
 
const char * inputLabel(OP_InputIdx idx) const override
 
virtual void getExtraTypesToDefine(UT_Array< VOP_TypeInfo > &types)
 
virtual void findAllShaders(VOP_NodeList &shader_nodes, VOP_ShaderTypeList &shader_types, UT_StringArray &output_names)
 
virtual bool hasCorrespondingInput(int output_idx) const 
Returns true if output of a given index has an input by the same name. 
 
virtual int getSubnetInputIndexForChildren(int child_input) const 
 
GLsizei GLenum GLenum * types
 
virtual bool translatesDirectlyToUSD() const 
 
virtual void shaderParmGrandChildDeleted(VOP_Node *grand_child)
 
void opChanged(OP_EventType reason, void *data=nullptr) override
 
virtual int getNumNodeDefinedOutputs() const 
 
virtual UT_StringHolder getShaderLayerExportsToAdd(int out_idx, VOP_Type shader_type)
 
virtual void postOpChanged(OP_EventType, void *)