OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

usdGeom, usdShade: add validators related to UsdGeomSubsets

Open mattyjams opened this issue 1 year ago • 10 comments

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 (using UsdGeomSubset::ValidateFamily()).
  • GeomSubsets must be authored as direct descendants of an Imageable prim.
  • If the materialBind subset family is authored on an Imageable, it is checked to ensure that it is of a restricted type (either nonOverlapping or partition), 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 type face, since material bindings may only be applied to geometric faces.
  • If a GeomSubset 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.

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

mattyjams avatar Jun 14 '24 19:06 mattyjams

Filed as internal issue #USD-9764

jesschimein avatar Jun 17 '24 16:06 jesschimein

/AzurePipelines run

jesschimein avatar Jun 17 '24 16:06 jesschimein

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jun 17 '24 16:06 azure-pipelines[bot]

Rebased on the current dev branch (c42f6d8a808156bc40734575f6db41b2acccf487) and resolved conflicts in testUsdShadeValidators.cpp.

mattyjams avatar Jul 16 '24 16:07 mattyjams

/AzurePipelines run

jesschimein avatar Jul 16 '24 16:07 jesschimein

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 16 '24 16:07 azure-pipelines[bot]

/AzurePipelines run

jesschimein avatar Jul 18 '24 19:07 jesschimein

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 18 '24 19:07 azure-pipelines[bot]

/AzurePipelines run

jesschimein avatar Jul 25 '24 22:07 jesschimein

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 25 '24 22:07 azure-pipelines[bot]