Hello,
I need to trigger some actions whenever a new version is created for tasks on an asset.
Example: do a turntable render every time a new version of the model is published.
Unfortunately the Events Log seems to register only changes to versions (Shotgun_Version_Change) and not new versions created.
I am building a demo of a product for VFX and Feature Animation that I have integrated with Shotgun and this feature is key to show the potential to the prospect clients.
Hello,
I run further tests and I can confirm that adding the Version via Shotgun UI registers the right Shotgun_Version_New event in the log, followed by Change events.
Unfortunately, doing the same via the Python API does not produce the same effect.
This is an excerpt of the code I am using:
Shotgun_Version_New works fine here… and our versions are created from programs.
Did not completely understand - you are saying that when you create the version programmatically, you get no event at all?
When I create the Version from the Shotgun web app I get the New and Change events.
When I create the version using sg.create(“Version”, data) I don’t get any Event at all.
The only solution I found this far is to use sg.create(“EventLogEntry”, eventData) after sg.create(“Version”, data) is successful.
Is this the only way, or is there a way to generate the event automatically on sg.create ?
Are you using script-based authentication? If so, be sure you have the “Generate Events” field selected for that script.
.
If it’s not selected, your script won’t generate events. This was added a long way back to help reduce the amount of events generated by active scripts where the events were not of any consequence.