12 #ifndef __VOP_SubnetBase_h__ 
   13 #define __VOP_SubnetBase_h__ 
   20 class VOP_SubnetHelper;
 
   34     unsigned             getNumRealInputs() 
const;
 
   64     bool                 isConnected(
int inputidx, 
bool recursive) 
override;
 
   71                                 bool check_shader_context) 
const override;
 
   72     bool                 getIsAdjustForInputChanged();
 
   75                                         bool create_if_needed=
false) 
override;
 
   84     virtual bool         shouldShowInputNext() 
const;
 
   93                                 bool is_child_call=
false) 
override;
 
   96                                  int explicitly=1) 
override;
 
  109     void                 handleChildAdd( 
OP_Node *child );
 
  110     void                 handleChildDelete( 
OP_Node *child );
 
  111     void                 handleDescendentAdd( 
VOP_Node *descendent );
 
  112     void                 handleDescendentDelete( 
VOP_Node *descendent );
 
  113     static void          handleParmNodeChange(
OP_Node *caller, 
void *callee, 
 
  115     void                 updateConnectorDefiner( 
VOP_Node *node );
 
  122     void                 setupConnectorDefinersAfterLoadIfNeeded();
 
  123     void                 setupConnectorDefinersAfterLoad();
 
  127     virtual void         getInternalInputName(
UT_String &
in, 
int idx) 
const;
 
  129     virtual int          getNumDefinedInputs() 
const;
 
  130     virtual void         getDefinedInputDefault(
UT_String &def, 
int idx) 
const;
 
  158     virtual int          getNumCustomOutputs() 
const;
 
  165                                 int index) 
const override;
 
  171                                 int out_idx, 
VOP_Type shader_type) 
override;
 
  173                                 int out_idx, 
VOP_Type shader_type) 
override;
 
  177                                 int subnet_output_idx) 
const override;
 
  180     bool                 hasCorrespondingInput(
int output_idx) 
const;
 
  183                                 int input_idx) 
const override;
 
  199                                 bool forcesubnet = 
false) 
override;
 
  207                                     .requiresUpdate(0.0))
 
  217     void                 adjustChildrenForInputChange(
int idx, 
 
  219                                     bool inputnull, 
bool force, 
 
  220                                     bool allow_disconnection, 
 
  221                                     bool allow_connection);
 
  222     int                  preSetSubnetInput(
int idx, 
bool inputnull);
 
  223     void                 postSetSubnetInput(
int idx, 
bool inputnull, 
 
  224                                     int child_input_idx);
 
  226     bool                 isConnectedInside(
int idx,
 
  227                                            bool include_outputs,
 
  228                                            bool include_parm_definers) 
const;
 
  231     bool                 isConnectedInsideNamed(
 
  233                                 bool include_parm_definers) 
const;
 
  234     void                 deleteArraysForLoadedInputAndOutputNames();
 
  241     friend class SubnetAPI;
 
  244     unsigned                     myIsAdjustingForInputChange : 1,
 
  245                                  myIsAppendingDefinedInput : 1,
 
  246                                  myIsSettingUpConnectorDefinersAfterLoad : 1,
 
  247                                  myIsLoadingNetwork : 1,
 
  248                                  myAreConnectorsSetUp : 1;
 
  251     VOP_SubnetHelper            *mySubnetHelper;
 
virtual int getInputFromNameSubclass(const UT_String &in) const 
 
virtual void endLoadingInNetwork()
 
void moveInput(int srcidx, int dstidx, bool forcesubnet=false) override
 
virtual void dirtyShaderList()
Some material vops cache a list of shader that needs to be dirtied. 
 
GLuint GLsizei const GLchar * label
 
virtual void getAllowedInputTypesSubclass(unsigned idx, VOP_VopTypeArray &voptypes)
 
OP_ERROR setNamedInputReference(const OP_ConnectorId &input_name, const char *label, int, const OP_ConnectorId *output_name=nullptr) override
 
virtual void shaderParmGrandChildChanged(VOP_Node *grand_child)
 
VOP_SubnetBase * castToSubnetBase() override
 
