HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VOP_ExportedParmsManager Class Reference

#include <VOP_ExportedParmsManager.h>

Public Member Functions

 VOP_ExportedParmsManager (VOP_CodeGenerator *code_gen)
 
 VOP_ExportedParmsManager (VOP_Node *owner_subnet)
 
virtual ~VOP_ExportedParmsManager ()
 
OP_NetworkownerNetwork () const
 Return the network that owns the exported parameters. More...
 
bool isForCodeParms () const
 
void getParmNodes (VOP_ExportedParmList &list, bool includeInvisible)
 
void getParticipatingParametersAndDeclarations (const VOP_NodeList &nodes, const VOP_CodeGenContext &codegen_ctx, const char *scope, UT_StringArray *declarations, UT_StringArray *comments, VOP_ExportedParmList *parms)
 
void getClassMemberVariableParameterNodes (VOP_ExportedParmList &list, UT_StringArray *declarations=NULL, UT_StringArray *comments=NULL, UT_StringArray *access_level=NULL)
 Get a list of Parameter VOPs that define class member variables. More...
 
void getClassShaderParameterNodes (VOP_NodeList &parms)
 Returns parm nodes that define shader class parameters. More...
 
const char * getParmLayoutDialogScript () const
 
bool hasParmNode (const char *parm_name, bool use_cached_parms=false) const
 
VOP_ParmGeneratorgetParmNode (const char *parm_name, bool use_cached_parms=false) const
 
void setLockedCompiledDS (const char *dialog_script)
 
void ownerFinishedLoadingNetwork ()
 
void getOwnerSpareParmLayout (PI_EditScriptedParms &parm_layout)
 
void getOwnerHDADialogScriptLayout (PI_EditScriptedParms &parm_layout, bool use_incoming_layout=false)
 
void outputOwnerSpareParmLayout (std::ostream &os)
 Output the dialog script of the owner network's spare parameter layout. More...
 
void updateOwnerSpareParmLayout (bool allow_update_while_loading=false)
 Update the owner network's spare parameter layout. More...
 
void inhibitSpareParmLayoutUpdate (bool flag)
 
void updateOwnerSpareParmLayout (const PI_EditScriptedParms &new_parm_layout, const PI_OldParms &old_parms, bool apply_changes_to_parm_vops=false)
 
void updateInternalOpParms (bool force_ds_generation=false, bool allow_update_while_loading=false)
 
void addParmLayoutTemplate (const PI_EditScriptedParms &ref_parms)
 
VOP_ExportedParmLayoutMicroNodeparmLayoutMicroNode ()
 Micro node that represents cached the exported parameter layout. More...
 
VOP_ParmDSMicroNodeparmsMicroNode ()
 
void dirtyParms ()
 Dirty the exported parameters. More...
 
void setContextParmTagDirty (bool tag_dirty=true)
 
bool isContextParmTagDirty () const
 

Detailed Description

Manager of parameters exported by parameter VOPs contained in the owner network.

Definition at line 43 of file VOP_ExportedParmsManager.h.

Constructor & Destructor Documentation

VOP_ExportedParmsManager::VOP_ExportedParmsManager ( VOP_CodeGenerator code_gen)
explicit
VOP_ExportedParmsManager::VOP_ExportedParmsManager ( VOP_Node owner_subnet)
explicit
virtual VOP_ExportedParmsManager::~VOP_ExportedParmsManager ( )
virtual

Member Function Documentation

void VOP_ExportedParmsManager::addParmLayoutTemplate ( const PI_EditScriptedParms ref_parms)

Add the given parameter layout as a template for the next update to the owner VOP network's spare parameter layout.

void VOP_ExportedParmsManager::dirtyParms ( )

Dirty the exported parameters.

void VOP_ExportedParmsManager::getClassMemberVariableParameterNodes ( VOP_ExportedParmList list,
UT_StringArray declarations = NULL,
UT_StringArray comments = NULL,
UT_StringArray access_level = NULL 
)

Get a list of Parameter VOPs that define class member variables.

void VOP_ExportedParmsManager::getClassShaderParameterNodes ( VOP_NodeList parms)

Returns parm nodes that define shader class parameters.

void VOP_ExportedParmsManager::getOwnerHDADialogScriptLayout ( PI_EditScriptedParms parm_layout,
bool  use_incoming_layout = false 
)

Return the parameter layout to be used for the owner's HDA's dialog script.

You can optionally set use_incoming_layout to true if you want to use the layout already defined by parm_layout instead of the parameter layout stored in the owner network. In that case, the exported parameters are merged into the incoming layout with new parameters added to the end.

void VOP_ExportedParmsManager::getOwnerSpareParmLayout ( PI_EditScriptedParms parm_layout)

Return the spare parameter layout that is exported to the owner network. The layout contains a mix of exported and regular parameters.

