-
Notifications
You must be signed in to change notification settings - Fork 37
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
Skip missing .mtlx checks #85
Skip missing .mtlx checks #85
Conversation
Until usd-core includes UsdMtlX, skip any 'missing reference' checks related to .mtlx documents.
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, until use-core includes matx this issue will continue, the comment noting that the check should be reinstated in the future is the right move.
Doesn’t this ignore non-MissingReferenceChecker checks? (haven’t tested it yet) |
Argh! You're right @pablode I didn't have a USD MissingReferenceCheck to test. Updated the commit to just skip .mtlx failedChecks. Thanks for catching that |
@pablode does this look good now? |
@@ -120,6 +120,10 @@ def main(): | |||
warnings = checker.GetWarnings() | |||
errors = checker.GetErrors() | |||
failedChecks = checker.GetFailedChecks() | |||
|
|||
# Skip 'missing' .mtlx documents, until usd-core includes UsdMtlX | |||
if failedChecks: |
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.
I don't think this check is needed because the var will always be an array:
https://github.com/PixarAnimationStudios/OpenUSD/blob/f941bce34505c88eaf32dc79f36eab2659b2b1ee/pxr/usd/usdUtils/complianceChecker.py#L994
|
||
# Skip 'missing' .mtlx documents, until usd-core includes UsdMtlX | ||
if failedChecks: | ||
failedChecks = [check for check in failedChecks if '.mtlx' not in check] |
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.
Personally I don't like the coarseness of this check as errors from other rules can get ignored. I would use a regex that additionally contains part of the error string, but it probably does not matter in practice.
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.
Thanks for the suggestions. I'm not regex-savy enough to implement it that way; but since this is just a temporary measure until the USD package on PyPi includes UsdMtlX, are you okay if it's accepted as-is?
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.
Sure 👍
(on a second note: an additional substring check would be just as easy)
Thanks for the review @pablode ! |
And thanks for the fix @crydalch !! |
Until usd-core includes UsdMtlX, skip any 'missing reference' checks related to .mtlx documents.
Discussion raised in #82, would unblock PR #80