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

#include <HUSD_CreateMaterial.h>

Public Member Functions

 HUSD_CreateMaterial (HUSD_AutoWriteLock &lock)
 Standard c-tor. More...
bool createMaterial (VOP_Node &material_vop, const UT_StringRef &usd_mat_path, bool auto_generate_preview_shader) const
bool updateShaderParameters (VOP_Node &shader_vop, const UT_StringArray &parameter_names, const UT_StringRef &usd_shader_path) const
 Re-translates the shader parameters given the shader VOP node. More...
bool createDerivedMaterial (const UT_StringRef &base_material_path, const UT_Options &material_parameters, const UT_StringRef &usd_mat_path) const
void setTimeCode (const HUSD_TimeCode &time_code)
 Sets the time code at which shader parameters are evaluated. More...
void setParentPrimType (const UT_StringHolder &type)

Detailed Description

Definition at line 28 of file HUSD_CreateMaterial.h.

Constructor & Destructor Documentation

HUSD_CreateMaterial::HUSD_CreateMaterial ( HUSD_AutoWriteLock lock)

Standard c-tor.

Member Function Documentation

bool HUSD_CreateMaterial::createDerivedMaterial ( const UT_StringRef base_material_path,
const UT_Options material_parameters,
const UT_StringRef usd_mat_path 
) const

Creates a new USD material primitive at usd_mat_path, which inherits from the material given by base_material_path, and sets the parameter override values on the created material.

bool HUSD_CreateMaterial::createMaterial ( VOP_Node material_vop,
const UT_StringRef usd_mat_path,
bool  auto_generate_preview_shader 
) const

Defines a USD material primitive at a given usd_mat_path based on given material_vop material node.

auto_generate_preview_shaderIf true, an attempt is made to ensure the created material has a preview shader (for the universal render context). Ie, if the material node does not contain any explicit preview shader node to translate, then an ad-hoc preview shader USD primitive will be generated.
void HUSD_CreateMaterial::setParentPrimType ( const UT_StringHolder type)

Sets the primitive type that should be used when creating parents that don't exist yet in the USD hierarchy.

Definition at line 64 of file HUSD_CreateMaterial.h.

void HUSD_CreateMaterial::setTimeCode ( const HUSD_TimeCode time_code)

Sets the time code at which shader parameters are evaluated.

Definition at line 59 of file HUSD_CreateMaterial.h.

bool HUSD_CreateMaterial::updateShaderParameters ( VOP_Node shader_vop,
const UT_StringArray parameter_names,
const UT_StringRef usd_shader_path 
) const

Re-translates the shader parameters given the shader VOP node.

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