#4249·OpenUSD

ComputeBoundMaterials returns another stage's material for matching prim paths

Author: dvasquezlopezCreated Sep 28, 2026Updated Sep 29, 2026

ComputeBoundMaterials() returns the first stage's material for an object in a different stage when both objects have the same prim path. Individual lookups resolve each binding correctly. This could associate an asset with another asset's material when resolving bindings across stages.

This CPU-only repro was verified on Ubuntu 24.04, Python 3.12.3 and OpenUSD 26.8:

bash
USD_REPRO_DIR=$(mktemp -d /tmp/usd-materials.XXXXXX)
python3 -m venv "$USD_REPRO_DIR" &&
"$USD_REPRO_DIR/bin/python" -m pip install 'usd-core==26.8' &&
"$USD_REPRO_DIR/bin/python" - <<'PY'
from pxr import Usd, UsdGeom, UsdShade

stages, prims = [], []
for name in ('Red', 'Blue'):
    stage = Usd.Stage.CreateInMemory()
    prim = UsdGeom.Cube.Define(stage, '/Object').GetPrim()
    material = UsdShade.Material.Define(stage, '/' + name)
    UsdShade.MaterialBindingAPI.Apply(prim).Bind(material)
    stages.append(stage)  # Keep both stages alive.
    prims.append(prim)

individual = [UsdShade.MaterialBindingAPI(p).ComputeBoundMaterial()[0] for p in prims]
combined, _ = UsdShade.MaterialBindingAPI.ComputeBoundMaterials(prims)
print('Individual:', [str(m.GetPath()) for m in individual])
print('Combined:  ', [str(m.GetPath()) for m in combined])
PY

Observed output; both calls should return ['/Red', '/Blue']:

Individual: ['/Red', '/Blue']
Combined:   ['/Red', '/Red']

Source: PixarAnimationStudios/OpenUSD