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

Creates a standard USD Preview Surface shader from Houdini's node. More...

#include <HUSD_ShaderTranslator.h>

Public Member Functions

virtual ~HUSD_PreviewShaderGenerator ()=default
 Standard virtual destructor for this abstract base class. More...
 
virtual bool matchesRenderMask (const UT_StringRef &render_mask)=0
 
virtual void createMaterialPreviewShader (HUSD_AutoWriteLock &lock, const UT_StringRef &usd_material_path, const HUSD_TimeCode &time_code, OP_Node &shader_node, const UT_StringRef &output_name)=0
 
virtual void updateMaterialPreviewShaderParameters (HUSD_AutoWriteLock &lock, const UT_StringRef &usd_shader_path, const HUSD_TimeCode &time_code, OP_Node &shader_node, const UT_StringArray &parameter_names)=0
 

Detailed Description

Creates a standard USD Preview Surface shader from Houdini's node.

Definition at line 126 of file HUSD_ShaderTranslator.h.

Constructor & Destructor Documentation

virtual HUSD_PreviewShaderGenerator::~HUSD_PreviewShaderGenerator ( )
virtualdefault

Standard virtual destructor for this abstract base class.

Member Function Documentation

virtual void HUSD_PreviewShaderGenerator::createMaterialPreviewShader ( HUSD_AutoWriteLock lock,
const UT_StringRef usd_material_path,
const HUSD_TimeCode time_code,
OP_Node shader_node,
const UT_StringRef output_name 
)
pure virtual

Creates a USD Preview Surface shader primitive for the USD material.

usd_material_path - path to the material primitive in which the shader primitive should be created. time_code - time code at which to evaluate any properties shader_node - the Houdini node that represents a shader for which the USD Preview Shader prim should be created. output_name - the output name of the VOP node that represents the shader to pick and translate. It can be an empty string, if the VOP node does not have shader outputs.

virtual bool HUSD_PreviewShaderGenerator::matchesRenderMask ( const UT_StringRef render_mask)
pure virtual

Returns true if the generator can create a USD Preview Surface shader for a shader node that reports the given render mask.

virtual void HUSD_PreviewShaderGenerator::updateMaterialPreviewShaderParameters ( HUSD_AutoWriteLock lock,
const UT_StringRef usd_shader_path,
const HUSD_TimeCode time_code,
OP_Node shader_node,
const UT_StringArray parameter_names 
)
pure virtual

Re-generates the shader parameters given the shader VOP node (and its new parameter values). usd_shader_path - the path to the USD preview shader primitive whose input attributes need updating due to node parm value change. time_code - time code at which to evaluate any properties shader_node - Houdini node whose parameters changed, thus requiring an update to the input attributes of the corresponding USD preview shader.


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