I expected I would not be able to reference inactive prims, and this test case actually came about accidentally.
In the following, I have a scene and a library. In the library, I have a sphere that I reference into the scene. Then I or someone accidentally pruned/deactivated the library.
My understanding was that the descendants of a deactivated prim(library) don’t get traversed. So I expected the Local/Layer opinion of “active=false” to be evaluated first, so the stage effectively wouldn’t have the library prim or anything below it. Then I thought the Reference in the scene to basically be invalid. But in Houdini, I see my sphere. In my real scene where the accident happened, it also rendered fine - i.e. referencing a descendant of a deactivated prim.
How/why is this reference still working?
#usda 1.0
(
endTimeCode = 1001
framesPerSecond = 24
metersPerUnit = 1
startTimeCode = 1001
timeCodesPerSecond = 24
upAxis = "Y"
)
def Xform "a"
{
def Xform "scene"
{
def Xform "b"
{
def Xform "c"
{
def "ref_sphere" (
prepend references = </a/library/d/e>
)
{
}
}
}
}
def Scope "library" (
active = false
)
{
def Xform "d"
{
def Xform "e"
{
def Sphere "my_sphere"
{
float3[] extent = [(-1, -1, -1), (1, 1, 1)]
double radius = 1
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
}
}
}
}
}