Skip to content

Instantly share code, notes, and snippets.

View kramester's full-sized avatar

Anthony Kramer kramester

View GitHub Profile
reformstudios /
Last active March 23, 2020 19:49
This script solves the problem of running multiple deadline slaves on one workstation and then attempting to bootstrap a Shotgun pipeline config as part of a deadline task. The script does this by setting a unique path for each slave's Shotgun session (using the SHOTGUN_HOME environment variable)Save this script to your deadline repo's 'custom/p…
from System.IO import *
from Deadline.Events import *
from Deadline.Scripting import *
import os
def set_slave_specific_shotgun_home_path(deadlinePlugin):
In situations where you have multiple deadline Slaves on a single rendernode
Shotgun may fail to bootstrap a pipelineconfig if more than one slave
cmcginty /
Last active September 21, 2021 23:12
Perforce Python trigger to reject unmodified files and new code with TAB indents (instead of spaces).

This is a working example of a Perforce submit-change trigger that can run checks on new files and new or modified lines of code.

Tested on Python2 in Linux and Windows. It does not require the P4Python API, which would probably be a little cleaner, but makes it less portable.

The install instructions are below in the Python file. Before using, the hard-coded P4 user value builds must be created on your server, or changed to a valid user. To prevent having to set the user password in the script, the builds user must be part of a group with the Timeout field set to unlimited to allow for the user to remain logged in on the server.