usdGeom, usdShade: add validators related to UsdGeomSubsets
The validators added in usdGeom and usdShade here check various aspects of UsdGeomSubsets:
- The set of all subset family names is fetched for an
Imageable, and each family is checked for validity (usingUsdGeomSubset::ValidateFamily()). -
GeomSubsets must be authored as direct descendants of anImageableprim. - If the
materialBindsubset family is authored on anImageable, it is checked to ensure that it is of a restricted type (eithernonOverlappingorpartition), since it is invalid for an element of geometry to be bound to multiple materials. Those subsets are also checked to ensure that they are of element typeface, since material bindings may only be applied to geometric faces. - If a
GeomSubsethas authored material bindings but no authored subset family name, it is suggested that the family name should be set tomaterialBindto ensure that the material bindings are visible to renderers. The material bindings will have no effect otherwise.
This replaces #2739, reworking what was there in the older compliance checker Python framework into the new C++ validation framework.
- [x] I have verified that all unit tests pass with the proposed changes
- [x] I have submitted a signed Contributor License Agreement
Filed as internal issue #USD-9764
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
Rebased on the current dev branch (c42f6d8a808156bc40734575f6db41b2acccf487) and resolved conflicts in testUsdShadeValidators.cpp.
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).