It was a Discord talk, then I realized it would be useful to save it for future search, so here is a copy :
.
A → Yes, usually on integrate
… … … Potentially also on ‘scene increments’ with future workfiles API, since that’d essentially trigger B.
B → Yes, workfile entity info.
C → No.
D → No.
E → No.
.
I would add that [DB write also happens] whenever some Sync process is going on, like Ftrack/Shotgrid/Kitsu syncing back to Ayon, Ftrack is done via events, so if you have plugins/actions that may trigger certain events, there may be DB updates
.
Yul:
Thanks Roy and Juan
So, it means this :
Good news : even if artists manually destroy stuff in DCC workfiles, for example loaded products, we can still load them again without getting double entry in DB.
Bad news : there is no centralized database data that can answer this question : in which workfiles did we Load the product Starship v014 ?
.
Well, if you have published from that scene… then for maya, fusion and Houdini we collect input versions at the time of publishing. Not sure if we also collect all that are in the Workfile actually, I vaguely recall we did already but if not, would be trivial to add across all DCCs…
As such, publishes should have stored links to loaded versions.
The bad news there is that currently there isn’t any out of the box UI that will really display it for you
.
A feature request was created here :
https://feedback.ayon.app/p/allow-to-find-in-which-workfiles-some-products-have-been
After exploring AYON links for a bit.
I wonder if it’s possible to query the current workfile entity and create a link to the product versions on loading.
So, I can select workfile entity when defining a link type.
I wonder, what’d be best version -> workfile or representation -> workfile.
Note, links works with entities, if something doesn’t have an entity record in DB such as publish instance in a scene, then it won’t be possible to create a link.
Links can then be visualized in node graph addon (However, it may need some love to ensure it works as expected).
Apparently, I can do this This example works but it’s far from perfect.
"""
Create a link between every version entity loaded in
the scene to current workfile directory.
This script assumes you have added the following link type
in your project anatomy:
```
{
"style": "solid",
"link_type": "loaded_versions",
"input_type": "version",
"output_type": "workfile",
"color": "#ff6d1f"
}
```
"""
import os
from collections import defaultdict
This file has been truncated. show original
And, I can see the result in pgAdmin.