Scripting event plugins, QT example

Hi,

just a quick question, in the QuickTime example, you have a check for if the jobPlugin is Nuke and the movieSettings isn’t empty in this form:

if movieSettings == "" or job.JobPlugin != "Nuke": return

I understand what it does, but, isn’t it a bit “awkward” way of skipping the submission if any of the two conditions are True? I mean, I am curious why you chose this way of testing for the condition instead of a more common:

if movieSettings == "" or job.JobPlugin != "Nuke": return None else: """submission script here""" pass

I’m really just curious as I don’t remember seeing that kind of a usage of the return statement in a condition in a function. :slight_smile:

Thanks in advance, cheers…

They both do the same thing, so it’s really just a matter of using what you prefer. Deadline doesn’t expect a return value from the event functions, so it doesn’t matter what you return. :slight_smile:

Ok, thanks for clearing that.

I was just a little surprised by this example code. :slight_smile:

Thanks.