Hi, I was wondering if there was any way to send work item attributes back when cooking with a service. What I'm trying to do is cache some geometry + store some stats about that cache as PDG attributes.
When using out of process cooking there is this (from docs):
frompdgjsonimportWorkItem# create WorkItem object from the data serialized to `$PDG_TEMP/data/workitem.json`work_item=WorkItem.fromJobEnvironment()# read attrib values from the running work itemval=work_item.attribValue('myintattrib')# Send data back to PDG work item via network callswork_item.setStringAttrib('runtime_attrib','test value',0)work_item.addOutputFile('/tmp/myoutput.txt')
Cheers AslakKS, I wasn't quite understanding the difference between a pdgjson.WorkItem and pdg.WorkItem until having a play with your example scene but now it makes sense they're quite different depending on whether or not you're using services. My initial problem is solved now, thanks,