virtual void doDeleteInput(OP_InputIdx idx)
Performs actual removal from the member input array. 
 
OP_ERROR setInputReference(OP_InputIdx idx, const char *label, int keeppos, OP_OutputIdx outputIdx=0) override
Connects an input to particular node by name in the network. 
 
virtual void setupConnectorsAfterLoad()
 
virtual bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const 
 
virtual unsigned getNumVisibleInputs() const 
 
virtual VOP_ParmGeneratorMap * getSubnetVariables()
 
bool updateParmsFlags() override
 
OP_ERROR setInput(OP_InputIdx idx, OP_Node *op, OP_OutputIdx outputIdx=0) override
 
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText() 
 
virtual bool getInputEditorInputLabel(UT_String &label, OP_InputIdx idx)
 
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 isInputConnectedInsideSubnet(OP_InputIdx input_idx) const 
 
virtual bool generateErrorsSubclass()
 
void finishedLoadingNetwork(bool is_child_call=false) override
 
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
 
virtual OP_OperatorFilter * getOperatorFilter()
 
constexpr auto in(type t, int set) -> bool
 
virtual bool isConnected(int inputidx, bool recursive)
 
virtual void getSubnetOutputTerminalChild(VOP_Node *&output_vop, int &input_idx, int subnet_output_idx) const 
 
static const char * theChildTableName
 
virtual const char * inputLabel(OP_InputIdx idx) const 
 
GLint GLint GLsizei GLint GLenum GLenum type
 
void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
 
bool runCreateScript() override
 
virtual bool allowConsolidatingInput(OP_InputIdx idx)
 
virtual bool isNamedInputConnectedInsideSubnet(const OP_ConnectorId &input_name) const 
 
virtual UT_IntArray getShaderLayerExportsInputsToCopy(int out_idx, VOP_Type shader_type)
 
void ensureSpareParmsAreUpdatedSubclass() override
 
virtual void preOpChanged(OP_EventType, void *)
 
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)
 
virtual unsigned orderedInputs() const 
 
GLuint const GLchar * name
 
virtual UT_StringArray * getArrayForLoadedInputNames()
 
virtual int getInputEditorInputs()
 
virtual void getCode(UT_String &codestr, const VOP_CodeGenContext &context)
Get the code fragment to be included in the shader code. 
 
virtual void beginLoadingInNetwork()
Called upon entering and exiting loadNetwork() method. 
 
virtual void addNode(OP_Node *node, int notify=1, int explicitly=1)
 
SIM_API const UT_StringHolder force
 
virtual void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
 
virtual void getOutputNameSubclass(UT_String &out, int idx) const 
 
VOP_Type
Enumeration of the built-in (basic) VOP data types. 
 
virtual void getInputNameSubclass(UT_String &in, int idx) const 
 
virtual bool isOperatorAllowedInTabMenu(OP_Operator *op)
Returns true if the given op can show up in the Tab menu. 
 
virtual void getExtraTypesToDefine(UT_Array< VOP_TypeInfo > &types)
 
virtual void findAllShaders(VOP_NodeList &shader_nodes, VOP_ShaderTypeList &shader_types, UT_StringArray &output_names)
 
virtual void getInputDefaultValue(UT_String &def, int idx) const 
Gets a default value of an explicitly defined input (applies to subnets) 
 
const VOP_SubnetBase * castToSubnetBase() const override
 
virtual int getSubnetInputIndexForChildren(int child_input) const 
 
GLsizei GLenum GLenum * types
 
virtual bool translatesDirectlyToUSD() const 
 
virtual const char * outputLabel(OP_OutputIdx idx) const 
 
virtual void shaderParmGrandChildDeleted(VOP_Node *grand_child)
 
OP_ERROR setNamedInput(const OP_ConnectorId &input_name, OP_Node *op, const OP_ConnectorId *output_name=nullptr) override
New input functions that use names instead of indices. 
 
virtual int getNumNodeDefinedOutputs() const 
 
virtual UT_StringHolder getShaderLayerExportsToAdd(int out_idx, VOP_Type shader_type)
 
virtual void postOpChanged(OP_EventType, void *)