Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[usdImaging] Fix GprimAdapter::_AddRprim material resolution order to…
… be consistent with other functions. In GetMaterialId (on instancers and gprims) and GprimAdapter::UpdateForTime, we consider the local material binding to take precedence over the instancer material binding. This is consistent with the basic USD rules, where more local material assignments take precedence. However, this was flipped in _AddRprim, which would preferentially take the instancer material binding. For many scene structures, this wasn't causing issues, since only one of the material bindings would be non-empty; or they would point to the same path, which is sketchy but worked in practice. However, this specifically fixes a bug concerning scenes where a point instancer prototype is marked as instanceable, and the material bound to the prototype is inside the instance; in this case, the old code would have a disagreement about whether the material was named /World/path/to/material or /Prototype_N/path/to/material, and so the relationship in hydra would be broken. Fixes PixarAnimationStudios#1626 (Internal change: 2190000)
- Loading branch information