-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow to process USD files to use relative paths when published #70
Allow to process USD files to use relative paths when published #70
Conversation
…lug-in `USDOutputProcessorRemapToRelativePaths` you can enable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i did a simple test and it works.
i left a few comments on the implementation.
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Outdated
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
client/ayon_usd/plugins/publish/integrate_usd_output_processor_remap_relative.py
Show resolved
Hide resolved
…ncement/AY-6953_publish_usd_with_relative_paths # Conflicts: # server/settings/main.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works and while i don't like a few of the code quality solutions this works and is good to go.
Changelog Description
This adds a publish plug-in that is able to remap all paths inside the USD layer to a relative path. As such, by doing so - this means that all published USD files will be using solely relative paths to other published paths.
Additional info
This could allow you to 'archive' your project or share the publishes (while maintaining the project's folder structure for the publishes) and share those files with others, allow them to load it - without having to remap anything and without using an asset resolver.
This uses
UsdUtils.ModifyAssetPaths
which has existed for at least six years in USD, see commit. So should be safe to use nowadays across the board, but for completeness it was added in USD 19.03 so this feature requires USD 19.03+Example result when loading an asset back in:
The top non-relative path is just the 'path' I loaded into Houdini to check the file contents; so that not being relative is entirely correct.
This PR replaces ayon-core PR ynput/ayon-core#957
Testing notes:
ayon+settings://usd/publish/USDOutputProcessorRemapToRelativePaths/enabled
. (It is disabled by default.)Tested: