Collect Input Versions: Convert hero version links to their real version equivalents#1741
Conversation
|
…from-hero-to-real-version
…eal-version' of https://github.com/BigRoy/ayon-core into 1634-yn-0359-collect-input-link-versions-from-hero-to-real-version
…from-hero-to-real-version
|
not sure what's wrong, but it doesn't add the data. I'll check directly in database as I am not sure if I am looking at the correct version via GraphQL |
The If you remain stuck; share a publish report please :) |
|
I have 1.14.3 and latest ayon-python-api publish-report-260312-15-29.json I've added some debug logs to see the links being created but they are missing EDIT: I am also checking this directly in database table links, data field is empty. |
Are these hero versions that you have loaded as inputs in your scene? |
|
Looks good but needs testing. Can you create issue in ayon_api to add |
…cause it returns a generator, so the second use yielded nothing. So store them in `list` to fix + Add type hints to avoid issues
|
Thanks, reproduced - I seemed to have made a bug on my last cleanup. Essentially I iterated over the result of Also added some type hints to hopefully capture this quicker next time around. @LiborBatek @antirotor, sorry. Please try again. |
…from-hero-to-real-version
antirotor
left a comment
There was a problem hiding this comment.
Can confirm it works now - case of simple layout with loaded hero version of referenced model from Maya. Confirmed using SQL client.
|
@iLLiCiTiT please review if you're happy with the code and merge if all ok. |
…from-hero-to-real-version

Changelog Description
Collect Input Versions: Convert hero version links to their real version equivalents
Additional info
Fix #1634
Requires latestayon-python-apiso that public facingcreate_linkssupports thedataargument, see: ynput/ayon-python-api#308Hero versions are now created as links to the real version entity ids. It stores metadata on the link that it was originally a hero version together with the hero version id.
{ "data": { "hero": true, "hero_version_id": "fe3162a05b2711f099b83c0af39c4c02" }, "entityId": "5c575e305cc411f090013c0af39c4c02", "linkType": "generative" }Regular versions would still be collected without data:
{ "data": {}, "entityId": "7251106f18e311f197b060cf848a5b16", "linkType": "reference" }Testing notes:
You can validate the metadata via e.g. a GraphQL in the GraphQL explorer. Here's one:
This would list all products' latest versions (only those with links) under folder
/apps/mayaintestproject. That should make for a relatively limited view that shows relevant links.You'll need server 1.14.2 or higher to be able to query it - due to needing this PR: ynput/ayon-backend#867