Hi,
I am submitting a Nuke single task job to Deadline, which contains a load of python in the Nuke OnLoad command.
So when the slave opens the file, it runs my code (which renders a load of stuff) before running the main render (which is actually just a single temp image which is deleted later on).
My python includes a line to print the progress as a float percentage (like you do for a draft movie) but the task progress bar doesn’t update, it just shows an active 0%.
I’m guessing its because its not actually started the main render yet, but i’m wondering if there is anyway to get this working.
Thanks in advance
M
Hi,
I’m wondering if you would be better to look at taking our Nuke plugin, ripping out the stuff you don’t need, then effectively have the Nuke plugin, insatiate Nuke.exe -Executing a script, where you feed it as an argument your Nuke script file you wish to process and then use either the Nuke onLoad command or drive the entire process from a python script. As this would then be executing in the main Deadline Plugin ManagedProcess, then you could report the task progress, as “DeadlinePlugin.SetProgress( 10.0 )” or “DeadlinePlugin.SetStatusMessage( “text based status message” )”. What happens currently when you try to set the Deadline plugin’s float progress or status message? Any error message? Can you provide a log report?
Mike
Hi Mike,
Thanks for the quick response.
I think your suggestion would work.
I cant be too specific but …this is actually part of a larger process.
What really happens is that the user clicks a button within Nuke and is presented with an option dialogue, based on what is in their scene.
Then there are multiple variations of the nuke scene created (how many depends on the user input), each with a different onLoad command.
Each scene has a corresponding config text file, which contains all my info (that the user chose from the dialogue) as to what nodes should be rendered.
All these new scenes automatically get sent to deadline, without a dialogue.
On loading each scene, nuke reads the config file I made, and then does whatever it needs to do.
Very convoluted but it works for our needs - which I appreciate are quite specific.
I’m happy to discuss more specific details if needed - but i cant do it publicly.
I think the answer to my original problem might be simpler. My current code is:
print "Progress: " + str((float(frame) / float(rendercount) * 100))
which just prints “Progress: float” in the output.
I thought deadline would automatically set the task progress from this output, but do I need to include a “DeadlinePlugin.SetProgress (float)” line?
Thanks
M
Hi,
Your STDout needs to exactly match the Nuke STDout so, that our RegEx makes a successful match. Here’s some snippets from our Nuke plugin:
[code]self.AddStdoutHandlerCallback( “.*Frame [0-9]+ \(([0-9]+) of ([0-9]+)\)” ).HandleCallback += self.HandleProgress
def HandleProgress( self ):
currFrame = int( self.GetRegexMatch( 1 ) )
totalFrames = int( self.GetRegexMatch( 2 ) )
if totalFrames != 0:
self.deadlinePlugin.SetProgress( ( float(currFrame) / float(totalFrames) ) * 100.0 )
self.deadlinePlugin.SetStatusMessage( self.GetRegexMatch( 0 ) )[/code]
So, if you match the Nuke syntax in your progress print statement, then in theory we should be able to handle it. If not, you will need to manually call the “SetProgress” method to update the progress each cycle of your loop.
Mike
My line gives a deadline output in the following syntax:
0: STDOUT: Progress: 6.66666666667
0: STDOUT: Progress: 14.6666666667
0: STDOUT: Progress: 29.3333333333
Does it need to be in this syntax:
0: STDOUT: Frame 696 (1 of 10)
or is there some hidden output that it needs to match?
That’s correct, if you wish to use our current built-in, shipping STDout parser.
Or you could customise the plugin and add your own replacement one?
I could … Or i could use your one and go to the pub!!!

thanks for your help!
So…
the line
self.deadlinePlugin.SetProgress
- does that set the Job progress or the Task progress?
It looks like the task progress to me as it is using the current and total frames values - or are the frames values actually tasks values?
If that is the block to set the job progress, surely i could just add a bit to say:
if totaltasks ==1:
set the job progress from the task progress
but i could be completely over simplifying it!
Job progress is automatically calculated based on the progress of the tasks. Note, that a task can contain more than 1 frame sometimes. So, the API command sets the current’s slave task progress, which in turn will automatically update the job progress.
So i was massively over simplifying it!!!