Changeset - 2ccb6e87cf77
[Not reviewed]
default
0 2 0
LordOfWar - 17 years ago 2009-02-15 23:51:44

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.
2 files changed with 20 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/client/distren.c
Show inline comments
 
@@ -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;
 
}
src/server/distrend.c
Show inline comments
 
@@ -15,6 +15,17 @@
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
  -- Blender Commands --
 
  -v "Print Blender version and exit"
 
  -F <format> "Set the render format" Valid options are (that we care about) "TGA, JPG, MOVIE, AVIRAW, AVIJPG, PNG, BMP, FRAMESERVER"
 
  -S <name> Set scene <name>
 
  -f <frame> Render frame <frame> and save it
 
  -s <frame> Set start frame (use before -a argument)
 
  -e <frame> Set end frame (use before -a argument>
 
  -o <path> 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 <threads> Use amount of ,threads> for rendering (background mode only)(1-8, 0 for systems processor count)
 
  -x <bool> Set option to add the file extension to the end of the file
 
*/
 

	
 
#include <stdio.h>
0 comments (0 inline, 0 general)