? .sconsign.dblite ? not ? tools/Blender.pyc ? tools/__init__.pyc ? tools/bcolors.pyc ? tools/btools.pyc Index: source/blender/render/intern/source/pipeline.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/blender/render/intern/source/pipeline.c,v retrieving revision 1.110 diff -u -r1.110 pipeline.c --- source/blender/render/intern/source/pipeline.c 19 Jan 2007 12:43:02 -0000 1.110 +++ source/blender/render/intern/source/pipeline.c 20 Jan 2007 19:49:18 -0000 @@ -1389,65 +1389,58 @@ else nextpa= find_next_part(re, 0); - while(rendering) { - - if(re->test_break()) - PIL_sleep_ms(50); - else if(nextpa && BLI_available_threads(&threads)) { + while(g_break==0){ /*render all the parts in threads */ + if(nextpa!=NULL && BLI_available_threads(&threads)>0) { /*render image if there's a tile AND a free thread */ drawtimer= 0; nextpa->nr= counter++; /* for nicest part, and for stats */ nextpa->thread= BLI_available_thread_index(&threads); /* sample index */ - BLI_insert_thread(&threads, nextpa); + BLI_insert_thread(&threads, nextpa); /*kick of the thread */ - nextpa= find_next_part(re, minx); - } - else if(re->r.mode & R_PANORAMA) { - if(nextpa==NULL && BLI_available_threads(&threads)==re->r.threads) + /*find the next part */ + if(re->r.mode & R_PANORAMA) { /*render Panoramic view */ nextpa= find_next_pano_slice(re, &minx, &viewplane); + } else { - PIL_sleep_ms(50); - drawtimer++; + nextpa= find_next_part(re, minx); /*render normal view */ } } - else { + else{ /*sleepy-sleep time to let the threads do the work */ PIL_sleep_ms(50); drawtimer++; } - - /* check for ready ones to display, and if we need to continue */ - rendering= 0; - hasdrawn= 0; + + /* for finished threads */ for(pa= re->parts.first; pa; pa= pa->next) { if(pa->ready) { if(pa->result) { - BLI_remove_thread(&threads, pa); - - re->display_draw(pa->result, NULL); - print_part_stats(re, pa); + BLI_remove_thread(&threads, pa); /*remove the thread */ + re->display_draw(pa->result, NULL); /*show it-we all like pictures ;) */ + print_part_stats(re, pa); RE_FreeRenderResult(pa->result); pa->result= NULL; re->i.partsdone++; - hasdrawn= 1; } } else { - rendering= 1; if(pa->nr && pa->result && drawtimer>20) { - re->display_draw(pa->result, &pa->result->renrect); + re->display_draw(pa->result, &pa->result->renrect); /*ok, just show part of it */ hasdrawn= 1; } } } - if(hasdrawn) - drawtimer= 0; - /* on break, wait for all slots to get freed */ - if( (g_break=re->test_break()) && BLI_available_threads(&threads)==re->r.threads) - rendering= 0; - + /* test for break condition*/ + g_break=re->test_break(); + /*check for finished rendering */ + if(nextpa==NULL && BLI_available_threads(&threads)==re->r.threads){ + g_break=1; + } } + + BLI_end_threads(&threads); /*cleanup threads */ + /* handle cleanup of exr stuff if used */ if(rr->exrhandle) { save_empty_result_tiles(re); IMB_exr_close(rr->exrhandle); @@ -1458,8 +1451,8 @@ /* unset threadsafety */ g_break= 0; - BLI_end_threads(&threads); - freeparts(re); + + freeparts(re); /* cleanup parts */ } /* currently only called by preview renders and envmap */ Index: source/creator/creator.c =================================================================== RCS file: /cvsroot/bf-blender/blender/source/creator/creator.c,v retrieving revision 1.65 diff -u -r1.65 creator.c --- source/creator/creator.c 19 Jan 2007 05:23:58 -0000 1.65 +++ source/creator/creator.c 20 Jan 2007 19:49:19 -0000 @@ -238,10 +238,10 @@ /* temporary: prevent people to make/use 64 bits versions without them knowing it might be risky. I don't know for sure yet if we get problems, but I rather not get the burden of having to fix all faulty saved 64 bits files (ton) */ - if(sizeof(void *)==8) { +/* if(sizeof(void *)==8) { printf("64 bits compiles will give incorrectly saved .blend files. Do not use it. For testing purposes please remove this line from creator.c\n"); exit(0); - } + }*/ setCallbacks(); #ifdef __APPLE__