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

#include <HUSD_BindMaterial.h>

Public Types

enum  BindMethod { BindMethod::DIRECT, BindMethod::COLLECTION }
 Enumeration of the ways in which a binding can be performed. More...
 
enum  Strength { Strength::DEFAULT, Strength::STRONG, Strength::WEAK }
 Enumeration of the material binding strength. More...
 

Public Member Functions

 HUSD_BindMaterial (HUSD_AutoWriteLock &lock)
 Standard constructor. More...
 
bool bind (const UT_StringRef &mat_prim_path, const UT_StringRef &geo_prim_path) const
 Assigns the given material to the given geometry primitive(s). More...
 
bool bind (const UT_StringRef &mat_prim_path, const HUSD_FindPrims &find_geo_prims) const
 
bool bindAsCollection (const UT_StringRef &mat_prim_path, const UT_StringRef &collection_path, const UT_StringRef &binding_prim_path, const UT_StringRef &binding_name) const
 
bool bindSubset (const UT_StringRef &mat_prim_path, const UT_StringRef &geo_prim_path, const UT_ExintArray *face_indices) const
 
void setBindMethod (BindMethod method)
 Sets the method of defining bindings. More...
 
BindMethod getBindMethod () const
 
void setBindCollectionExpand (bool expand)
 Sets the collection expansion option when defining collections. More...
 
bool getBindCollectionExpand () const
 
void setBindPrimPath (const UT_StringRef &p)
 
const UT_StringHoldergetBindPrimPath () const
 
void setStrength (Strength strength)
 Sets the strength preference for material assignments. More...
 
Strength getStrength () const
 
void setPurpose (const UT_StringHolder &purpose)
 Sets the purpose for material assignments. More...
 
const UT_StringHoldergetPurpose () const
 

Detailed Description

Definition at line 25 of file HUSD_BindMaterial.h.

Member Enumeration Documentation

Enumeration of the ways in which a binding can be performed.

Enumerator
DIRECT 
COLLECTION 

Definition at line 53 of file HUSD_BindMaterial.h.

Enumeration of the material binding strength.

Enumerator
DEFAULT 
STRONG 
WEAK 

Definition at line 79 of file HUSD_BindMaterial.h.

Constructor & Destructor Documentation

HUSD_BindMaterial::HUSD_BindMaterial ( HUSD_AutoWriteLock lock)

Standard constructor.

Member Function Documentation

bool HUSD_BindMaterial::bind ( const UT_StringRef mat_prim_path,
const UT_StringRef geo_prim_path 
) const

Assigns the given material to the given geometry primitive(s).

bool HUSD_BindMaterial::bind ( const UT_StringRef mat_prim_path,
const HUSD_FindPrims find_geo_prims 
) const
bool HUSD_BindMaterial::bindAsCollection ( const UT_StringRef mat_prim_path,
const UT_StringRef collection_path,
const UT_StringRef binding_prim_path,
const UT_StringRef binding_name 
) const

Performs a collection based binding with explicit values for the collection path, binding prim path, and binding name. The bind method and bind prim path set on this object are ignored.

bool HUSD_BindMaterial::bindSubset ( const UT_StringRef mat_prim_path,
const UT_StringRef geo_prim_path,
const UT_ExintArray face_indices 
) const

Assigns the given material a subset of the geometry primitive. This method creates the geometry subset. If a geometry subset already exists, it can be bound using the regular bind methods above.

bool HUSD_BindMaterial::getBindCollectionExpand ( ) const
inline

Definition at line 68 of file HUSD_BindMaterial.h.

BindMethod HUSD_BindMaterial::getBindMethod ( ) const
inline

Definition at line 62 of file HUSD_BindMaterial.h.

const UT_StringHolder& HUSD_BindMaterial::getBindPrimPath ( ) const
inline

Definition at line 75 of file HUSD_BindMaterial.h.

const UT_StringHolder& HUSD_BindMaterial::getPurpose ( ) const
inline

Definition at line 95 of file HUSD_BindMaterial.h.

Strength HUSD_BindMaterial::getStrength ( ) const
inline

Definition at line 89 of file HUSD_BindMaterial.h.

void HUSD_BindMaterial::setBindCollectionExpand ( bool  expand)
inline

Sets the collection expansion option when defining collections.

Definition at line 66 of file HUSD_BindMaterial.h.

void HUSD_BindMaterial::setBindMethod ( BindMethod  method)
inline

Sets the method of defining bindings.

Definition at line 60 of file HUSD_BindMaterial.h.

void HUSD_BindMaterial::setBindPrimPath ( const UT_StringRef p)
inline

For non-direct bindings, sets the USD primitive path on which the collection-based binding is defined.

Definition at line 73 of file HUSD_BindMaterial.h.

void HUSD_BindMaterial::setPurpose ( const UT_StringHolder purpose)
inline

Sets the purpose for material assignments.

Definition at line 93 of file HUSD_BindMaterial.h.

void HUSD_BindMaterial::setStrength ( Strength  strength)
inline

Sets the strength preference for material assignments.

Definition at line 87 of file HUSD_BindMaterial.h.


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