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 item.properties:
publish_kwargs = {}
publish_kwargs[‘version’] = version_datas[0]
publish_kwargs[‘sg_versions’] = version_datas
item.properties[‘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?
Thanks,
Ben