Changeset - d246f9d7e4fb
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-07-15 11:13:16
ohnobinki@ohnopublishing.net
fixed frame numbering in frame_num_struct_builder()
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -239,20 +239,20 @@ void status_report_generator(struct blen
 

	
 

	
 
// **** 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(struct blendjob *job, unsigned int numframes) {
 
void frame_num_struct_builder(struct blendjob *job, unsigned int startframe, unsigned int numframes) {
 
  int jobnum_new = highest_jobnum + 1; /* global vars will someday leave us  */
 
	int counter;
 
  unsigned int counter;
 

	
 
	job->frameset = malloc(sizeof(struct frameset) * numframes);
 
	if(!job->frameset)
 
	  fprintf(stderr, "error allocating memory");
 

	
 
	job->total_frames = total; // sets the total number of frames in animation for status purposes
 
	job->total_frames = numframes; // sets the total number of frames in animation for status purposes
 
	job->jobnum = jobnum_new;
 

	
 
	for(counter = 0; counter < total; counter ++)
 
	for(counter = 0; counter < numframes; counter ++)
 
	  /* This builds the array, with the array starting at zero and the frame_num starting at sframe */
 
	  job->frameset[counter].frame_num = counter + 1;
 
	  job->frameset[counter].frame_num = counter + startframe;
 

	
 
	highest_jobnum++; // After it has created the job, it adds one to the highest_jobnum interger
 
}
0 comments (0 inline, 0 general)