-
Notifications
You must be signed in to change notification settings - Fork 203
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-112854 - Fix warnings from USDZ texture import #1589
Conversation
- Do not check folders if not importing USDZ textures - Create sourceImages if no path was given, and there is an active project, and the sourceImage folder is not yet created in that project.
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.
Looks great, Jerry. Do you mind adding a regression test?
@@ -65,6 +66,10 @@ def __testUsdPreviewSurfaceRoundtrip(self, | |||
""" | |||
Tests that a usdPreviewSurface exports and imports correctly. | |||
""" | |||
mark = Tf.Error.Mark() | |||
mark.SetMark() | |||
self.assertTrue(mark.IsClean()) |
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.
This unit test used to report the "sourceImage" error 10 times. Adding TfMarks makes sure the unit test runs clean and proves the issue is fixed.
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 be a good idea to generalize the use of these marks to make sure we never ignore a USD 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.
Great find! And agreed!
image_path = os.path.join(project_path, cmds.workspace(fre="sourceImages")) | ||
# Purposefully erase the sourceimage directory: | ||
if os.path.isdir(image_path): | ||
shutil.rmtree(image_path) |
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.
Specifically testing import into a missing sourceImages folder:
Got the expected license failure on OS/X. So ready for merge. |
Fixes #1588