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

Fix texture writer path resolver to work relative to final export path #1028

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

dgovil
Copy link
Collaborator

@dgovil dgovil commented Dec 23, 2020

This PR fixes an issue where the texture writer in the exporter expects the stage being written to be the final export path.
.usdz files however switch the exporter to write to a temporary location. Therefore prim writers etc do not have access to the final path for their logic. This change makes it so that the fileName is part of the export args, to be available to the rest of the exporter code base.

This addresses the issue in #972 and should make usdz exports once again compatible with AR QuickLook on iOS, and preview on Mac.

Also I realize everyone is on, or will be on, holiday break, so no rush on responding to this PR. I just wanted to post it before our break starts too. Hope everyone has a great holiday season.

@dgovil
Copy link
Collaborator Author

dgovil commented Dec 23, 2020

Oops, missed some arnold attributes when cleansing the maya file. Updated PR with those removed.

Copy link
Contributor

@mattyjams mattyjams left a comment

Choose a reason for hiding this comment

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

The changes make sense to me, but I think we want to try to keep the userArgs dictionary in a state where it contains the exact arguments the user passed in. I had a suggestion of adding a new public method to UsdMayaJobExportArgs that would hopefully make that work. Let me know what you think!

lib/mayaUsd/commands/baseExportCommand.cpp Outdated Show resolved Hide resolved
lib/mayaUsd/commands/baseExportCommand.cpp Outdated Show resolved Hide resolved
lib/usd/translators/shading/usdFileTextureWriter.cpp Outdated Show resolved Hide resolved
…h rather than any temp paths the exporter sets.

Address Autodesk#972
@dgovil dgovil force-pushed the resolve_final_filename_issue972 branch from 63d63f4 to dcd4094 Compare January 5, 2021 21:48
@dgovil dgovil force-pushed the resolve_final_filename_issue972 branch from dcd4094 to ab1aece Compare January 6, 2021 01:01
Copy link
Contributor

@mattyjams mattyjams left a comment

Choose a reason for hiding this comment

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

Looks good to me now! Thanks @dgovil!

@kxl-adsk kxl-adsk merged commit d379bfc into Autodesk:dev Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants