diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 04:58:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 04:58:22 +0400 |
commit | 084fedd03a006982b386873a70f649627bf200aa (patch) | |
tree | c1934f9da2b2f9f7987104c7426d1ba2b11f0bb2 /source/blender/render | |
parent | 4c5502bfd690cad5c02aa6a0be0bd59400ef3407 (diff) |
code cleanup: brush/camera naming
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/initrender.c | 18 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/volume_precache.c | 10 | ||||
-rw-r--r-- | source/blender/render/intern/source/voxeldata.c | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index 56aadfd63d0..e712950f4f8 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -463,7 +463,7 @@ static void re_camera_params_get(Render *re, CameraParams *params, Object *cam_o re->viewdy= params->viewdy; re->viewplane= params->viewplane; - object_camera_mode(&re->r, cam_ob); + BKE_camera_object_mode(&re->r, cam_ob); } void RE_SetEnvmapCamera(Render *re, Object *cam_ob, float viewscale, float clipsta, float clipend) @@ -471,8 +471,8 @@ void RE_SetEnvmapCamera(Render *re, Object *cam_ob, float viewscale, float clips CameraParams params; /* setup parameters */ - camera_params_init(¶ms); - camera_params_from_object(¶ms, cam_ob); + BKE_camera_params_init(¶ms); + BKE_camera_params_from_object(¶ms, cam_ob); params.lens= 16.0f*viewscale; params.sensor_x= 32.0f; @@ -482,8 +482,8 @@ void RE_SetEnvmapCamera(Render *re, Object *cam_ob, float viewscale, float clips params.clipend= clipend; /* compute matrix, viewplane, .. */ - camera_params_compute_viewplane(¶ms, re->winx, re->winy, 1.0f, 1.0f); - camera_params_compute_matrix(¶ms); + BKE_camera_params_compute_viewplane(¶ms, re->winx, re->winy, 1.0f, 1.0f); + BKE_camera_params_compute_matrix(¶ms); /* extract results */ re_camera_params_get(re, ¶ms, cam_ob); @@ -496,16 +496,16 @@ void RE_SetCamera(Render *re, Object *cam_ob) CameraParams params; /* setup parameters */ - camera_params_init(¶ms); - camera_params_from_object(¶ms, cam_ob); + BKE_camera_params_init(¶ms); + BKE_camera_params_from_object(¶ms, cam_ob); params.use_fields= (re->r.mode & R_FIELDS); params.field_second= (re->flag & R_SEC_FIELD); params.field_odd= (re->r.mode & R_ODDFIELD); /* compute matrix, viewplane, .. */ - camera_params_compute_viewplane(¶ms, re->winx, re->winy, re->r.xasp, re->r.yasp); - camera_params_compute_matrix(¶ms); + BKE_camera_params_compute_viewplane(¶ms, re->winx, re->winy, re->r.xasp, re->r.yasp); + BKE_camera_params_compute_matrix(¶ms); /* extract results */ re_camera_params_get(re, ¶ms, cam_ob); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 9ca2337e27f..f0fea072530 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1872,7 +1872,7 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r } /* get panorama & ortho, only after camera is set */ - object_camera_mode(&scene->r, camera_override ? camera_override : scene->camera); + BKE_camera_object_mode(&scene->r, camera_override ? camera_override : scene->camera); /* forbidden combinations */ if (scene->r.mode & R_PANORAMA) { diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index e7c97574629..ff715eeca07 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -177,7 +177,7 @@ static float get_avg_surrounds(float *cache, int *res, int xx, int yy, int zz) for (x=-1; x <= 1; x++) { x_ = xx+x; if (x_ >= 0 && x_ <= res[0]-1) { - const int i= BLI_VEXEL_INDEX(x_, y_, z_, res); + const int i = BLI_VOXEL_INDEX(x_, y_, z_, res); if (cache[i] > 0.0f) { tot += cache[i]; @@ -208,7 +208,7 @@ static void lightcache_filter(VolumePrecache *vp) for (y=0; y < vp->res[1]; y++) { for (x=0; x < vp->res[0]; x++) { /* trigger for outside mesh */ - const int i= BLI_VEXEL_INDEX(x, y, z, vp->res); + const int i = BLI_VOXEL_INDEX(x, y, z, vp->res); if (vp->data_r[i] < -0.f) vp->data_r[i] = get_avg_surrounds(vp->data_r, vp->res, x, y, z); @@ -240,7 +240,7 @@ static void lightcache_filter2(VolumePrecache *vp) for (y=0; y < vp->res[1]; y++) { for (x=0; x < vp->res[0]; x++) { /* trigger for outside mesh */ - const int i= BLI_VEXEL_INDEX(x, y, z, vp->res); + const int i = BLI_VOXEL_INDEX(x, y, z, vp->res); if (vp->data_r[i] < -0.f) new_r[i] = get_avg_surrounds(vp->data_r, vp->res, x, y, z); if (vp->data_g[i] < -0.f) @@ -291,7 +291,7 @@ static float total_ss_energy(Render *re, int do_test_break, VolumePrecache *vp) for (z=0; z < res[2]; z++) { for (y=0; y < res[1]; y++) { for (x=0; x < res[0]; x++) { - const int i=BLI_VEXEL_INDEX(x, y, z, res); + const int i = BLI_VOXEL_INDEX(x, y, z, res); if (vp->data_r[i] > 0.f) energy += vp->data_r[i]; if (vp->data_g[i] > 0.f) energy += vp->data_g[i]; @@ -527,7 +527,7 @@ static void *vol_precache_part(void *data) /* convert from world->camera space for shading */ mul_v3_m4v3(cco, pa->viewmat, co); - i= BLI_VEXEL_INDEX(x, y, z, res); + i = BLI_VOXEL_INDEX(x, y, z, res); // don't bother if the point is not inside the volume mesh if (!point_inside_obi(tree, obi, cco)) { diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 5135061bc5c..90e6594d888 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -184,7 +184,7 @@ static void load_frame_image_sequence(VoxelData *vd, Tex *tex) for (y=0; y < ibuf->y; y++) { for (x=0; x < ibuf->x; x++) { /* currently averaged to monchrome */ - vd->dataset[ BLI_VEXEL_INDEX(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2]) * 0.333f; + vd->dataset[ BLI_VOXEL_INDEX(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2]) * 0.333f; rf +=4; } } |