Hello all,
Since the documentation is outdated and things have changed quite a bit, I want to help newcomers by providing a quick guide on how I got everything to work in our environment:
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 on the FPT Community forum for the snippet. More info here.
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.
- 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 ):
Following these steps helped me iron things out between our Deadline and our SG/FPT; If you have any questions, comments or run into any issues, feel free to reach out!