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-111329: Fix echouer to import none Usdz ( *.usd, *.usda ) files when "USDX Texture import" option was enabled. #1392

Merged

Conversation

HamedSabri-adsk
Copy link
Contributor

This PR fixes the issue when none packaged usd files (e.g *.usd, *.usda ) fail to import when "USDX Texture import" option is enabled.

Steps to reproduce:

- Go to File > Import.
- Select a regular USD file.
- In the import options enable USDZ Texture import.
- Import the file and notice in the script editor is shows the results path line, but nothing comes in.
- Try the import again with the USDZ Texture import option disabled and notice that the file comes in.

…o come in to Maya when USDX Texture import option was enabled.
@HamedSabri-adsk HamedSabri-adsk added the workflows Related to in-context workflows label May 5, 2021
Comment on lines +264 to 267
// check if "USDZ Texture import" option is checked and the archive in question is a USDZ.
if (mArgs.importUSDZTextures && stage->GetRootLayer()->GetFileFormat()->IsPackage()) {
if (mArgs.importUSDZTexturesFilePath.length() == 0) {
MString currentMayaWorkspacePath = UsdMayaUtil::GetCurrentMayaWorkspacePath();

Choose a reason for hiding this comment

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

@ysiewappl somehow Github wouldn't let me add you as a reviewer.

I adjusted the logics here to not be too intrusive when importing none USDZ files even when "USDZ Texture import" option is enabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

The change makes sense. Thanks @hamedsabri !

@HamedSabri-adsk HamedSabri-adsk changed the title MAYA-111329: Fix failing to import none Usdz ( *.usd, *.usda ) files when "USDX Texture import" option was enabled. MAYA-111329: Fix echouer to import none Usdz ( *.usd, *.usda ) files when "USDX Texture import" option was enabled. May 5, 2021
@HamedSabri-adsk HamedSabri-adsk added the ready-for-merge Development process is finished, PR is ready for merge label May 6, 2021
@kxl-adsk kxl-adsk merged commit 7b77cde into dev May 7, 2021
@kxl-adsk kxl-adsk deleted the sabrih/MAYA-111329/import_none_usdz_format_failed_to_import branch May 7, 2021 00:18
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 workflows Related to in-context workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants