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

EMSUSD-632 prevent root metadata changes when not targeting root #3398

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk commented Oct 18, 2023

  • Add a applyRootLayerMetadataRestriction helper function to enforce not modifying the root layer metadata when not targeting the root layer.
  • The only restriction applied is about the default prim.
  • Call it from within the applyCommandRestriction helper function.
  • Call it from within the default prim commands.
  • Add unit tests for the rename, parent and group default prim restrictions.
  • Add tests for the default prim commands.

- Add a applyRootLayerMetadataRestriction helper function to enforce not
  modifying the root layer metadata when not targeting the root layer.
- The only restriction applied is about the default prim.
- Call it from within the applyCommandRestriction helper function.
- Call it from within the default prim commands.
- Add unit tests for the rename, parent and group default prim restrictions.
- Add tests for the default prim commands.
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-632/prevent-renaming-root-prim branch from ca96687 to 0d9de70 Compare October 19, 2023 14:48
- Wrap commands for Python.
- Use commands instead of USD calls in AE.
- Allow clearing the default prim with only a stage in addition to with a prim.
@pierrebai-adsk
Copy link
Collaborator Author

The Attribute Editor now uses the command and can be undone.

@pierrebai-adsk
Copy link
Collaborator Author

Once again, the only PF failure is one interactive test in a single PF where a USD file was left behind in the temp folder from e previous PF, that failure can be ignored.

Copy link
Collaborator

@seando-adsk seando-adsk left a comment

Choose a reason for hiding this comment

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

Great work. Just a couple of very minor comments.

plugin/adsk/scripts/AETemplateHelpers.py Outdated Show resolved Hide resolved
test/lib/ufe/testDefaultPrimCmds.py Outdated Show resolved Hide resolved
@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Oct 24, 2023
@seando-adsk seando-adsk merged commit 246d226 into dev Oct 25, 2023
12 of 13 checks passed
@seando-adsk seando-adsk deleted the bailp/EMSUSD-632/prevent-renaming-root-prim branch October 25, 2023 13:47
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