USD Contributions: Allow to publish contributions with Entity URI as version=latest or version=latestDone. - #2002
Conversation
…version=latest or version=latestDone. Do not republish the instance if the output file matches the previous result (as in, previous file also had version=latest and no new contribution were added)
There was a problem hiding this comment.
Pull request overview
Adds configurable URI authoring modes for USD contributions (filepath vs. AYON entity URIs including version=latest and version=latestDone) and avoids generating new publishes when the resulting USD content is unchanged.
Changes:
- Replace the USD contribution “Use AYON Entity URI” boolean with an enum-like setting supporting filepath, explicit entity URI, latest, and latest-approved modes.
- Add settings overrides conversion to migrate legacy boolean values to the new string mode.
- Author new URI variants in USD contribution extractors and skip publishing when the composed layer content matches the previous publish.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| server/settings/publish_plugins.py | Introduces the new contribution path mode setting + updates defaults. |
| server/settings/conversion.py | Migrates legacy boolean overrides to the new URI-mode strings for older versions. |
| client/ayon_core/plugins/publish/extract_usd_layer_contributions.py | Implements URI-mode handling and “skip publish if unchanged” for USD contributions. |
| client/ayon_core/pipeline/entity_uri.py | Extends entity URI construction to allow version=latestDone. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…4-yn-0814-usd-contributions-configure-how-the-uri-is-authored # Conflicts: # server/settings/conversion.py
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
client/ayon_core/plugins/publish/extract_usd_layer_contributions.py:195
- In
filepathmode this uses the rawinstance.data["version"]asversion_name. If a contribution instance uses a negative version to indicate a hero version, this will now try to resolve version-1(and also attempt context resolving with that int), instead of resolvingversion_name="hero"as supported byget_representation_path_by_names, causing path resolution to fail.
# Resolve the layer's published path.
names = {
"project_name": project_name,
"folder_path": folder_path,
"product_name": product_name,
|
Hey, does this requires a specific ayon backend version? I didn't know |
1.15.6 or higher: https://github.com/ynput/ayon-backend/releases/tag/1.15.6 with ynput/ayon-backend#968 |
Would it make sense to reflect it in the Line 11 in ed5350e |
I wouldn't - it would unnecessarily restrict the usage of core against older server just for this one small feature that only is relevant if one were to enable that particular setting (and even then, it'd be a quite uncommon scenario for the user to enable it). Additionally, all logic in core would technically work still, but just the USD resolving of that URL would fail. At this point, I wouldn't say it's a core requirement. |
tadeas-hejnic
left a comment
There was a problem hiding this comment.
Code looks good to me. Tested in Houdini21 (multiple scenarios/combinations) and everything works as expected
|
@iLLiCiTiT ready for merge if you're happy. |
MustafaJafar
left a comment
There was a problem hiding this comment.
2. The setting should affect the result in the USD asset/shot files (and in the department layers?)
Yes.
Extract USD Asset ayon+settings://core/publish/ExtractUSDAssetContribution
Affects the top layer usdAsset/usdShot.
Extract USD Layer ayon+settings://core/publish/ExtractUSDLayerContribution
Affects department layers.
Also, I like how versions of usdAsset and department layers doesn't increment if it matches the last version. so, I can publish my model tons of times but usdAsset and model department layer can remain e.g. at version v001
Changelog Description
USD Contributions: Allow to publish contributions with Entity URI as version=latest or version=latestDone.
Do not republish the instance if the output file matches the previous result (as in, previous file also had version=latest and no new contribution were added)
Additional info
Fix #1954
Settings at:
Testing notes: