I´m currently working in my final thesis project for college and to make the rendering part easier I wrote a python script that checks if a text file called “RenderList.txt” is in the same folder as the script, if so, it runs Blender in background and renders the files that are on the list.
The cool thing is that you can use DropBox (https://www.dropbox.com) to render your files in another computer, and if the output folder is also beeing shared by dropbox, the rendered files are automatically sent back to your local machine.
My computer at home is really crappy, so Im using this technique to render stuff in the pc at the office wich is pretty good. It took 1min to render one frame at home and the same frame at work took 10s =)
IMPORTANT:
->Everything needs to be in the same folder
->Blender needs to be set up as an Environment Variable (http://vlaurie.com/computers2/Articles/environment.htm)
->I only tested this on Windows, but the only thing that shouldnt work in other OS is the environment variable part, but there probably is another way of getting the same thing
Wayback machine found it from the archive. Just needed a simple drag n drop way to start rendering with another machine, and didn’t want to use separated rendering farms apps…
#A watchfolder script for blender
#This script will start running blender whenever a list called "RenderList.txt" file is droped in the same folder.
#The list is a simple .txt file with the name of the files that you want to render
## === RenderList.txt example:
# blend_file1.blend
# blend_file2.blend
# blend_file3.blend
# XYZ_file.blend
## --- end ---
## IMPORTANT!!!
## ->Everything needs to be in the same folder
## ->Blender needs to be set up as an Environment Variable (http://vlaurie.com/computers2/Articles/environment.htm)
## ->works like a charm with dropbox (https://www.dropbox.com/) ;)
##Copyright (C) 2011 by Henrique P. K. Périgo // www.hperigo.com
##
##Permission is hereby granted, free of charge, to any person obtaining a copy
##of this software and associated documentation files (the "Software"), to deal
##in the Software without restriction, including without limitation the rights
##to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
##copies of the Software, and to permit persons to whom the Software is
##furnished to do so, subject to the following conditions:
##
##The above copyright notice and this permission notice shall be included in
##all copies or substantial portions of the Software.
##
##THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
##IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
##FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
##AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
##LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
##OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
##THE SOFTWARE.
## Begin script:
import os
import time
#wich folder should the program watch
folder = "."
a = 0
#number of cycles, put "while 1:" for infinity "while a < n" for n cycles
while 1:
found = False
print(a)
win_files = os.listdir(folder)
# look for a list to render
for f in win_files:
if(f == "RenderList.txt"):
file = open("RenderList.txt", 'r')
found = True
break
#start rendering the files in the list
if found:
for b in file.read().split("\n"):
print("Rendering -> " + b)
os.system("blender -b "+ b + " -a") #execute blender
print("done with -> " + b)
t = str(time.localtime().tm_hour) + "_" + str(time.localtime().tm_min) + "_" + str(time.localtime().tm_sec)
file.close()
os.rename("RenderList.txt" , "done_RenderList_" + t + ".txt")
print("done")
else:
print("NO LIST FOUND")
#delay 5sec and start again
time.sleep(5)
a = a + 1