HDK
|
#include <VOP_CodeGenerator.h>
Public Member Functions | |
VOP_CodeGenerator (OP_Network *owner, VOP_LanguageContextTypeList *context_type, int mininputs, int maxinputs) | |
virtual | ~VOP_CodeGenerator () |
OP_OperatorFilter * | getOperatorFilter () |
UT_ErrorManager & | getErrorManager () |
VOP_ExportedParmsManager * | exportedParmsManager () const |
Return the exported parameters manager. More... | |
virtual bool | hasShaderParameter (const char *parm_name) |
void | beforeAddNode (OP_Node *node) |
void | afterAddNode (OP_Node *node) |
void | resetTables (VOP_Node *node) |
void | ownerChanged (OP_EventType reason, void *data) |
void | ownerFinishedLoadingNetwork () |
void | generateVopErrors () |
bool | getVariableString (int index, UT_String &value) |
const char * | getEnglishName () |
const char * | getFunctionPath (UT_String &name) const |
The function path is the leading path to the shader. More... | |
int | getMinimumInputs () const |
int | getMaximumInputs () const |
void | getInternalOperatorInfo (OP_OTLDefinition &info) |
bool | canGenerateCode (VOP_Type shader_type) const |
Returns ture if the generator can generate code for the given type. More... | |
void | getAutoShaderTypes (VOP_ShaderTypeList &types) const |
Returns a list of shader types that can be auto-generated for the owner. More... | |
void | setVexCodeDirty () |
bool | outputVexCode (std::ostream &os, const char *shadername, VEX_CodeGenFlags flags=VEX_CG_DEFAULT, VOP_ContextType ctx_type=VOP_CONTEXT_TYPE_INVALID, bool *is_pure_compiled=nullptr, VOP_ShaderSpaceInfo *shader_space=nullptr) |
bool | isVexCodeCached (VOP_ContextType context_type) const |
Determines if the giving context has already been cached. More... | |
virtual bool | outputVflCode (std::ostream &os, const char *shadername, VEX_CodeGenFlags flags=VEX_CG_DEFAULT, VOP_ContextType ctx_type=VOP_CONTEXT_TYPE_INVALID, bool skipheader=false, const char *output_node_name=nullptr, VCC_Diagnostics *diag=nullptr, VOP_ShaderSpaceInfo *shader_space=nullptr) |
bool | outputEncapsulatedVflCode (std::ostream &os, VOP_Node *subnet, const char *function_name, VEX_CodeGenFlags flags, VOP_ContextType context_type, bool generate_outer_code) |
Generates a VFL code for a vex function defined by a vop subnet node. More... | |
void | getDependencies (VOP_ContextType context_type, UT_StringArray &shader_deps) |
void | getShaderParameterNodes (VOP_NodeList &parm_vops, VOP_Type shader_type) |
void | addCodeDependency (DEP_MicroNode *target) |
time_t | getCachedCodeTimeStamp (VOP_ContextType context_type) const |
bool | hasCachedCode () const |
Return true if this code generator has any cached code. More... | |
void | generateRslObject (UT_String &ofile, const char *cache_directory, const char *renderer, int major_version, int minor_version, const char *shaderpath, const char *shadername, VOP_ContextType context_type, bool ignore_dirty_flag, UT_String *error_return) |
void | generateOslObject (UT_String &ofile, const char *cache_directory, const char *shaderpath, const char *shadername, VOP_ContextType context_type, bool ignore_dirty_flag, UT_String *error_return) |
void | getClassMethodInfos (UT_Array< VOP_MemberMethodInfo > &infos) |
void | getOutputNodes (VOP_NodeList &outputs, VOP_ShaderTypeList *types=nullptr) const |
VOP_Collect * | getCollectNode () const |
Return the collection VOP (or NULL if there is no collection) More... | |
VOP_Node * | getEncapsulatedShader (VOP_ContextType context) const |
const char * | getCompiler (UT_String &compiler, fpreal now, const char *defcompiler) |
const char * | getCompiler (UT_WorkBuffer &wbuf, fpreal now, const char *defcompiler) |
const VOP_Language * | getLanguage () const |
Get the VOP language generated by this code generator. More... | |
const VOP_LanguageContextTypeList * | getLanguageContextTypeList () const |
VOP_LanguageType | getLanguageType () const |
Returs a language for which this generator produces code. More... | |
bool | needsToGenerateAutoShader (bool allow_value_inputs=false) const |
bool | isSingleContextType () const |
bool | isClassBasedShader () const |
Returns true if this generator produces a class-based shader. More... | |
bool | isClassBasedShader (const VOP_CodeGenContext &codegen_ctx) const |
Returns true if the given shader type is class-based. More... | |
void | getVopnetTypes (const VOP_ContextTypeList &ctxts, UT_StringArray &vopnet_types) |
Returns a list of vopnet type masks for a given context list. More... | |
bool | getOwnerHasParameters () const |
VOP_ContextType | getVopContextType () const |
VEX_ContextType | getVexContextType () const |
RSL_ContextType | getRslContextType () const |
OSL_ContextType | getOslContextType () const |
VOP_CodeCompilerArgs * | getCompilerArgs () |
Returns the compiler arguments. More... | |
void | setLockedCompiledCode (const char *code, VOP_ContextType context_type, bool is_source_code) |
VEX_ContextType | pickVexContextType (VOP_ContextType context_type) const |
RSL_ContextType | pickRslContextType (VOP_ContextType context_type) const |
OSL_ContextType | pickOslContextType (VOP_ContextType context_type) const |
VOP_ContextType | pickContextType (VOP_ContextType context_type) const |
VOP_Node * | getProcedural (VOP_Type interpret_type) const |
void | getVopFunctionArgInfosFromExports (UT_Array< VOP_FunctionArgInfo > &arg_infos, VOP_Type shader_type) |
Obtains the export variables that don't have explicit output connectors. More... | |
void | getPropertiesNodes (VOP_NodeList &properties) |
Gathers all the rendering properties nodes. More... | |
OP_Network * | ownerNetwork () const |
VOP_ErrorMicroNode & | errorMicroNode () |
bool | getNodesForContextOrNodeFunctionVflCode (VOP_NodeList &nodes, VOP_Node *&output_node, const VOP_CodeGenContext &codegen_ctx, VOP_CodeVarMapperContext &varmap_context, const char *output_node_name, bool check_errors, VCC_Diagnostics *diagnostics) |
bool | getNodesForSubnetFunctionVflCode (VOP_NodeList &nodes, const VOP_CodeGenContext &codegen_ctx, VOP_CodeVarMapperContext &varmap_context, VOP_Node *vop_subnet, bool require_context_check) |
void | cleanupNodesForVflCode (VOP_NodeList &nodes) |
bool | needsAutoVopNodeCleanup () const |
void | setUseIfdefVex (bool flag) |
Controls whether the source code is laced with #ifdef __vex. More... | |
void | setOmitPragmas (bool flag) |
Controls whether the source code contains pragmas. More... | |
UT_StringHolder | getShaderContextName (VOP_ContextType ctx_type) const |
Obtains the name of the shading context as is used in the language. More... | |
UT_StringHolder | getShaderContextFullName (VOP_ContextType ctx_t) const |
int | beginUpdate () |
void | endUpdate (int update_level) |
void | clearAllUpdateFlags () |
void | setNeedsCodeUpdate () |
const char * | getFunctionName (UT_String &name) const |
const char * | getInternalFunctionName (UT_String &name) const |
bool | getGeneratorErrors (UT_String &errors) const |
bool | getGeneratorErrors (UT_String &errors, VOP_ContextType context_type) const |
bool | getGeneratorErrorsAndWarnings (UT_String &msgs) const |
bool | getGeneratorErrorsAndWarnings (UT_String &msgs, VOP_ContextType context_type) const |
bool | getDiagnosticsForNode (VOP_Node *node, VCC_DiagnosticList &list) const |
void | setIsAutoGenerator (bool is_auto) |
bool | isAutoGenerator () const |
void | setIsChangingAutoShader (bool flag) |
bool | getIsChangingAutoShader () const |
Static Public Member Functions | |
static bool | compileAndCacheVflCode (UT_WorkBuffer &vex_output, const UT_WorkBuffer &vfl_input, const char *filename, VCC_Compiler *compiler, const VCC_Options &opts) |
static VOP_CodeGenerator * | findCodeGenerator (const OP_Node *node) |
static void | installCommands () |
static bool | convertVopOpToVopOpType (OP_Node *node, UT_String &err) |
static const char * | getDefaultVEXMask () |
Returns the default VOP mask for VEX. More... | |
static bool | forceCompile (OP_Node *node) |
static int | forceCompile (void *data, int, fpreal, const PRM_Template *) |
static void | formatDiagnostic (const VCC_DiagnosticInfo &info, UT_WorkBuffer &str) |
static UT_StringHolder | getShaderContextName (VOP_ContextType ctx_type, VOP_LanguageType lang_type) |
Static Public Attributes | |
static CH_LocalVariable | theLocalVariables [] |
static PRM_Name | theVopCompilerName |
static PRM_Default | theVopCompilerVexDefault |
static PRM_Default | theVopCompilerRslDefault |
static PRM_Default | theVopCompilerOslDefault |
static PRM_ChoiceList | theVopCompilerChoices |
static PRM_Name | theVopForceCompileName |
Definition at line 103 of file VOP_CodeGenerator.h.
VOP_CodeGenerator::VOP_CodeGenerator | ( | OP_Network * | owner, |
VOP_LanguageContextTypeList * | context_type, | ||
int | mininputs, | ||
int | maxinputs | ||
) |
Constructor
owner | The network based on which the code is generated (whose outupt node is used during code generation, etc) |
context_type | A list of context type for a specific language, which the generator will generate code for. For single-context shaders, the list will have a single entry, while multi-context shaders will have several. The code generator will take ownership of that context type list object and will delete it in the destructor. |
mininputs | Minimum number of inputs to the owner |
maxinputs | Maximum number of input to the owner |
|
virtual |
|
inline |
On the given micronode, add an extra input to our code micro node so it gets reset everytime we are dirtied.
Definition at line 267 of file VOP_CodeGenerator.h.
int VOP_CodeGenerator::beginUpdate | ( | ) |
Functions for controlling when a code generator is updated. The code pattern is something like this: int update_id = codegenerator->beginUpdate(); ... if (code_needs_to_update) codegenerator->setNeedsCodeUpdate(); ... codegenerator->endUpdate(update_id);
bool VOP_CodeGenerator::canGenerateCode | ( | VOP_Type | shader_type | ) | const |
Returns ture if the generator can generate code for the given type.
void VOP_CodeGenerator::cleanupNodesForVflCode | ( | VOP_NodeList & | nodes | ) |
Clean up the list obtained with getNodesForShaderVflCode() or getNodesForSubnetFunctionVflCode()
|
inline |
Functions for controlling when a code generator is updated. The code pattern is something like this: int update_id = codegenerator->beginUpdate(); ... if (code_needs_to_update) codegenerator->setNeedsCodeUpdate(); ... codegenerator->endUpdate(update_id);
Definition at line 151 of file VOP_CodeGenerator.h.
|
static |
Compiles VFL code into VEX output, and uses the global disk cache.
Functions for controlling when a code generator is updated. The code pattern is something like this: int update_id = codegenerator->beginUpdate(); ... if (code_needs_to_update) codegenerator->setNeedsCodeUpdate(); ... codegenerator->endUpdate(update_id);
|
inline |
Return the micro-node representing the error state. The micro-node will signal if we transition from clean -> error, error -> error, and error -> clean.
Definition at line 478 of file VOP_CodeGenerator.h.
|
inline |
Return the exported parameters manager.
Definition at line 128 of file VOP_CodeGenerator.h.
|
static |
Utility function to get a code generator corresponding to the node. Returns own code generator if it exists, or creator's code generator.
|
static |
|
static |
|
static |
void VOP_CodeGenerator::generateOslObject | ( | UT_String & | ofile, |
const char * | cache_directory, | ||
const char * | shaderpath, | ||
const char * | shadername, | ||
VOP_ContextType | context_type, | ||
bool | ignore_dirty_flag, | ||
UT_String * | error_return | ||
) |
void VOP_CodeGenerator::generateRslObject | ( | UT_String & | ofile, |
const char * | cache_directory, | ||
const char * | renderer, | ||
int | major_version, | ||
int | minor_version, | ||
const char * | shaderpath, | ||
const char * | shadername, | ||
VOP_ContextType | context_type, | ||
bool | ignore_dirty_flag, | ||
UT_String * | error_return | ||
) |
void VOP_CodeGenerator::generateVopErrors | ( | ) |
void VOP_CodeGenerator::getAutoShaderTypes | ( | VOP_ShaderTypeList & | types | ) | const |
Returns a list of shader types that can be auto-generated for the owner.
time_t VOP_CodeGenerator::getCachedCodeTimeStamp | ( | VOP_ContextType | context_type | ) | const |
Return the time stamp from when VEX code was last generated or -1 if no cached code exists
void VOP_CodeGenerator::getClassMethodInfos | ( | UT_Array< VOP_MemberMethodInfo > & | infos | ) |
VOP_Collect* VOP_CodeGenerator::getCollectNode | ( | ) | const |
Return the collection VOP (or NULL if there is no collection)
const char* VOP_CodeGenerator::getCompiler | ( | UT_String & | compiler, |
fpreal | now, | ||
const char * | defcompiler | ||
) |
const char* VOP_CodeGenerator::getCompiler | ( | UT_WorkBuffer & | wbuf, |
fpreal | now, | ||
const char * | defcompiler | ||
) |
|
inline |
Returns the compiler arguments.
Definition at line 405 of file VOP_CodeGenerator.h.
|
static |
Returns the default VOP mask for VEX.
void VOP_CodeGenerator::getDependencies | ( | VOP_ContextType | context_type, |
UT_StringArray & | shader_deps | ||
) |
Returns a list of dependencies, if the shader handled by this code generator is an encapsulated shader (cached code).
bool VOP_CodeGenerator::getDiagnosticsForNode | ( | VOP_Node * | node, |
VCC_DiagnosticList & | list | ||
) | const |
Get a string containing the errors or warnings from our last vex code generation (including source code generation and compilation). Returns true if there were any errors.
VOP_Node* VOP_CodeGenerator::getEncapsulatedShader | ( | VOP_ContextType | context | ) | const |
Return the code generating encapsulated shader for the given context (or NULL).
const char* VOP_CodeGenerator::getEnglishName | ( | ) |
UT_ErrorManager& VOP_CodeGenerator::getErrorManager | ( | ) |
const char* VOP_CodeGenerator::getFunctionName | ( | UT_String & | name | ) | const |
The function name is mangled for some renderers (i.e. RSL) since basing the function name on the node name is not safe. However, some places require the node name – unmangled (i.e. dialog scripts).
const char* VOP_CodeGenerator::getFunctionPath | ( | UT_String & | name | ) | const |
The function path is the leading path to the shader.
bool VOP_CodeGenerator::getGeneratorErrors | ( | UT_String & | errors | ) | const |
Get a string containing the errors or warnings from our last vex code generation (including source code generation and compilation). Returns true if there were any errors.
bool VOP_CodeGenerator::getGeneratorErrors | ( | UT_String & | errors, |
VOP_ContextType | context_type | ||
) | const |
Get a string containing the errors or warnings from our last vex code generation (including source code generation and compilation). Returns true if there were any errors.
bool VOP_CodeGenerator::getGeneratorErrorsAndWarnings | ( | UT_String & | msgs | ) | const |
Get a string containing the errors or warnings from our last vex code generation (including source code generation and compilation). Returns true if there were any errors.
bool VOP_CodeGenerator::getGeneratorErrorsAndWarnings | ( | UT_String & | msgs, |
VOP_ContextType | context_type | ||
) | const |
Get a string containing the errors or warnings from our last vex code generation (including source code generation and compilation). Returns true if there were any errors.
const char* VOP_CodeGenerator::getInternalFunctionName | ( | UT_String & | name | ) | const |
The function name is mangled for some renderers (i.e. RSL) since basing the function name on the node name is not safe. However, some places require the node name – unmangled (i.e. dialog scripts).
void VOP_CodeGenerator::getInternalOperatorInfo | ( | OP_OTLDefinition & | info | ) |
|
inline |
Methods for marking code path related to adding and deleting temporary nodes in auto-shader wrappers.
Definition at line 541 of file VOP_CodeGenerator.h.
|
inline |
Get the VOP language generated by this code generator.
Definition at line 334 of file VOP_CodeGenerator.h.
|
inline |
Get the object representing the list of shader contexts (surface, displacement, etc) supported by this generator. The returned object also describes the language type supported by this generator.
Definition at line 340 of file VOP_CodeGenerator.h.
VOP_LanguageType VOP_CodeGenerator::getLanguageType | ( | ) | const |
Returs a language for which this generator produces code.
int VOP_CodeGenerator::getMaximumInputs | ( | ) | const |
int VOP_CodeGenerator::getMinimumInputs | ( | ) | const |
bool VOP_CodeGenerator::getNodesForContextOrNodeFunctionVflCode | ( | VOP_NodeList & | nodes, |
VOP_Node *& | output_node, | ||
const VOP_CodeGenContext & | codegen_ctx, | ||
VOP_CodeVarMapperContext & | varmap_context, | ||
const char * | output_node_name, | ||
bool | check_errors, | ||
VCC_Diagnostics * | diagnostics | ||
) |
Get a list of all vop nodes participating in the shader. The list is sorted according to order in which the vfl code should be generated. If 'check_errors' is true, node error checking is performed and if any error is encountered, the method will return false (and the node list may be incomplete). If this argument is false, the method does not check errors and always returns true and the list of nodes is complete. NB: when nodes a no longer needed, use cleanupNodesForShaderOutput() to clean up the list of temporary nodes this method may create.
bool VOP_CodeGenerator::getNodesForSubnetFunctionVflCode | ( | VOP_NodeList & | nodes, |
const VOP_CodeGenContext & | codegen_ctx, | ||
VOP_CodeVarMapperContext & | varmap_context, | ||
VOP_Node * | vop_subnet, | ||
bool | require_context_check | ||
) |
Get a list of all vop nodes participating in the function code defined by a vop subnet. The list is sorted according to order in which the vfl code should be generated. NB: when nodes a no longer needed, use cleanupNodesForShaderOutput() to clean up the list of temporary nodes this method may create.
OP_OperatorFilter* VOP_CodeGenerator::getOperatorFilter | ( | ) |
OSL_ContextType VOP_CodeGenerator::getOslContextType | ( | ) | const |
void VOP_CodeGenerator::getOutputNodes | ( | VOP_NodeList & | outputs, |
VOP_ShaderTypeList * | types = nullptr |
||
) | const |
|
inline |
Returns true if the owner of the code generator displays parameters. This is currently true for VOPNET_Nodes.
Definition at line 387 of file VOP_CodeGenerator.h.
void VOP_CodeGenerator::getPropertiesNodes | ( | VOP_NodeList & | properties | ) |
Gathers all the rendering properties nodes.
RSL_ContextType VOP_CodeGenerator::getRslContextType | ( | ) | const |
UT_StringHolder VOP_CodeGenerator::getShaderContextFullName | ( | VOP_ContextType | ctx_t | ) | const |
Obtains the name of the shading context, which includes node path prefix if it's an auto shader.
UT_StringHolder VOP_CodeGenerator::getShaderContextName | ( | VOP_ContextType | ctx_type | ) | const |
Obtains the name of the shading context as is used in the language.
|
static |
void VOP_CodeGenerator::getShaderParameterNodes | ( | VOP_NodeList & | parm_vops, |
VOP_Type | shader_type | ||
) |
VEX_ContextType VOP_CodeGenerator::getVexContextType | ( | ) | const |
VOP_ContextType VOP_CodeGenerator::getVopContextType | ( | ) | const |
Determine the VOP context type for single-context type vopnet generator. For generator of a multi-context vopnet returns VOP_CONTEXT_TYPE_INVALID, because the specific VOP context cannot be reliably and unambiguously determined.
void VOP_CodeGenerator::getVopFunctionArgInfosFromExports | ( | UT_Array< VOP_FunctionArgInfo > & | arg_infos, |
VOP_Type | shader_type | ||
) |
Obtains the export variables that don't have explicit output connectors.
void VOP_CodeGenerator::getVopnetTypes | ( | const VOP_ContextTypeList & | ctxts, |
UT_StringArray & | vopnet_types | ||
) |
Returns a list of vopnet type masks for a given context list.
bool VOP_CodeGenerator::hasCachedCode | ( | ) | const |
Return true if this code generator has any cached code.
|
virtual |
|
static |
|
inline |
An automatic code generator is created by default for a VOP, when a VOP is created in a Shader Network container. The automatic generator provides a code for a temporary shader consisting of that VOP and any of its input chains.
Definition at line 353 of file VOP_CodeGenerator.h.
bool VOP_CodeGenerator::isClassBasedShader | ( | ) | const |
Returns true if this generator produces a class-based shader.
bool VOP_CodeGenerator::isClassBasedShader | ( | const VOP_CodeGenContext & | codegen_ctx | ) | const |
Returns true if the given shader type is class-based.
bool VOP_CodeGenerator::isSingleContextType | ( | ) | const |
Returns true if it is a single-context vopnet that this generator produces code for. Otherwise (ie, multi-context) returns false.
|
inline |
Determines if the giving context has already been cached.
Definition at line 207 of file VOP_CodeGenerator.h.
|
inline |
Definition at line 517 of file VOP_CodeGenerator.h.
bool VOP_CodeGenerator::needsToGenerateAutoShader | ( | bool | allow_value_inputs = false | ) | const |
Returns true if the generator should generate temporary, automatic, adhoc shader for the owner node, when that node is assigned as a shader. Such code is needed for VOPs directly inside a Shader Network container, when they are not true shaders themselves, or when a connected input implies a composite shder generation. In other cases (eg an unconnected VOP that represents an external shader, or a RIS shader), there is no need for temp shader code gen.
allow_value_inputs | - if true, don't need to generate auto-shader when all inputs are simple value (Parm or Const VOPs). |
bool VOP_CodeGenerator::outputEncapsulatedVflCode | ( | std::ostream & | os, |
VOP_Node * | subnet, | ||
const char * | function_name, | ||
VEX_CodeGenFlags | flags, | ||
VOP_ContextType | context_type, | ||
bool | generate_outer_code | ||
) |
Generates a VFL code for a vex function defined by a vop subnet node.
bool VOP_CodeGenerator::outputVexCode | ( | std::ostream & | os, |
const char * | shadername, | ||
VEX_CodeGenFlags | flags = VEX_CG_DEFAULT , |
||
VOP_ContextType | ctx_type = VOP_CONTEXT_TYPE_INVALID , |
||
bool * | is_pure_compiled = nullptr , |
||
VOP_ShaderSpaceInfo * | shader_space = nullptr |
||
) |
Outputs vex code.
[out] | os | Stream to write the vex code to. |
[in] | shadername | Specifies the name that should be used for the generated vex code. |
[in] | context_type | Specifies the shading context for which to generate vex code; relevant only for multi-context vopnets. |
[out] | is_pure_compiled | Set to true if the vex code comes from a locked code source (i.e., a CPIO packet for the node saved in the hip file), which indicates the node has been compiled out. |
|
virtual |
Generates a VFL code and writes it to the os.
shadername | The name of the shader function. |
flags | The code generation flags. |
context_type | For multi-context materials, this is the shader context for which to generate code. |
skipheader | If true the file comment will be skpped; the file comment contains info about original node, file name, and generation time stamp. |
output_node_name | Optional, this is a hint that specifies the name of the output node for which to generate the code. If the node by this name is found and it supports the context type (if given), then it is used for gathering nodes that participate in VFL code generation. If the node by this name cannot be used, then a Collect VOP node will be used. And if there is no collect node a (arbitrary) output node supporting the context type will be used. |
void VOP_CodeGenerator::ownerChanged | ( | OP_EventType | reason, |
void * | data | ||
) |
void VOP_CodeGenerator::ownerFinishedLoadingNetwork | ( | ) |
|
inline |
Definition at line 472 of file VOP_CodeGenerator.h.
VOP_ContextType VOP_CodeGenerator::pickContextType | ( | VOP_ContextType | context_type | ) | const |
Determines the vop context (ie encode vex or rsl context type). In single-context vop, returns a vex/rsl context type (encoded as vop type) intrinsic to that vop. In multi-context vop, returns the vop type based passed as an argument.
OSL_ContextType VOP_CodeGenerator::pickOslContextType | ( | VOP_ContextType | context_type | ) | const |
RSL_ContextType VOP_CodeGenerator::pickRslContextType | ( | VOP_ContextType | context_type | ) | const |
VEX_ContextType VOP_CodeGenerator::pickVexContextType | ( | VOP_ContextType | context_type | ) | const |
Determines the vex context. In single-context vop, returns a vex type intrinsic to that vop. In multi-context vop, returns the vex type based on context_type passed as an argument.
Sometimes a VOP needs to change its variable tables (i.e. an encapsulated shader)
|
inline |
An automatic code generator is created by default for a VOP, when a VOP is created in a Shader Network container. The automatic generator provides a code for a temporary shader consisting of that VOP and any of its input chains.
Definition at line 351 of file VOP_CodeGenerator.h.
|
inline |
Methods for marking code path related to adding and deleting temporary nodes in auto-shader wrappers.
Definition at line 539 of file VOP_CodeGenerator.h.
void VOP_CodeGenerator::setLockedCompiledCode | ( | const char * | code, |
VOP_ContextType | context_type, | ||
bool | is_source_code | ||
) |
Set the locked compiled code. When set, the locked code causes the code generator to ignore the VOP nodes in the owner network and always return the locked value.
void VOP_CodeGenerator::setNeedsCodeUpdate | ( | ) |
Functions for controlling when a code generator is updated. The code pattern is something like this: int update_id = codegenerator->beginUpdate(); ... if (code_needs_to_update) codegenerator->setNeedsCodeUpdate(); ... codegenerator->endUpdate(update_id);
|
inline |
Controls whether the source code contains pragmas.
Definition at line 525 of file VOP_CodeGenerator.h.
|
inline |
Controls whether the source code is laced with #ifdef __vex.
Definition at line 521 of file VOP_CodeGenerator.h.
void VOP_CodeGenerator::setVexCodeDirty | ( | ) |
|
static |
Definition at line 421 of file VOP_CodeGenerator.h.
|
static |
Definition at line 440 of file VOP_CodeGenerator.h.
|
static |
Definition at line 436 of file VOP_CodeGenerator.h.
|
static |
Definition at line 439 of file VOP_CodeGenerator.h.
|
static |
Definition at line 438 of file VOP_CodeGenerator.h.
|
static |
Definition at line 437 of file VOP_CodeGenerator.h.
|
static |
Definition at line 441 of file VOP_CodeGenerator.h.