Is there a way to always run an additional script by default with each After Effects render?
I know I can manually add one… but thought it would be awesome to configure it a level deeper so I never have to think about it again.
My farm sometimes overloads a little with AE renders that some images aren’t fully written. I have Python script to check this after the render is done and resubmit the broken ones, but would love that to be added there by default.
I guess not and you need a more granular image checking tool. In that case, this is the perfect use case of a simple event plugin, which fires whenever an AE job completes on your farm. It requires a bit of Python knowledge, but it sounds like your well versed there already: docs.thinkboxsoftware.com/produc … ugins.html
What your after doing, is very similar to something similar but different we already provide an example of here, of a post job script: docs.thinkboxsoftware.com/produc … ob-scripts
However, it would be much better to wrap this as an event plugin so that it is automatically fired for each AE job instead of you having to add this postJobScript to each of your applicable jobs.
EDIT: Actually, I think I have exactly what your after, already written around here somewhere…let me do some digging here…
OK, here’s an event plugin which will execute a Python Script against all AfterEffects jobs once completed. Over to you on that Python script and what it does.
Unzip attached zip file to: “<your_repo>/custom/events/”
Go to “Configure Events…” in Monitor, under Tools, as Super-User
Type in a valid file path to your Python script.
Run a AE job.
Actually thinking some more about this for a second…you could actually use the Deadline Scripting API once you have identified a ‘bad’ AE image frame, to actually do the re-queuing of that task. I’m guessing your Python script already does this, so my comment here is kinda moot.
The funny thing, is I’m actually scheduled to write my next blog post on this exact topic with an example of how you can identify bad V-Ray LC/vrmap files and auto-requeue them, so any dependent beauty/RE render pass job doesn’t get released, as it will fail due to a corrupt Light Cache vrlmap file. Anyway, I digress. One last thing. I actually wrong this event plugin whilst waiting for a flight in an airport very quickly for a client a while back, so careful how your testing goes.
Ooh, that’s interesting! looking forward to that post P
I’ll have a look in the next days to get that going via the event plugin and look at your version.
Attached the script i was planning to use… it’s a oldy made with some help here on the forum.
In a way it would actually be great if it becomes a standard feature in deadline (doing a check of any kind of corrupted output)
Just to have a checkbox " verify output data "… but yeah… there there wouldn’t be anything to script anymore AE_Detect_Script.zip (982 Bytes)
Hi,
I took a look at your py script and essentially, the same functionality already exists in the AE plugin, by enabling the min file size check in the submitter. This built-in function checks both min file size and that the file exists, which is what your script is doing. There is one exception, where our feature fires within a PostRenderTasks() function, which will just if applicable, fail out a particular task (current task = which could be 1 or more frames), which means if the output didn’t exist, then just a single task would be marked as failed. Your script would execute a RepositoryUtils.FailJob(job) function, which if just 1 frame was missing, then the entire job including incomplete tasks would be marked as failed and therefore, never have the chance of rendering.
So, in summary, I would check out our built-in function and see how that goes for you?
ok thanks, i’ll give that one a try.
It would be cool if you can set a +10 / -10 % margin based on the average file size, as now I need to guess what the minimum file size needs to be.
the problem I had was that a frame was written, but not fully finished so got corrupted which halted the draft job, perhaps our scripts wouldn’t have found that either (it was originally intended for completely dropped frames.
We currently only check for if the file exists and if enabled, if the min file size is greater than x Kb. A onJobFinished event plugin could scan all the output of a AE job and compare the average frame size and flag any which are ±X% margin of error. Essentially, my upcoming blog post will demonstrate how to do something very similar to this. I’m not sure how actually useful that would be though for AE output? Do AE jobs regularly generate a bad frame?
Honestly… I don’t think they do in a regular setup.
I recently changed my setup which causes a bit of a special situation.
All my machines have a Network drive mounted on the Z.
But I found it was bit too slow to work from the network, so on my workstation I’ve put in a big SSD that duplicates the Z folder locally.
the Z on this computer is a copy of the Z on the network and is kept up to date by syncing it continuously
So I think (in hindsight) that the corrupted files were due to a incomplete /interrupted sync to/from the local SSD.
which is something I need to keep an eye on, as it’s allot faster to work locally, but can’t have files getting corrupted without noticing.