Tk-multi-publish2 : PublishedFile, custome field and

Hi there

I’m trying to link several created versions to a published item in MayaSessionPublishPlugin.

Basically, during the publish, an external method creates playblasts, images etc, uploads it them to Shotgun and returns the datas dictionaries from shotgun.create(‘Version’…).

I then clean the dictionnary to keep something simple:
version_datas = [{‘type’:‘Version’, ‘id’:1047}, {‘type’:‘Version’, ‘id’:1048}]

I created a multi entity field (versions) on PublishedFile called ‘sg_versions’.

During the publish process, I try to add the versions to the

publish_kwargs = {}
publish_kwargs[‘version’] = version_datas[0]
publish_kwargs[‘sg_versions’] = version_datas[‘publish_kwargs’] = publish_kwargs

Everything works fine for the field ‘version’ and the first created version is linked to the publishedFile, but the field sg_versions remains empty.

Is there something I’m doing wrong?


Can I have some help on this?

I’m trying to use the same technique to input downstream_published_files fields, and it does not work at all.

[{‘type’:‘PublishedFile’, ‘id’:XXXX}]

Using[‘downstream_published_files’] does not work either.