removeMaterialInterface#

Fully qualified name: usdex::core::removeMaterialInterface

bool usdex::core::removeMaterialInterface(
pxr::UsdShadeMaterial &material,
bool bakeValues = true,
)#

Removes any UsdShadeInputs found on the material prim.

All UsdShadeInputs on the UsdShadeMaterial will be disconnected from any underlying shader inputs, then removed from the material. The current values may be optionally “baked down” onto the shader inputs in order to retain the current material behavior, or may be discarded in order to revert to a default appearance based on the shader definitions.

Note

While addPreviewMaterialInterface is specific to Preview Material shader networks, removeMaterialInterface affects all render contexts and will remove all UsdShadeInputs returned via UsdShadeMaterial::GetInterfaceInputs(), baking down the values onto all consumer shaders, regardless of render context.

Parameters:
  • material – The material prim

  • bakeValues – Whether or not the current Material inputs values are set on the underlying Shader inputs

Returns:

Whether or not the Material inputs were removed successfully