DeadlineScriptDialog in Event Script?


#1

Trying to get something working we had an old version, Deadline 7 in 10. We have an event script which runs on Job Deletion, it sometimes needs to prompt the user, and we used DeadlineScriptDialog to do this, but it seems we can’t import this into Event Scripts any more?

2019-06-26 15:34:00: Events plugin 'testEvent' could not be loaded from the repository because: Error executing event plugin script "\\DeadlineRepository10\custom\events\testEvent\testEvent.py": ImportError : No module named DeadlineUI.Controls.Scripting.DeadlineScriptDialog (Deadline.Events.DeadlineEventPluginException)

Simple sample event makes it break…

from Deadline.Events import *

from Deadline.Scripting import *
from DeadlineUI.Controls.Scripting.DeadlineScriptDialog import DeadlineScriptDialog

######################################################################
## This is the function that Deadline calls to get an instance of the
## main DeadlineEventListener class.
######################################################################
def GetDeadlineEventListener():
    return MyEvent()

######################################################################
## This is the function that Deadline calls when the event plugin is
## no longer in use so that it can get cleaned up.
######################################################################
def CleanupDeadlineEventListener( deadlinePlugin ):
    deadlinePlugin.Cleanup()

    
######################################################################
## This is the main DeadlineEventListener class for MyEvent.
######################################################################
class MyEvent (DeadlineEventListener):

    # TODO: Place code here to replace "pass"
    pass