AWS Thinkbox Discussion Forums

Python Plugin behaving strangely

We have some post-render processes we run with a Python script. In Deadline, it is simplest to run them as a dependent job, split into tasks with 25 frame chunks, using the Python plugin.

I’m running into behavior that seems inconsistent with the code. Let’s say Task 0 is frames 1-25, Task 1 is 26-50, and Task 2 is 51-55. Let’s say the argument is formatted like this:

-t <STARTFRAME>-<ENDFRAME>

I’d expect the process to run once, for all frames in the range of the task. Task 0, for example, would be:

-t 1-25

Instead, however, it’s formatting like this:

-t 1-1 -t 2-2 -t 3-3 -t 4-4 -t 5-5 -t 6-6 -t 7-7 -t 8-8 -t 9-9 -t 10-10 -t 11-11 ...

As you can imagine, this is very inefficient. The code doesn’t seem to support this behavior. Any ideas? Is there something I can change?

Sorry, I know I’m posting quite a bit lately. We’re moving quickly to get moved over before a large project begins and I’m feeling the pressure. ^_^, Thanks in advance!

The key thing that is catching you out, is this hard-coded property in the Python plugin:

self.SingleFramesOnly = True

You could update the InitialiseProcess function like this:

[code] def InitializeProcess(self):
self.PluginType = PluginType.Simple
self.StdoutHandling = True

    self.SingleFramesOnly = self.GetBooleanPluginInfoEntryWithDefault( "SingleFramesOnly", True )
    self.LogInfo( "Single Frames Only: %s" % self.SingleFramesOnly )[/code]

and then make sure, you submit your Python job with the Key=Value Pair (KVP), “SingleFramesOnly=False”

In fact, we should probably do this by default to our shipping Python plugin, so that users can set a “SingleFramesOnly” property when they submit jobs to the Python plugin. (We already do this to our CommandLine plugin).

MikeOwen, thanks, I’ll give that a shot!

Privacy | Site terms | Cookie preferences