-
Notifications
You must be signed in to change notification settings - Fork 202
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-122014 support duplicate to Maya to non root #2166
Conversation
pierrebai-adsk
commented
Mar 7, 2022
- Add isMayaRootPath helper function.
- Use the destination path when duplicating as Maya.
- Add a unit test.
- Add isMayaRootPath helper function. - Use the destination path when duplicating as Maya. - Add a unit test.
The only PF failure is the Linux interactive on GPU which is currently known to fail due to image comparison. |
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 fix! Minor tweaks only.
lib/mayaUsd/ufe/Utils.cpp
Outdated
@@ -372,6 +372,21 @@ MDagPath ufeToDagPath(const Ufe::Path& ufePath) | |||
); | |||
} | |||
|
|||
bool isMayaRootPath(const Ufe::Path& ufePath) |
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.
Could be simply
return (ufePath.runTimeId() == g_MayaRtid) && (ufePath.size() == 1);
lib/mayaUsd/ufe/Utils.h
Outdated
@@ -125,6 +125,10 @@ Ufe::PathSegment dagPathToPathSegment(const MDagPath& dagPath); | |||
MAYAUSD_CORE_PUBLIC | |||
MDagPath ufeToDagPath(const Ufe::Path& ufePath); | |||
|
|||
//! Verify if the UFE path is the Maya root. |
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.
Hmmm, wonder about the name. In Maya the root node is called world, and it's called that way in Maya commands and documentation as well. Perhaps call it isMayaWorldPath()?
self.assertEqual(1, len(xformNames)) | ||
xformName = xformNames[0] | ||
|
||
# Duplicate USD data as Maya data, placing it under the root. |
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.
Comment is incorrect.
- Name of the function. - Comments in the test.
Again, image diff on linux error. We can ignore, unrelated to this PR. |