558 |
|
unlink(illumtmp); |
559 |
|
quit(1); |
560 |
|
} |
561 |
+ |
rmfile(oct0name); |
562 |
|
/* make octree1 (frozen) */ |
563 |
|
if (octreedate) |
564 |
|
sprintf(combuf, "%s%s -f -i %s %s > %s", c_oconv, |
1255 |
|
} |
1256 |
|
|
1257 |
|
|
1258 |
+ |
static int |
1259 |
+ |
syncf_done( /* check if an rpiece sync file is complete */ |
1260 |
+ |
char *sfname |
1261 |
+ |
) |
1262 |
+ |
{ |
1263 |
+ |
FILE *fp = fopen(sfname, "r"); |
1264 |
+ |
int todo = 1; |
1265 |
+ |
int x, y; |
1266 |
+ |
|
1267 |
+ |
if (fp == NULL) |
1268 |
+ |
return(0); |
1269 |
+ |
if (fscanf(fp, "%d %d", &x, &y) != 2) |
1270 |
+ |
goto checked; |
1271 |
+ |
todo = x*y; /* total number of tiles */ |
1272 |
+ |
if (fscanf(fp, "%d %d", &x, &y) != 2 || (x != 0) | (y != 0)) |
1273 |
+ |
goto checked; |
1274 |
+ |
/* XXX assume no redundant tiles */ |
1275 |
+ |
while (fscanf(fp, "%d %d", &x, &y) == 2) |
1276 |
+ |
if (!--todo) |
1277 |
+ |
break; |
1278 |
+ |
checked: |
1279 |
+ |
fclose(fp); |
1280 |
+ |
return(!todo); |
1281 |
+ |
} |
1282 |
+ |
|
1283 |
+ |
|
1284 |
|
static void |
1285 |
|
rpict( /* run rpict and pfilt for each view */ |
1286 |
|
char *opts, |
1388 |
|
int xdiv = 8+nprocs/3, ydiv = 8+nprocs/3; |
1389 |
|
if (rfdt >= oct1date) { |
1390 |
|
fprintf(stderr, |
1391 |
< |
"%s: partial output not created with rpiece\n", rawfile); |
1391 |
> |
"%s: partial output not created with %s\n", rawfile, c_rpiece); |
1392 |
|
quit(1); |
1393 |
|
} |
1394 |
|
if (rfdt) { /* start fresh */ |
1477 |
|
if (do_rpiece) { /* need to finish raw, first */ |
1478 |
|
finish_process(); |
1479 |
|
wait_process(1); |
1480 |
< |
/* XXX should check sync file to see if really done? */ |
1480 |
> |
if (!syncf_done(sfile)) { |
1481 |
> |
fprintf(stderr, |
1482 |
> |
"%s: %s did not complete rendering of view %s\n", |
1483 |
> |
progname, c_rpiece, vs); |
1484 |
> |
quit(1); |
1485 |
> |
} |
1486 |
|
} |
1487 |
|
if (!vdef(RAWFILE) || strcmp(vval(RAWFILE),vval(PICTURE))) { |
1488 |
|
/* build pfilt command */ |