#include <HUSD_BindMaterial.h>
|
| 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_Array< exint > *face_indices, const HUSD_TimeCode &tc=HUSD_TimeCode()) const |
|
HUSD_Path | createSubset (const UT_StringRef &subset_name, const UT_StringRef &geo_prim_path, const UT_Array< exint > &face_indices, const HUSD_TimeCode &tc=HUSD_TimeCode()) const |
|
bool | unbindAll (const HUSD_FindPrims &find_prims) const |
|
bool | unbind (const HUSD_FindPrims &find_prims, const UT_StringHolder &purpose, int unbind_limit=1) const |
|
bool | assignMaterialsFromAttribute (const UT_StringRef &layername, const UT_StringMap< UT_StringHolder > &args, const UT_StringRef &primpath, const UT_StringRef &refprimpath, const UT_StringRef &attrname, bool remove_attr, bool create_empty_materials) 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_StringHolder & | getBindPrimPath () const |
|
void | setBindName (const UT_StringRef &n) |
|
const UT_StringHolder & | getBindName () 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_StringHolder & | getPurpose () const |
|
Definition at line 31 of file HUSD_BindMaterial.h.
Enumeration of the ways in which a binding can be performed.
Enumerator |
---|
DIRECT |
|
COLLECTION |
|
Definition at line 104 of file HUSD_BindMaterial.h.
Enumeration of the material binding strength.
Enumerator |
---|
DEFAULT |
|
STRONG |
|
WEAK |
|
Definition at line 137 of file HUSD_BindMaterial.h.
Looks for the specified attrname on any prims in the named layer. This string attribute is turned into an SdfPath that is bound as the material to the primitive with the attribute. If the attribute string points to a geometry primitive, we assign the material bound to that geometry primitive. Return false if the operation fails in an unrecoverable way. An error will have been added to the error scope to explain the failure. Warnings may also be generated for more minor issues such as invalid material paths.
Assigns the given material to the given geometry primitive(s).
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.
Assigns the given material to 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.
Creates a geometry subset for material binding, but does not actually bind any material to the prim.
bool HUSD_BindMaterial::getBindCollectionExpand |
( |
| ) |
const |
|
inline |
BindMethod HUSD_BindMaterial::getBindMethod |
( |
| ) |
const |
|
inline |
Strength HUSD_BindMaterial::getStrength |
( |
| ) |
const |
|
inline |
void HUSD_BindMaterial::setBindCollectionExpand |
( |
bool |
expand | ) |
|
|
inline |
Sets the collection expansion option when defining collections.
Definition at line 117 of file HUSD_BindMaterial.h.
For collection-based bindings, sets the USD binding name. (If not set explicitly, the material name will be used).
Definition at line 131 of file HUSD_BindMaterial.h.
For collection-based bindings, sets the USD primitive path on which the collection-based binding is defined.
Definition at line 124 of file HUSD_BindMaterial.h.
Removes the material binding from the geometry primitive(s). The unbind_limit
determines how many material bindings are blocked. The binding limit of 1 unassigns the currently bound material, allowing any other candidate moaterial to take over.
The binding limit of 2 unassigns the currently bound material (if any), and the second candidate material (if any), allowing the next candidate material to take effect.
bool HUSD_BindMaterial::unbindAll |
( |
const HUSD_FindPrims & |
find_prims | ) |
const |
Makes sure the primitives are not bound to any material. I.e, if there is any direct material binding (on the given prim or its ancestor), authors a binding block on the given prim, and if there is any collection-based assignment on the prim or ancestor, removes the given prim from the collection.
The documentation for this class was generated from the following file: