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-788 support relative cache to USD in anon layers #3495

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

If the layer does not have a file path when caching to USD, then remember the absolute path and the fact it must be made relative when the layer gets saved. Saving the layer automatically updates the path.

  • Add a cache-to-USD test for relative cache in an anonymous layer.
  • Exposed to Python the function to update the postponed relatve paths in a layer.

If the layer does not have a file path when caching to USD, then remember the
absolute path and the fact it must be made relative when the layer gets saved.
Saving the layer automatically updates the path.

- Add a cache-to-USD test for relative cache in an anonymous layer.
- Exposed to Python the function to update the postponed relatve paths in a layer.
/*! \brief Turns the file paths marked through the call 'markPathAsPostponedRelative' to relative.
*/
MAYAUSD_CORE_PUBLIC
void updatePostponedRelativePaths(const PXR_NS::SdfLayerHandle& layer);
Copy link
Collaborator

@samuelliu-adsk samuelliu-adsk Dec 6, 2023

Choose a reason for hiding this comment

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

I'm not sure about this but would it be better if we give the layerFileName a default value so we can just keep one method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The default value that would get passed is taken from the layer handle, and we have to account for the possibility that the handle is null. It is simpler to have an overload.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Dec 7, 2023
@seando-adsk seando-adsk added the workflows Related to in-context workflows label Dec 7, 2023
@seando-adsk seando-adsk merged commit 8574f82 into dev Dec 7, 2023
11 checks passed
@seando-adsk seando-adsk deleted the bailp/EMSUSD-788/relative-cache-usd branch December 7, 2023 21:46
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.

4 participants