OpenUSD
OpenUSD copied to clipboard
usdUtils: add a GeomSubsetsChecker for validating UsdGeomSubsets with usdchecker
This new rule checker can be used to validate various aspects of UsdGeomSubset
s:
-
GeomSubset
s must be authored as direct children of anImageable
prim. - The set of all subset family names is fetched for each subset parent
Imageable
, and each family is checked for validity (usingUsdGeomSubset::ValidateFamily()
). - If the
materialBind
subset family is authored on anImageable
, it is checked to ensure that it is of a restricted type (eithernonOverlapping
orpartition
), since it is invalid for an element of geometry to be bound to multiple materials. - If a subset has authored material bindings but no authored subset family name, it is suggested that the family name should be set to
materialBind
to ensure that the material bindings are visible to renderers. The material bindings will have no effect otherwise.
I have run the unit tests successfully with the changes here, but they depend on fixes and improvements to UsdGeomSubset::ValidateFamily()
from #2733.
- [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-8839
Rebased on the current dev branch to pick up the fixes from #2733 / 6575a265a73de63a50559b22626ee723e3ba2059.
Thanks, @mattyjams ! We are actually IP on adding new elementTypes point
and edge
for use initially in UsdPhysics, so in your checks relating to materialBind
family, it would be good to also validate that the elementType
is face
?
Thanks, @mattyjams ! We are actually IP on adding new elementTypes
point
andedge
for use initially in UsdPhysics, so in your checks relating tomaterialBind
family, it would be good to also validate that theelementType
isface
?
Sounds good, thanks @spiffmon! I just pushed an update that checks that elementType=face
for any subsets belonging to the materialBind
family.
Rebased to resolve merge conflicts.
Rebased and resolved merge conflicts.
Freshening with a rebase on the current dev branch (35dbce15eb3dc6c805b65135d911c246716fd192).
I caught up with @tallytalwar about this and I'm going to take a crack at re-formulating this in terms of the new UsdValidator
framework in C++ instead.
Closing this in favor of #3123, which implements the same checks but in the new C++ validation framework...