Use spreadsheet to generate batch render command

Blender 2.63a
Libre Office 3.4.4

Being able to render from command line is convenient, to queue up many files for rendering, you could create a batch file (like renderall.bat) contain these command.

blender -b scene1blah.blend -a
blender -b scene2blahblah.blend -a
blender -b scene3blah.blend -a

so on…

And run the renderall.bat from command line.

Problem is the amount of typing/copy&pasting those commands if you have like a few hundred shots to render could be overwhelming.

Spreadsheet like LibreOffice Calc is coming to rescue.

Assume you’re in Windows. In cmd, cd to the drive/folder where you keep those blend files. Then

dir /B /O N *.blend >allblend.txt

This will list every files ended with .blend and write into a new text file called allblend.txt, sorted by name.

Run Calc. Click menu Insert->Sheet from file

Browse to the allblend.txt, you just created. OK with default settings, you’ll end up with each blend file in its row in column A.

Click and drag to hilight every cells in A and move them to B

In an empty cell A1, type in ‘blender -b’. And duplicate this to every A row by dragging the lower right corner of the A1 cell down to the last row.

Also, in cell C1, type ‘-a’ and duplicate it down to every C row.

Your spreadsheet should look like this

You can remove rows that you don’t want to render.

Now save as … Text CVS (.cvs)

There would be a dialogue pop up to ask for ‘Field Delimiter‘, change this one to {space}

You’ll have a .cvs file, which is actually a normal text file that you can change the extention to .bat and execute it as a rendering queue.

Advertisements

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s