Right-Click in Deadline

Discussion and Support of Deadline, the Render Management System
JokerMartini
Posts: 44
Joined: Tue Apr 10, 2012 3:05 pm

Right-Click in Deadline

Postby JokerMartini » Tue Sep 12, 2017 9:10 pm

I've been searching around the docs and looking for some information on how to create a custom Right-Click menu script for Deadline.
My goal is to make it so a user can right-click on a single or multiple jobs in Deadline and using the ShotgunTaskID stored in the JobExtraInfo0 slot to launch chrome and navigate the user to the Task in shotgun.

eamsler
Posts: 1666
Joined: Thu Dec 16, 2010 1:02 pm
Location: Winnipeg, MB, Canada

Re: Right-Click in Deadline

Postby eamsler » Wed Sep 13, 2017 10:43 am

Oh, we've got an internal dev script that'll get you pretty close.

There's two parts: One, you need to drop the script into "[repo]\custom\scripts\Jobs". The next is you need to enable it for multiple jobs in the "Configure Script Menus" section of the "Tools" menu:
2017-09-13 10_40_37-Configure Script Menus.png
2017-09-13 10_40_37-Configure Script Menus.png (32.75 KiB) Viewed 28 times


Here's the script with a bunch of secret sauce removed:

Code: Select all

'''
Created July 27, 2016 by Justin Blagden
'''
import urllib
import urllib2
import webbrowser
from Deadline.Scripting import MonitorUtils, RepositoryUtils
from DeadlineUI.Controls.Scripting.DeadlineScriptDialog import DeadlineScriptDialog

def __main__():
    query_fields = {'text': 'hi there!'}
    encoded_query = urllib.urlencode(query_fields)
    request = urllib2.Request(url, encoded_query)
    response = urllib2.urlopen(request)

    #Open a web browser
    webbrowser.open_new_tab(response.geturl())
Edwin Amsler
Head of Support
Thinkbox Software Inc
+1-866-419-0283 ext 804

Winnipeg

JokerMartini
Posts: 44
Joined: Tue Apr 10, 2012 3:05 pm

Re: Right-Click in Deadline

Postby JokerMartini » Wed Sep 13, 2017 9:23 pm

Thank you so much. I ended up writing one as well that is similar.


Return to “Thinkbox Software - Deadline”

Who is online

Users browsing this forum: No registered users and 1 guest