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
2 Likes
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.
1 Like