diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 04:23:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 04:23:55 +0400 |
commit | 4c5502bfd690cad5c02aa6a0be0bd59400ef3407 (patch) | |
tree | 6c421d2c324166a682952476e7a1f9aa924c7c51 /source/blender/render | |
parent | 9466af0eabf05bfcb966cac01ee72dca544f7dd1 (diff) |
code cleanup: function naming for BLI functions.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/initrender.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 20 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadbuf.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/volume_precache.c | 10 | ||||
-rw-r--r-- | source/blender/render/intern/source/volumetric.c | 6 | ||||
-rw-r--r-- | source/blender/render/intern/source/voxeldata.c | 10 | ||||
-rw-r--r-- | source/blender/render/intern/source/zbuf.c | 2 |
7 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index 3e82bec7e52..56aadfd63d0 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -94,10 +94,10 @@ static void init_render_jit(Render *re) if (lastjit!=re->r.osa || last_mblur_jit != re->r.mblur_samples) { memset(jit, 0, sizeof(jit)); - BLI_initjit(jit[0], re->r.osa); + BLI_jitter_init(jit[0], re->r.osa); memset(mblur_jit, 0, sizeof(mblur_jit)); - BLI_initjit(mblur_jit[0], re->r.mblur_samples); + BLI_jitter_init(mblur_jit[0], re->r.mblur_samples); } lastjit= re->r.osa; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 57c39a03c06..9ca2337e27f 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -171,7 +171,7 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs) fprintf(stdout, "Sce: %s Ve:%d Fa:%d La:%d", rs->scenename, rs->totvert, rs->totface, rs->totlamp); } - BLI_exec_cb(G.main, NULL, BLI_CB_EVT_RENDER_STATS); + BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS); fputc('\n', stdout); fflush(stdout); @@ -2021,7 +2021,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr if (render_initialize_from_main(re, bmain, scene, srl, camera_override, lay, 0, 0)) { MEM_reset_peak_memory(); - BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE); + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE); do_render_all_options(re); @@ -2039,10 +2039,10 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr } } - BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ } - BLI_exec_cb(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); + BLI_callback_exec(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); /* UGLY WARNING */ G.rendering= 0; @@ -2120,7 +2120,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie BLI_timestr(re->i.lastframetime, name); printf(" Time: %s", name); - BLI_exec_cb(G.main, NULL, BLI_CB_EVT_RENDER_STATS); + BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS); fputc('\n', stdout); fflush(stdout); /* needed for renderd !! (not anymore... (ton)) */ @@ -2155,7 +2155,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri if (nf >= 0 && nf >= scene->r.sfra && nf <= scene->r.efra) { scene->r.cfra = re->r.cfra = nf; - BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE); + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE); do_render_all_options(re); totrendered++; @@ -2166,7 +2166,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri } if (G.afbreek == 0) { - BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ } } else { @@ -2220,7 +2220,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri re->r.cfra= scene->r.cfra; /* weak.... */ /* run callbacs before rendering, before the scene is updated */ - BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE); + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE); do_render_all_options(re); @@ -2246,7 +2246,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri } if (G.afbreek==0) { - BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ } } } @@ -2262,7 +2262,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri re->flag &= ~R_ANIMATION; - BLI_exec_cb(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); + BLI_callback_exec(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); /* UGLY WARNING */ G.rendering= 0; diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index 1c572524a70..b3167e15df5 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -139,7 +139,7 @@ static float *give_jitter_tab(int samp) if (ctab[samp]==0) { ctab[samp]= 1; - BLI_initjit(jit[offset], samp*samp); + BLI_jitter_init(jit[offset], samp*samp); } return jit[offset]; diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index 69aa6082950..e7c97574629 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= V_I(x_, y_, z_, res); + const int i= BLI_VEXEL_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= V_I(x, y, z, vp->res); + const int i= BLI_VEXEL_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= V_I(x, y, z, vp->res); + const int i= BLI_VEXEL_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=V_I(x, y, z, res); + const int i=BLI_VEXEL_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= V_I(x, y, z, res); + i= BLI_VEXEL_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/volumetric.c b/source/blender/render/intern/source/volumetric.c index c51cb2af842..b599da48803 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -234,9 +234,9 @@ static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float scat sample_co[1] = (world_co[1] - bbmin[1]) / dim[1]; sample_co[2] = (world_co[2] - bbmin[2]) / dim[2]; - scatter_col[0] = voxel_sample_triquadratic(vp->data_r, vp->res, sample_co); - scatter_col[1] = voxel_sample_triquadratic(vp->data_g, vp->res, sample_co); - scatter_col[2] = voxel_sample_triquadratic(vp->data_b, vp->res, sample_co); + scatter_col[0] = BLI_voxel_sample_triquadratic(vp->data_r, vp->res, sample_co); + scatter_col[1] = BLI_voxel_sample_triquadratic(vp->data_g, vp->res, sample_co); + scatter_col[2] = BLI_voxel_sample_triquadratic(vp->data_b, vp->res, sample_co); } /* Meta object density, brute force for now diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 940f718d4ad..5135061bc5c 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[ V_I(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2])*0.333f; + vd->dataset[ BLI_VEXEL_INDEX(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2]) * 0.333f; rf +=4; } } @@ -423,17 +423,17 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre switch (vd->interp_type) { case TEX_VD_NEARESTNEIGHBOR: - texres->tin = voxel_sample_nearest(vd->dataset, vd->resol, co); + texres->tin = BLI_voxel_sample_nearest(vd->dataset, vd->resol, co); break; case TEX_VD_LINEAR: - texres->tin = voxel_sample_trilinear(vd->dataset, vd->resol, co); + texres->tin = BLI_voxel_sample_trilinear(vd->dataset, vd->resol, co); break; case TEX_VD_QUADRATIC: - texres->tin = voxel_sample_triquadratic(vd->dataset, vd->resol, co); + texres->tin = BLI_voxel_sample_triquadratic(vd->dataset, vd->resol, co); break; case TEX_VD_TRICUBIC_CATROM: case TEX_VD_TRICUBIC_BSPLINE: - texres->tin = voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE)); + texres->tin = BLI_voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE)); break; } diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index b9e69743995..4c3c9889d53 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -3047,7 +3047,7 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float * /* has to become static, the init-jit calls a random-seed, screwing up texture noise node */ if (firsttime) { firsttime= 0; - BLI_initjit(jit[0], 256); + BLI_jitter_init(jit[0], 256); } memset(newrect, 0, sizeof(float)*xsize*ysize*4); |