PrefixingSceneIndex does not prefix SdfPathExpressions
Author: JamesPedFoundryCreated Sep 15, 2026Updated Sep 15, 2026
Description
We've noticed that the prefixing scene index prefixes all SdfPaths and SdfPathArrays, but does not prefix any SdfPathExpressions.
Issue
This can cause problems when using these for light/shadow linking which require SdfPathExpressions to be stored within the membershipExpression data source.
Reproduction:
Hard to provide a scene, but adding the UsdImagingIndices with a prefix to the RenderIndex within a scene with valid light linking is the best way to see this behaviour.
e.g:
sceneIndices = std::make_unique<UsdImagingSceneIndices>(UsdImagingCreateSceneIndices(info));
m_usdSceneIndex = sceneIndices->finalSceneIndex;
renderIndex->InsertSceneIndex(m_usdSceneIndex, SdfPath("/SomePrefix"));Image from Usd
Attached usda file (in a zip for Github reasons) - tested with hdprman: lightLinkingPrman.zip
Results: With Prefix on the left, without prefix on the right (Expected):
Source: PixarAnimationStudios/OpenUSD