[tk-multi-publish2] pass data between plugins

I have 2 SG desktop publish plugins:

  • one that will create a Version of auto-comped CG renders
  • second to publish the source CG renders to SG.

Both with additional custom functions etc.

Is it possible to get the Version data from the first plugin and pass to the publish plugin to link the Version to the Publish?

Thanks!

2 Likes

I believe this is the route to go:

In the finalize method of my Version submission I could access item.properties.sg_publish_data

3 Likes

Yes correct, you would store any information you want to access later on on a property.

I usually call these item.properties[“sg_version”] or item.properties[“sg_publish”].

2 Likes

Yeah it doesn’t necessarily have to be in the finalize method I don’t think, but your first plugin needs to store the result to the item’s properties, and the second plugin needs to run after the first, and then it can access the stored values on the item.

1 Like

Thank all,

Phil - I ended up using it in the publish method so you are correct here about it not being specific to finalize

Works a charm

2 Likes