New to deadline scripting

I have no idea how to do this, so looking for some guidance. I am looking for a way in monitor to display one of the vray settings (under V-Ray: Image Sampler (Antialiasing)) to display under ExtraInfo.

I read through the blog post “Deadline ‘Extra Info’: An Introduction” but didn’t find what I was looking for. Essentially, I am hoping to see whether a job is currently using progressive or bucket mode in deadline monitor. Where should I start?

Thanks in advance,

Here you go:
VRayImageSamplerMode.zip (1004 Bytes)

To install,

  • Unzip the ZIP file under Repository\Events\ or Repository\Custom\Events\ to create a new folder called VRayImageSamplerMode. It will contain the Event script file, and a .params file with the same name.
  • Open Tools > Configure Events… in Super User mode in the Monitor.
  • Select the new Event and set to Global Enable.
  • Requeue, resume, or start a new V-Ray job. If the job contains the Plugin Info entry vray_imageSampler_type_new_enums (which is used in V-Ray Next and 5), it will be written to the Extra Info 9 slot. Feel free to change the index to write elsewhere.

from Deadline.Events import *
from Deadline.Scripting import *

##############################################################################################
## This is the function called by Deadline to get an instance of the Event listener.
##############################################################################################
def GetDeadlineEventListener():
    return VRayISModeEventListener()

def CleanupDeadlineEventListener( eventListener ):
    eventListener.Cleanup()

###############################################################
## The Event listener class.
###############################################################
class VRayISModeEventListener (DeadlineEventListener):
    def __init__( self ):
        self.OnJobStartedCallback += self.OnJobStarted
        self.OnJobRequeuedCallback += self.OnJobStarted
        self.OnJobResumedCallback += self.OnJobStarted

    def Cleanup( self ):
        del self.OnJobStartedCallback
        del self.OnJobRequeuedCallback
        del self.OnJobResumedCallback

    ## This is called when the job changes state.
    def OnJobStarted( self, job ):
        val = self.GetPluginInfoEntryWithDefault("vray_imageSampler_type_new_enums", "")
        if val != "":
            job.JobExtraInfo9 = val
            RepositoryUtils.SaveJob(job)

Thanks for the script and installation instructions. For some reason the email went into my spam, so didn’t realize you’ve posted a response.

I’ll need to take a look at the code you’ve written and get a better understanding of how it works. Thanks for the help as always!

Privacy | Site terms | Cookie preferences