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-127393 allow USD ref to be relative #2855

Merged
merged 5 commits into from
Feb 16, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

  • Refactor the Python helper to handle the relative-path UI in file dialogs.
  • Make it more generic by abstracting to which file the path will be relative to, the label of the UI and the option var used.
  • Add makePathRelativeTo function to UsdMayaUtilFileSystem to make any file path relative to a given directory.
  • Add requireUsdPathsRelativeToEditTargetLayer function to verify if USD ref paths should be relative.
  • Make the USD context menu use the new relative ref UI and functions.
  • Refactor its code a bit to make reading the generated scripts easier.

- Refactor the Python helper to handle the relative-path UI in file dialogs.
- Make it more generic by abstracting to which file the path will be relative to, the label of the UI and the option var used.
- Add makePathRelativeTo function to UsdMayaUtilFileSystem to make any file path relative to a given directory.
- Add requireUsdPathsRelativeToEditTargetLayer function to verify if USD ref paths should be relative.
- Make the USD context menu use the new relative ref UI and functions.
- Refactor its code a bit to make reading the generated scripts easier.
vlasovi
vlasovi previously approved these changes Jan 30, 2023
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.

Nice work overall, just a few things to fixup.

- Remove unnecessary MEl scripts.
- Call Python directly instead of through MEL.
- Fix many comment typos.
- Remove debug print statement.
vlasovi
vlasovi previously approved these changes Jan 30, 2023
The MString's isEmpty function does not exists in Maya 2022... use the length function instead.
Also, split the tool-tip on multiple lines for readability.
@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Feb 6, 2023
@seando-adsk seando-adsk merged commit 8f6e24d into dev Feb 16, 2023
@seando-adsk seando-adsk deleted the bailp/MAYA-127393/relative-ref-file branch February 16, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin 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.

4 participants