the error
Compiling ==> 'zblur.c'
...
source/blender/render/intern/source/zblur.c:902: error: structure has no member named `rectz'
source/blender/render/intern/source/zblur.c:906: error: structure has no member named `xstart'
source/blender/render/intern/source/zblur.c:906: error: structure has no member named `afmx'
source/blender/render/intern/source/zblur.c:907: error: structure has no member named `ystart'
source/blender/render/intern/source/zblur.c:907: error: structure has no member named `afmy'
source/blender/render/intern/source/zblur.c:908: error: structure has no member named `xend'
source/blender/render/intern/source/zblur.c:908: error: structure has no member named `xstart'
source/blender/render/intern/source/zblur.c:909: error: structure has no member named `yend'
source/blender/render/intern/source/zblur.c:909: error: structure has no member named `ystart'
source/blender/render/intern/source/zblur.c:928: warning: implicit declaration of function `RE_setwindowclip'
source/blender/render/intern/source/zblur.c:929: warning: implicit declaration of function `setzbufvlaggen'
source/blender/render/intern/source/zblur.c:929: error: `RE_projectverto' undeclared (first use in this function)
source/blender/render/intern/source/zblur.c:929: error: (Each undeclared identifier is reported only once
source/blender/render/intern/source/zblur.c:929: error: for each function it appears in.)
source/blender/render/intern/source/zblur.c:935: error: structure has no member named `rectot'
source/blender/render/intern/source/zblur.c:942: error: structure has no member named `rectz'
source/blender/render/intern/source/zblur.c:943: error: `R_ANIMRENDER' undeclared (first use in this function)
source/blender/render/intern/source/zblur.c:955: error: structure has no member named `rectz'
source/blender/render/intern/source/zblur.c:968: error: structure has no member named `rectot'
scons: *** [/PROJECT/BLENDER/source/blend-src/build/linux2/source/blender/render/intern/source/zblur.o] Error 1
scons: building terminated because of errors.
########################################################
########################################################
########################################################
the code:
void add_zblur(void)
{
Image *orig, *work, *zfront, *zback;
Camera *cam;
float fields;
int zfocus, newzfocus;
float zblurr;
int mode, x, y, fx, fy, zmin;
cam= G.scene->camera->data;
if ((cam->flag & CAM_DOF)==0) return;
902. if (R.rectz == NULL) { printf("add_zblur: no rectz!\n"); return; }
mode= R.r.mode;
R.r.mode &= ~R_PANORAMA;
R.xstart= -R.afmx;
R.ystart= -R.afmy;
R.xend= R.xstart+R.rectx-1;
R.yend= R.ystart+R.recty-1;
x= R.rectx;
y= R.recty;
zblurr= (cam->zblur*R.r.size)/100;
if (R.r.mode & R_FIELDS) {
y *= 2;
zblurr *= 2;
fields= 0.5;
}
else
{
fields= 1.0;
}
zmin = (cam->zmin * (float) UINT_MAX + (float) INT_MIN) ;
RE_setwindowclip(1,-1); // geen jit:(-1)
setzbufvlaggen(RE_projectverto);
zfront = alloc_img(x, y, I_GRAY);
zback = alloc_img(x, y, I_GRAY);
orig = alloc_img(x, y, I_RGB);
rect2img(R.rectot, orig, x, y);
if (cam->flag & CAM_AUTOFOCUS) {
fx= ((float)R.rectx + cam->focusx * (float)R.rectx)/2.0;
fy= ((float)R.recty + cam->focusy * (float)R.recty)/2.0;
CLAMP(fx, 0, R.rectx-1);
CLAMP(fy, 0, R.recty-1);
newzfocus= R.rectz[fy*R.rectx+fx];
if ((R.flag & R_ANIMRENDER) && (cam->zlag > 1.0)) {
zfocus= (int)((float)cam->oldzfocus + ((((float)newzfocus - (float)cam->oldzfocus)/cam->zlag) * fields));
cam->oldzfocus= zfocus;
} else {
zfocus= cam->oldzfocus= newzfocus;
}
}
else {
zfocus = (cam->focus * (float) UINT_MAX + (float) INT_MIN);
}
//split up z buffer into 2 gray images
zsplit(R.rectz, zfront, zback, zfocus, INT_MAX, zmin, x, y);
gauss_blur(zback, 1.0);
gauss_blur(zfront, zblurr);
work = zblur(orig, zback, zblurr);
free_img(orig);
orig = zblur2(work, zfront, zblurr, cam->zsigma);
if (cam->zgamma != 1.0)
{
zgamma(orig, zback, cam->zgamma);
}
img2rect(orig, R.rectot);
free_img(orig);
free_img(work); free_img(zfront); free_img(zback);
R.r.mode= mode;
}