Hello all!
For the last couple of days, I’ve been fighting with Deadline to properly post Draft movies to our instance. Given that there’s no up to date documentation on the matter, I felt I could craft a guide to help any newcomer with this matter.
Step 1: Update the Shotgun Plugin to use API Scripts instead of Human Users
-
Navigate to your repository at
/repository/events/Shotgun/Shotgun.py
. -
Update the
GetShotgunForEventPlugin
function with the following code:def GetShotgunForEventPlugin(url, proxy, config): if LoginInfo.ShotgunInstance: try: LoginInfo.ShotgunInstance.find_one("Project", filters=[]) return LoginInfo.ShotgunInstance except: pass name = SafeEncode(config.GetConfigEntry('ShotgunScriptName')) dataController = DeadlineApplicationManager.GetBaseInstance().DataController secretsManagementEnabled = dataController.SecretsManagementEnabled if secretsManagementEnabled: key = SafeEncode(dataController.SecretsManagementController.GetSecret('/events/Shotgun/ShotgunScriptKey')) else: key = SafeEncode(config.GetConfigEntry('ShotgunScriptKey')) if proxy == b"": proxy = None sgObject = shotgun_api3.shotgun.Shotgun(url, name.decode("utf-8"), key.decode("utf-8"), True, proxy, connect=False) LoginInfo.Debug("Connected to Shotgun using API key") return sgObject
Big thanks to @Mayaenite for this snippet I found on this thread Deadline can't authenticate script deadline_integration - #10 by Mayaenite
Step 2: Create a new Script in SG/FPT
- Go to your SG/FPT instance as an admin.
- Click on your profile picture in the top right corner and go to the Scripts page.
- Create a new script. You can use the default API Admin user or adjust the permissions as needed. Also check
Generate Events
to keep track on what the script user is doing. - Copy the API key now since you won’t see it again. If you forget, you’ll need to generate a new one.
Step 3: Configure the SG/FPT integration
-
Open your Deadline Monitor, log in as Power User.
-
Navigate to
Tools > Configure Events...
. -
Select the Shotgun integration and fill out the form with your API user and other required information.
-
Ensure the
Create Version on Submission
flag is set toTRUE
.Here are my settings for reference:
Step 4: Fix the issue where Draft is not publishing the movie to SG/FPT
If you followed the old documentation, you’ll find that Draft is not publishing the movie to SG/FPT with a warning similar to this one despite marking the job as successful:
WARNING: Could not find an associated Shotgun Version ID. The Draft output will not be uploaded to Shotgun.
This is due to not all Extra Info fields the code is referring to are listed in the documentation.
- Go to
Tools > Configure Repository Options...
. - Click on
Job Settings
, then on theJob Extra Properties
tab. - Add the following extra info fields per the screenshot (you might not need all tokens, but better safe than sorry ):
If you have any questions, comments to help improve this guide; or run into any issues, feel free to reach out!