Overriding nested references issue / behaviour

Hi,

I ran into an issue in overriding references in USD.
I made a small example of this using the “Parking Lot” language to make it understandable.

I have a car with wheels in a parking lot. The car is made out of references to wheels + translation and the car is a references to the car.usd file. Then i have a ParkingLotOverrides which changes the wheels to a different wheel references for that car.

When I do this, the transform overrides of the wheels (define in car.usd) gets lost / overridden by the reference to the wheel (which sets translation to zero).

I checked how this works in a simpler setup where there is no nesting of references and the transform is taken from the ParkingLot layer in this case. Working as I would expect it. So there seems to be a difference in behaviour for how nested vs not nested references and overrides for it are resolved.

I put both samples of the working and incorrect setup into the zip.

Is this a bug or is this intentional behaviour?
If this is considered a bug, I am happy to make a PR with a fix for.

overriding-nested-references.zip (9.9 KB)

Hi @Joachim_Ante , I haven’t had a chance to look at your example yet, but I think your expectations about “overriding” references may be misaligned with the recursive, “encapsulated” nature of USD referencing. Can you have a read of this FAQ entry, and see if it answers your question?

Thanks!