const char* VOP_ExportedParmsManager::getParmLayoutDialogScript ( ) const

Return the dialog script for the code generator's exported parameter layout. The layout DS differs from the regular parm DS because it contains the owner node's complete parameter layout including spare parameters, folders and separators.

VOP_ParmGenerator* VOP_ExportedParmsManager::getParmNode ( const char *  parm_name,
bool  use_cached_parms = false 
) const

Return a pointer to the Parameter VOP node that corresponds to the given parameter name. Return NULL if no such node exists.

void VOP_ExportedParmsManager::getParmNodes ( VOP_ExportedParmList list,
bool  includeInvisible 
)
void VOP_ExportedParmsManager::getParticipatingParametersAndDeclarations ( const VOP_NodeList nodes,
const VOP_CodeGenContext codegen_ctx,
const char *  scope,
UT_StringArray declarations,
UT_StringArray comments,
VOP_ExportedParmList parms 
)

Obtains a list of all parameter nodes for the material (if it is a material vopnet) or for the shader (if it is just a shader)

bool VOP_ExportedParmsManager::hasParmNode ( const char *  parm_name,
bool  use_cached_parms = false 
) const

Return true if there is a VOP node which defines a parameter with the given name.

void VOP_ExportedParmsManager::inhibitSpareParmLayoutUpdate ( bool  flag)
inline

In rare cases it is necessary to prevent the update until all changes have been completed.

Definition at line 154 of file VOP_ExportedParmsManager.h.

bool VOP_ExportedParmsManager::isContextParmTagDirty ( ) const
inline

A flag to indicate if the cached parameters may have outdated parm tag that specifies parameter's shading contexts. Only shop clerk is interested in this tag and currently manages the updating itself. TODO: Remove tag_dirty argument.

Definition at line 112 of file VOP_ExportedParmsManager.h.

bool VOP_ExportedParmsManager::isForCodeParms ( ) const
inline

Return true if the manager is for code parameters and false otherwise (i.e. for subnet-scoped parameters).

Definition at line 55 of file VOP_ExportedParmsManager.h.

void VOP_ExportedParmsManager::outputOwnerSpareParmLayout ( std::ostream &  os)

Output the dialog script of the owner network's spare parameter layout.

void VOP_ExportedParmsManager::ownerFinishedLoadingNetwork ( )

This must be called when the owner network has finished loading (i.e. VOP_CodeGenerator::ownerFinishedLoadingNetwork() or VOP_SubnetBase::ownerFinishedLoadingNetwork()).

OP_Network * VOP_ExportedParmsManager::ownerNetwork ( ) const
inline

Return the network that owns the exported parameters.

Definition at line 422 of file VOP_ExportedParmsManager.h.

VOP_ExportedParmLayoutMicroNode& VOP_ExportedParmsManager::parmLayoutMicroNode ( )
inline

Micro node that represents cached the exported parameter layout.

Definition at line 181 of file VOP_ExportedParmsManager.h.

VOP_ParmDSMicroNode& VOP_ExportedParmsManager::parmsMicroNode ( )
inline

Micro node that represents cached exported parameters and dialog script.

Definition at line 186 of file VOP_ExportedParmsManager.h.

void VOP_ExportedParmsManager::setContextParmTagDirty ( bool  tag_dirty = true)
inline

A flag to indicate if the cached parameters may have outdated parm tag that specifies parameter's shading contexts. Only shop clerk is interested in this tag and currently manages the updating itself. TODO: Remove tag_dirty argument.

Definition at line 108 of file VOP_ExportedParmsManager.h.

void VOP_ExportedParmsManager::setLockedCompiledDS ( const char *  dialog_script)

Set the locked compiled dialog script. When set, the locked dialog script causes the manager ignore the VOP nodes in the owner network and always return the locked value.

void VOP_ExportedParmsManager::updateInternalOpParms ( bool  force_ds_generation = false,
bool  allow_update_while_loading = false 
)

Update the parameters on the owner network's internal operator (VOPNETs only).

void VOP_ExportedParmsManager::updateOwnerSpareParmLayout ( bool  allow_update_while_loading = false)

Update the owner network's spare parameter layout.

Examples:
SOP/SOP_PrimVOP.h.
void VOP_ExportedParmsManager::updateOwnerSpareParmLayout ( const PI_EditScriptedParms new_parm_layout,
const PI_OldParms old_parms,
bool  apply_changes_to_parm_vops = false 
)

Update the owner network's spare parameter layout using the layout that is passed in (i.e. new_parm_layout). The new layout can contain a mix of exported parameters and regular parameters. Use old_parms to supply a list of parameters that are to be renamed/deleted from the layout. Optionally set apply_changes_to_parm_vops to true if you want to apply the changes from old_parms to the defining Parameter VOPs.


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