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-123753 - As a user, I would like my display layers to save with … #2455

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

seando-adsk
Copy link
Collaborator

MAYA-123753 - As a user, I would like my display layers to save with my scene

  • New unit test for Display Layer save/restore of Ufe (non-Maya) items.

…my scene

* New unit test for Display Layer save/restore of Ufe (non-Maya) items.
@seando-adsk seando-adsk added the unit test Related to unit tests (both python or c++) label Jul 4, 2022
@seando-adsk seando-adsk requested a review from ppt-adsk July 4, 2022 17:02
Comment on lines +54 to +55
if 'ufeMembers' not in cmds.listAttr('layer1'):
self.skipTest('Maya DisplayLayer does not support saving/restoring Ufe (non-Maya) members.')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skip test if the Display Layer doesn't have the new "ufeMembers" attribute.

Comment on lines 79 to 86
# Clear and reopen the file.
cmds.file(new=True, force=True)
cmds.file(tempMayaFile, open=True)

# Verify the two objecst (Maya and non-Maya are in layer).
layerObjs = cmds.editDisplayLayerMembers('layer1', query=True, fn=True)
self.assertTrue('|pSphere1' in layerObjs)
self.assertTrue('|stage1|stageShape1,/Sphere1' in layerObjs)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main part of the test. After we save and reload the scene make sure the Ufe item is still in the layer1.

ppt-adsk
ppt-adsk previously approved these changes Jul 4, 2022
cmds.file(new=True, force=True)
cmds.file(tempMayaFile, open=True)

# Verify the two objecst (Maya and non-Maya are in layer).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

objecst

…my scene

* Code review - fixing spelling mistake.
@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 5, 2022
@seando-adsk seando-adsk merged commit b018bcd into dev Jul 5, 2022
@seando-adsk seando-adsk deleted the donnels/MAYA-123753/test_display_layer_ufe_items branch July 5, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge unit test Related to unit tests (both python or c++)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants