Skip to content

Instantly share code, notes, and snippets.

View kramester's full-sized avatar

Anthony Kramer kramester

View GitHub Profile
@kramester
kramester / GlobalJobPreLoad.py
Last active December 22, 2020 07:28
A modified version of the reformstudios file described here: http://reformstudios.com/2018/08/15/shotgun-bootstrapping-and-deadline/
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
@kramester
kramester / SubmitNukeToDeadline.py
Last active July 13, 2023 11:40
Bootstrapping tk-nuke to deadline instances
# this code needs to be inserted into your SubmitNukeToDeadline script if you are using deadline's submission script.
###### INSERT AFTER THIS LINE, line 1308 in my file
#if groupBatch or dialog.separateJobs.value():
# fileHandle.write(EncodeAsUTF16String("BatchName=%s\n" % batchName))
# Populating environment variables from running Nuke:
# http://developer.shotgunsoftware.com/tk-core/platform.html#sgtk.platform.create_engine_launcher
current_engine = sgtk.platform.current_engine()
launcher = sgtk.platform.create_engine_launcher(