AWS Thinkbox Discussion Forums

How to Properly Set the Shotgun / Shotgrid / Flow / SG /FPT Event Integration

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

  1. Navigate to your repository at /repository/events/Shotgun/Shotgun.py.

  2. 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

  1. Go to your SG/FPT instance as an admin.
  2. Click on your profile picture in the top right corner and go to the Scripts page.
  3. Create a new script. You can use the default API Admin user or adjust the permissions as needed.
  4. 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

  1. Open your Deadline Monitor, log in as Power User.

  2. Navigate to Tools > Configure Events....

  3. Select the Shotgun integration and fill out the form with your API user and other required information.

  4. Ensure the Create Version on Submission flag is set to TRUE.

    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.

  1. Go to Tools > Configure Repository Options....

  2. Click on Job Settings, then on the Job Extra Properties tab.

  3. Add the following extra info fields per the screenshot (you might not need all tokens, but better safe than sorry :wink: ):

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!

2 Likes
Privacy | Site terms | Cookie preferences