Skip to content

USD Contributions: Allow to publish contributions with Entity URI as version=latest or version=latestDone. - #2002

Open
BigRoy wants to merge 3 commits into
developfrom
1954-yn-0814-usd-contributions-configure-how-the-uri-is-authored
Open

USD Contributions: Allow to publish contributions with Entity URI as version=latest or version=latestDone.#2002
BigRoy wants to merge 3 commits into
developfrom
1954-yn-0814-usd-contributions-configure-how-the-uri-is-authored

Conversation

@BigRoy

@BigRoy BigRoy commented Aug 14, 2026

Copy link
Copy Markdown
Member

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:

ayon+settings://core/publish/ExtractUSDAssetContribution/use_ayon_entity_uri
ayon+settings://core/publish/ExtractUSDLayerContribution/use_ayon_entity_uri
image image

Testing notes:

  1. Configuring asset/shot entity URI behavior should work.
  2. The setting should affect the result in the USD asset/shot files (and in the department layers?)
  3. Replacing the URI when switching the setting should work so that it swaps out the version one, or the entity URI one, etc.

…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)
@BigRoy
BigRoy requested review from MustafaJafar and tadeas-hejnic and a lite review from Copilot August 14, 2026 17:49
@BigRoy BigRoy self-assigned this Aug 14, 2026
@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Aug 14, 2026
@ynbot ynbot added the size/S label Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread server/settings/publish_plugins.py
Comment thread server/settings/publish_plugins.py
Comment thread client/ayon_core/plugins/publish/extract_usd_layer_contributions.py
BigRoy and others added 2 commits August 19, 2026 12:37
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 filepath mode this uses the raw instance.data["version"] as version_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 resolving version_name="hero" as supported by get_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,

@MustafaJafar

Copy link
Copy Markdown
Member

Hey, does this requires a specific ayon backend version? I didn't know latestDone is implemented already.

@BigRoy

BigRoy commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Hey, does this requires a specific ayon backend version? I didn't know latestDone is implemented already.

1.15.6 or higher: https://github.com/ynput/ayon-backend/releases/tag/1.15.6 with ynput/ayon-backend#968

@MustafaJafar

MustafaJafar commented Aug 19, 2026

Copy link
Copy Markdown
Member

Hey, does this requires a specific ayon backend version? I didn't know latestDone is implemented already.

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 package.py?

ayon_server_version = ">=1.8.4,<2.0.0"

@BigRoy

BigRoy commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Would it make sense to reflect it in the package.py?

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 tadeas-hejnic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good to me. Tested in Houdini21 (multiple scenarios/combinations) and everything works as expected

@BigRoy
BigRoy requested a review from iLLiCiTiT August 20, 2026 12:04
@BigRoy

BigRoy commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

@iLLiCiTiT ready for merge if you're happy.

@MustafaJafar MustafaJafar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-0814: USD Contributions: configure how the URI is authored

5 participants