I have a similar issue, I would like the Loader to list my alembic caches, but I put them in another place than the default set up, and the Loader doesn’t to pick them up. Maybe I forgot to update a path used to say to the Loader where to look for the listing ?
Does that make sense ?
Thanks !
Cheers !
Edit by @philip.scadding
I’ve broken this out from this topic into a new one, as although it was regarding the loader, the point of discussion was different.
Yes they are, I can see the alembics on the website.
So basically, I added alembic export for the shot, which is not here by default. I create one alembic per asset in the shot (characters and props). I don’t put them in the Publish folder that Shotgun creates by default though, I put them in alembic/{Shot} folder I create with the schema.
If the caches are published according to the templates.yml settings then maybe the loader hook needs to be adjusted to show alembic caches in the shot tab
So the tk-multi-loader2 app does not make use of templates to valid the paths, unlike the tk-multi-workfiles2 app.
Instead it simply looks for PublishedFile entities that are linked to the relevant entity selected in UI, and that the PublishedFileType of the published files matches the ones configured in the loader settings.
I see, it is probably the wrong type, in the publish plugin I made my item type is “Alembic” but it should be “Alembic Cache” for the Loader to be able to list it.
Rather than start a new thread, I thought I’d post here,
Where you say " * The selected entity in the UI is not properly associated with that PublishedFile entity.", what does this mean specifically? Is it that the publishedFile entity field points to the selected entity? How about associations using different fields? Is that possible?
I’ve hooked up a custom “filter_publishes” hook which is where I imagine I can override the default setup, but I’ve no access to the currently selected entity in the dialog. I have the app instance, but no dialog instance. Is that right? or am I missing something?
Also, I can see in the logs that when I select the custom entity item in the tree, it’s using the following filters to find publishedFiles : Filters: [['entity', 'is', {'type': 'CustomEntity02', 'id': 499}], ['sg_status_list', 'is_not', None]]
I want to change the “entity” field reference here to a custom field.
That is correct, and after quick look at the code, I think it is hardcoded that way, so associations to entities on other fields would not be considered.
Looking at the code I also don’t think that is possible to extract. It sounds like your use case is not something that was probably considered when this was written. If you were passed some PublishedFiles then I suppose you could try and figure out the context from their entity field, but it sounds like in your case there wouldn’t be a PublishedFile linked in the traditional way.
I think it is fair to say that the loader expects publishes to be linked in the normal way and isn’t flexible in its approach.