-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-128503 - Improve roundtripping of GeomSubsets #3135
MAYA-128503 - Improve roundtripping of GeomSubsets #3135
Conversation
We have two sources of GeomSubsets in Maya: - Shaded faces - Explicitly create component tags In USD land GeomSubsets can be modified in ways that have no Maya equivalent: - We can change the family name - We can assign a material So when importing/exporting USD data, we need to add just enough info that all Maya and USD sepcificities are accounted for and correctly handled. The unit test will be quite informative.
I'll wait for the code update and answers about the small details, otherwise LGTM. |
def testGeomSubsetRoundtripCollectionBased(self): | ||
"""Test that GeomSubsets numbers stay under control when rountripping | ||
with collection based material assignemnt""" | ||
self.CommonGeomSubsetRoundtrip(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the material checks are done with ComputeBoundMaterial
work with both assignment methods. The contents of the USDA files will be slightly different since one will use collections based assignment.
@@ -449,6 +449,12 @@ bool UsdMayaTranslatorMaterial::AssignMaterial( | |||
// identifier is the UUID. | |||
subsetRoundtrippingInfo[UsdMayaGeomSubsetTokens->MaterialUuidKey] | |||
= JsValue(depNodeFn.uuid().asString().asChar()); | |||
} else { | |||
TF_RUNTIME_ERROR( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be necessary to also have an error for the iterator check above? IDK what are the semantics for the find to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will revisit the error handling today as this seem a bit fragile.
…ove_subset_roundtripping
@seando-adsk , ready for merge as the 3 preflight failures for Maya 2024 are known. |
We have two sources of GeomSubsets in Maya:
In USD land GeomSubsets can be modified in ways that have no Maya equivalent:
So when importing/exporting USD data, we need to add just enough info that all Maya and USD sepcificities are accounted for and correctly handled.
The unit test will be quite informative.