Changeset - 4ead21d5a929
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-13 22:04:22
ohnobinki@ohnopublishing.net
make struct blendjob into a linked list
1 file changed with 11 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -82,6 +82,7 @@ struct general_info {
 

	
 
// Stores Blender Job Info
 
struct blendjob {
 
  struct blendjob *next; /* next will be NULL unless if there is another blendjob */
 
  char *name;
 
  char *submitter;
 
  char *email;
 
@@ -94,7 +95,7 @@ struct blendjob {
 
  unsigned int time_remaining; // estimated seconds remaining till render is complete (up to 49, 710 days)
 
							   // we can have the client computer convert it into days, hours, etc if they wish to view it
 
  struct frameset *frameset;
 
} blendjob[MAX_BLENDJOBS];
 
};
 

	
 

	
 
// Frameset Structure
 
@@ -210,20 +211,18 @@ void status_report_generator(){
 

	
 

	
 
// **** Structure Builder: This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer.
 
void frame_num_struct_builder(int sframe, int eframe) {
 
	int jobnum_new = highest_jobnum + 1;
 
	int total = (sframe - eframe) +1;  // total number of frames
 
	int fcount = sframe; // Used to create all the frames in the structure from sframe to eframe
 
	int x = 0;
 
void frame_num_struct_builder(struct blendjob *job, unsigned int numframes) {
 
  int jobnum_new = highest_jobnum + 1; /* global vars will someday leave us  */
 
	int counter;
 

	
 
	
 

	
 
	blendjob[jobnum_new].total_frames = total; // sets the total number of frames in animation for status purposes
 

	
 
	while(x < total){ // This builds the array, with the array starting at zero and the frame_num starting at sframe
 
		blendjob[jobnum_new].frameset[x].frame_num = fcount;
 
		x++;
 
		fcount++;
 
	}
 

	
 
	for(counter = 0; counter < total; counter ++)
 
	  /* This builds the array, with the array starting at zero and the frame_num starting at sframe */
 
	  blendjob[jobnum_new].frameset[x].frame_num = counter + 1;
 
	
 
	highest_jobnum++; // After it has created the job, it adds one to the highest_jobnum interger
 
}
 

	
0 comments (0 inline, 0 general)