Skip to content
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

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

pierrebai-adsk
Copy link
Collaborator

  • 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.
@pierrebai-adsk pierrebai-adsk requested a review from ppt-adsk March 7, 2022 21:25
@pierrebai-adsk pierrebai-adsk added adsk Related to Autodesk plugin enhancement New feature or request labels Mar 8, 2022
@pierrebai-adsk
Copy link
Collaborator Author

The only PF failure is the Linux interactive on GPU which is currently known to fail due to image comparison.

Copy link
Collaborator

@ppt-adsk ppt-adsk left a 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.

@@ -372,6 +372,21 @@ MDagPath ufeToDagPath(const Ufe::Path& ufePath)
);
}

bool isMayaRootPath(const Ufe::Path& ufePath)
Copy link
Collaborator

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);

@@ -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.
Copy link
Collaborator

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.
Copy link
Collaborator

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.
@pierrebai-adsk
Copy link
Collaborator Author

Again, image diff on linux error. We can ignore, unrelated to this PR.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Mar 8, 2022
@ppt-adsk ppt-adsk merged commit 881f6d2 into dev Mar 9, 2022
@ppt-adsk ppt-adsk deleted the t_bailp/MAYA-122014/dup-to-maya-non-root branch March 9, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin enhancement New feature or request ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants