Hi, I’ve searched around here and have a partial publish working via a script that runs after a render job has completed. I’m having trouble figuring out how to set certain fields. Basically I’m trying to mimic the standalone Publisher. I’d like to set Published File Name, File Type, link it to a task, and a user.
Is there a way to query all the options to set when using shotgrid.create() so I’m not fumbling around? The python crud api documentation doesn’t touch on publishing, just creating versions, which I am doing very well now.
Here is what I have so far:
data = { 'project': {'type': 'Project','id': prjCode},
'path': {'local_path': frame_path, 'name':shotcode}
}
result = sg.create('PublishedFile', data)
We are trying to run without an advanced config so no tank - or is that wrong? Can I run the publisher API with just tk-core?
Thanks!
Anthony
Update: I’m slowing figuring this out. I think I just misplaced where things go in the data dictionary. I’ve managed to get entity working so I’ll keep plugging away.
I would highly suggest to have look at the implementation of the register_publish function in tk-core. If you can steal/mimic that you’ll be in a good spot publishing wise.