Character Animator

Posts tagged “script

Batch Render Fix – script by John Mather


When I was working on finishing up the Balloon short film, my team ran into an issue where Maya’s batch render would go crazy and our character would lose parts of her body while the other parts moved through the animation. Or the clothes would be the only thing moving and nothing else would move.

My team mate, Andrew Rodriguez stumbled on a thread where this awesome guy John Mather made a script as a way to solve this exact issue. Apparently, we weren’t the only ones having batch render issues. His script takes a start and end frame number, like 0 to 200, and renders out from the current camera with whatever settings you have in your Render Settings.

In my journey to learn more on the technical side, I decided to make a window for this so I could learn how to extend the function of a script, since his didn’t have a UI. This is my version of the script that has a simple window for inputting the required data to run the script. And also, I really wanted to post this because it was an amazing find for my team since it saved our final project.

This is the link to where you can see the discussion and if there are any updates to his script. 

And this is the script:




I’ve been learning how to script for a few months now and the hardest part has been thinking of finding a way to use what I’ve been learning. Not being a programmer or having any kind of formal training in that field, it’s been very interesting since I didn’t know where to begin, but it was still a fascinating thing to me to be able to make things that help the process, that automate things. So I just want to post two little things that I managed to make and learn from.

This first script flips/mirrors the selected objects position in world space.

I made a little thing that goes through the steps of mirroring an objects position, and then I started asking well what if I wanted a choice to duplicate it or not, and also what if I wanted to mirror across a different axis. So that’s what this script does organized in a window. It’s very simple but handy, to me at least.


This next script is extremely simple, but it was really confusing to understand as I was just starting to learn this stuff. For awhile I had tried making For Loops for arrays, but kept getting errors. Then I found something someone posted stating the obvious that made sense.

My error was that I was trying to do something like this

//store selection

$sel = `ls -sl`;

//run for loop renaming objects

for ($obj in $sel){

rename ($sel + “something”);


When I should’ve done it like this

//store selection

$sel = `ls -sl`;

//run for loop renaming objects

//using $obj, not $sel

for ($obj in $sel){

rename $obj ($obj+ “something”);


This script takes your selected objects, runs a for loop through the selection that self-groups each object, and renames it appropriately. Like selecting a circle, grouping it, renaming the group “grp_circle”.