# HG changeset patch # User LordOfWar # Date 2009-02-15 23:51:44 # Node ID 2ccb6e87cf77f191dc9b8056e5422a7d09968197 # Parent 1cd8562c653b4cfecc8f2db471abedf93801d3b5 in the server program I removed crap code that ran coninously, will add new code soon. in the client file I added working code to tell blender to render a file in the same folder as the program, and added variables to recieve the file name and frame number to render. diff --git a/src/client/distren.c b/src/client/distren.c --- a/src/client/distren.c +++ b/src/client/distren.c @@ -26,9 +26,16 @@ int main(int argc, char *argv[]) genericfunc(); execlisten(); - // command = get_task(); //asks server for next frame and part to be rendered + int frame_to_render; + frame_to_render = 10; // temporary, the number 10 will be replaced with a function call - // run command + char name[25]; // declares a variable to hold the file name + name = "file_name"; // file_name will be replaced with a function call + + char string[100]; + sprintf(string, "blender.exe -b %s.blend -o //tmp/frame -f %d -F JPEG -x 1", name, frame_to_render); + + system(string); return 0; } diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -15,6 +15,17 @@ You should have received a copy of the GNU Affero General Public License along with DistRen. If not, see . + + -- Blender Commands -- + -v "Print Blender version and exit" + -F "Set the render format" Valid options are (that we care about) "TGA, JPG, MOVIE, AVIRAW, AVIJPG, PNG, BMP, FRAMESERVER" + -S Set scene + -f Render frame and save it + -s Set start frame (use before -a argument) + -e Set end frame (use before -a argument> + -o Set the render path and file name (use // at start of the path to render relative to the blend file, the ### characters are replaced by the frame number) + -t Use amount of ,threads> for rendering (background mode only)(1-8, 0 for systems processor count) + -x Set option to add the file extension to the end of the file */ #include