Hi all
I have some chained publish items and I need to extract the publish data from an already published parent item which will affect the publish of my current item. How can I get that info? Id ect
many thanks!
Hi all
I have some chained publish items and I need to extract the publish data from an already published parent item which will affect the publish of my current item. How can I get that info? Id ect
many thanks!
Hi Sam
Here are some methods on the PublishItem
that I think will help you achieve what you are after.
Make sure the plugin running in the parent item store’s it’s result to the properties of the item so that you can retrieve the value in your downstream publish plugin - https://developer.shotgunsoftware.com/tk-multi-publish2/api.html#tk_multi_publish2.api.PublishItem.properties
This three method should help you when navigating the item hierarchy. The parent
property is the one that will most likely be needed, but I thought it was worth mentioning the other two.
https://developer.shotgunsoftware.com/tk-multi-publish2/api.html#tk_multi_publish2.api.PublishItem.children
Does that help?
Thanks
Phil
Hi Phil
Thanks for your response, I am ok with navigating the publish tree
It is more a case of knowing which specific properties are returned after a publish
So I can grab the shotgun id for the published file entity of the parent publish
It’s a little tricky to interrogate this interactively as this is all handled by the base publisher
many thanks!
Sam
please disregard - I logged the parent properties and found the info I needed:
for future ref:
a property called sg_publish_data contains the publish file info
many thanks
Nice find!
There isn’t a specific list of standard properties, it depends on what the plugin decides to store.
The property you found is getting set in this hook:
excellent thanks Phil!