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-280 import relative texture #3257

Closed

Conversation

pierrebai-adsk
Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk commented Aug 2, 2023

Refactor out the texture resolution code into a common reusable function:

  • Add a file system function to make a path absolute but relative to the project folder.
  • Add code to make the texture path relative to the project.
  • Use the common texture import code for materialX.
  • Split the texture handling into multiple helper functions to make each one clearer.
  • Warn if a USDZ archive is imported without the required corresponding flag to extract textures.
  • Properly detect absolute or relative path in automatic mode.

Add import command flag:

  • Add the "importRelativeTextures" flag to the mayaUSDImport command.
  • Added a "none" relative textures mode for backward compatibility that leave all file names alone.
  • Made it the default for the command.
  • Add handling of the flag.
  • Add a "importRelativeTextures" option to the import job arguments class.
  • Add handling and validation of the option.
  • Wrap the option for Python.
  • Update the import command documentation.
  • Use the job args option in the import code.

Add some unit tests.

@pierrebai-adsk pierrebai-adsk added adsk Related to Autodesk plugin import-export Related to Import and/or Export labels Aug 2, 2023
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-280/import-relative-textures branch from 1e6f462 to 70fc679 Compare August 2, 2023 19:35
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-280/import-relative-textures branch from 70fc679 to f9ea37f Compare August 2, 2023 20:49
@pierrebai-adsk pierrebai-adsk changed the title EMSUSD-280 import relative texture WIP EMSUSD-280 import relative texture Aug 3, 2023
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-280/import-relative-textures branch from f9ea37f to f7c2e29 Compare August 3, 2023 14:26
Refactor out the texture resolution code into a common reusable function:
- Add a file system function to make a path absolute but relative to the project folder.
- Add code to make the texture path relative to the project.
- Use the common texture import code for materialX.
- Split the texture handling into multiple helper functions to make each one clearer.
- Warn if a USDZ archive is imported without the required corresponding flag to extract textures.
- Properly detect absolute or relative path in automatic mode.

Add import command flag:
- Add the "importRelativeTextures" flag to the mayaUSDImport command.
- Added a "none" relative textures mode for backward compatibility that leave all file names alone.
- Made it the default for the command.
- Add handling of the flag.
- Add a "importRelativeTextures" option to the import job arguments class.
- Add handling and validation of the option.
- Wrap the option for Python.
- Update the import command documentation.
- Use the job args option in the import code.

Add some unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin import-export Related to Import and/or Export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants