--- ray/src/util/dctimestep.c 2014/09/17 22:40:49 2.34 +++ ray/src/util/dctimestep.c 2014/09/26 23:33:09 2.35 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: dctimestep.c,v 2.34 2014/09/17 22:40:49 greg Exp $"; +static const char RCSid[] = "$Id: dctimestep.c,v 2.35 2014/09/26 23:33:09 greg Exp $"; #endif /* * Compute time-step result using Daylight Coefficient method. @@ -26,7 +26,7 @@ sum_images(const char *fspec, const CMATRIX *cv, FILE int i, y; if (cv->ncols != 1) - error(INTERNAL, "expected matrix in sum_images()"); + error(INTERNAL, "expected vector in sum_images()"); for (i = 0; i < cv->nrows; i++) { const COLORV *scv = cv_lval(cv,i); char fname[1024]; @@ -185,6 +185,7 @@ main(int argc, char *argv[]) CMATRIX *smtx, *Dmat, *Tmat, *imtx; /* get sky vector/matrix */ smtx = cm_load(argv[a+3], 0, nsteps, skyfmt); + nsteps = smtx->ncols; /* load BSDF */ Tmat = cm_loadBTDF(argv[a+1]); /* load Daylight matrix */ @@ -198,6 +199,7 @@ main(int argc, char *argv[]) cm_free(imtx); } else { /* sky vector/matrix only */ cmtx = cm_load(argv[a+1], 0, nsteps, skyfmt); + nsteps = cmtx->ncols; } /* prepare output stream */ if ((ofspec != NULL) & (nsteps == 1) && hasNumberFormat(ofspec)) {