bindMaterial#

Fully qualified name: usdex::core::bindMaterial

bool usdex::core::bindMaterial(
pxr::UsdPrim prim,
const pxr::UsdShadeMaterial &material,
)#

Authors a direct binding to the given material on this prim.

Validates both the prim and the material, applies the UsdShadeMaterialBindingAPI to the target prim, and binds the material to the target prim.

Note

The material is bound with the default “all purpose” used for both full and preview rendering, and with the default “fallback strength” meaning descendant prims can override with a different material. If alternate behavior is desired, use the UsdShadeMaterialBindingAPI directly.

Parameters:
  • prim – The prim that the material will affect

  • material – The material to bind to the prim

Returns:

Whether the material was successfully bound to the target prim.