Greetings,
I’m trying do to a basic frame freeze with pre and post task scripts. The goal is to automatically complete all tasks whose ID is not 0 so it doesn’t render the frame. While trying to see if the basics work, I found out that the way I complete the task skips the post task script which wouldn’t be a bother in normal times, but it is when I’m trying to debug the post task script.
Here’s the pre task script :
from Deadline.Scripting import *
def __main__(*args):
deadlinePlugin = args[0]
deadlinePlugin.LogInfo("---[STARTING PRE-TASK SCRIPT]---")
deadlinePlugin.LogStdout("DEBUG : Current task ID is {}".format(deadlinePlugin.GetCurrentTaskId()))
if deadlinePlugin.GetCurrentTaskId() != "0":
deadlinePlugin.LogStdout("This task isn't the first frame, setting to complete")
tasks = []
tasks.append(deadlinePlugin.GetCurrentTask())
job = deadlinePlugin.GetJob()
slaveName = deadlinePlugin.GetSlaveName()
deadlinePlugin.SetProgress(100)
RepositoryUtils.CompleteTasks(job, tasks, slaveName)
else:
deadlinePlugin.LogStdout("This task is the first frame, proceed with frame rendering")
deadlinePlugin.LogInfo("---[ENDING PRE-TASK SCRIPT]---")
Is there another way to complete the task? I haven’t found any documentation about what that deadlinePlugin at the beginning contains so I kinda had to find it myself the hard way and found these methods : https://pastebin.com/9DHDzd38
And had to roll with it, but there’s nothing about completing the current task in there.