diff options
Diffstat (limited to 'source/blender/render/intern/source/convertblender.c')
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index c2b0e1e777f..a1cc1e23470 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -168,7 +168,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void), float vec[4], fx, fy, fz; float fac, starmindist, clipend; float mat[4][4], stargrid, maxrand, maxjit, force, alpha; - int x, y, z, sx, sy, sz, ex, ey, ez, done = 0; + int x, y, z, sx, sy, sz, ex, ey, ez, done = FALSE; unsigned int totstar= 0; if (initfunc) { @@ -683,7 +683,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen } } - if (do_nmap_tangent != 0) { + if (do_nmap_tangent != FALSE) { SRenderMeshToTangent mesh2tangent; SMikkTSpaceContext sContext; SMikkTSpaceInterface sInterface; @@ -1575,7 +1575,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem float pa_time, pa_birthtime, pa_dietime; float random, simplify[2], pa_co[3]; const float cfra= BKE_scene_frame_get(re->scene); - int i, a, k, max_k=0, totpart, dosimplify = 0, dosurfacecache = 0, use_duplimat = 0; + int i, a, k, max_k=0, totpart, do_simplify = FALSE, do_surfacecache = FALSE, use_duplimat = FALSE; int totchild=0; int seed, path_nbr=0, orco1=0, num; int totface, *origindex = 0; @@ -1697,7 +1697,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem if (psys->flag & PSYS_USE_IMAT) { /* psys->imat is the original emitter's inverse matrix, ob->obmat is the duplicated object's matrix */ mult_m4_m4m4(duplimat, ob->obmat, psys->imat); - use_duplimat = 1; + use_duplimat = TRUE; } /* 2.6 setup strand rendering */ @@ -1744,10 +1744,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem svert= strandbuf->vert; if (re->r.mode & R_SPEED) - dosurfacecache= 1; + do_surfacecache = TRUE; else if ((re->wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT|WO_INDIRECT_LIGHT)) && (re->wrld.ao_gather_method == WO_AOGATHER_APPROX)) if (ma->amb != 0.0f) - dosurfacecache= 1; + do_surfacecache = TRUE; totface= psmd->dm->getNumTessFaces(psmd->dm); origindex= psmd->dm->getTessFaceDataArray(psmd->dm, CD_ORIGINDEX); @@ -1860,7 +1860,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem get_particle_uvco_mcol(part->from, psmd->dm, parent->fuv, num, &sd); } - dosimplify = psys_render_simplify_params(psys, cpa, simplify); + do_simplify = psys_render_simplify_params(psys, cpa, simplify); if (strandbuf) { int orignum= (origindex)? origindex[cpa->num]: cpa->num; @@ -1892,7 +1892,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem strand->vert= svert; copy_v3_v3(strand->orco, sd.orco); - if (dosimplify) { + if (do_simplify) { float *ssimplify= RE_strandren_get_simplify(obr, strand, 1); ssimplify[0]= simplify[0]; ssimplify[1]= simplify[1]; @@ -1903,7 +1903,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem copy_v3_v3(snor, sd.surfnor); } - if (dosurfacecache && num >= 0) { + if (do_surfacecache && num >= 0) { int *facenum= RE_strandren_get_face(obr, strand, 1); *facenum= num; } @@ -2084,7 +2084,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem break; } - if (dosurfacecache) + if (do_surfacecache) strandbuf->surface= cache_strand_surface(re, obr, psmd->dm, mat, timeoffset); /* 4. clean up */ @@ -3263,8 +3263,8 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) float *orco=0; int need_orco=0, need_stress=0, need_nmap_tangent=0, need_tangent=0; int a, a1, ok, vertofs; - int end, do_autosmooth=0, totvert = 0; - int use_original_normals= 0; + int end, do_autosmooth = FALSE, totvert = 0; + int use_original_normals = FALSE; int recalc_normals = 0; // false by default int negative_scale; @@ -3339,7 +3339,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) /* attempt to autsmooth on original mesh, only without subsurf */ if (do_autosmooth && me->totvert==totvert && me->totface==dm->getNumTessFaces(dm)) - use_original_normals= 1; + use_original_normals= TRUE; ms = (totvert==me->totvert)?me->msticky:NULL; @@ -3354,7 +3354,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) for (a=0; a<totvert; a++, mvert++) { ver= RE_findOrAddVert(obr, obr->totvert++); copy_v3_v3(ver->co, mvert->co); - if (do_autosmooth==0) { /* autosmooth on original unrotated data to prevent differences between frames */ + if (do_autosmooth == FALSE) { /* autosmooth on original unrotated data to prevent differences between frames */ normal_short_to_float_v3(ver->n, mvert->no); mul_m4_v3(mat, ver->co); mul_transposed_m3_v3(imat, ver->n); @@ -3416,7 +3416,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) if ( mface->mat_nr==a1 ) { float len; - int reverse_verts = negative_scale!=0 && do_autosmooth==0; + int reverse_verts = (negative_scale != 0 && do_autosmooth == FALSE); int rev_tab[] = {reverse_verts==0 ? 0 : 2, 1, reverse_verts==0 ? 2 : 0, 3}; v1= reverse_verts==0 ? mface->v1 : mface->v3; v2= mface->v2; @@ -4703,7 +4703,7 @@ void RE_Database_Free(Render *re) free_strand_surface(re); re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0; - re->i.convertdone= 0; + re->i.convertdone = FALSE; re->bakebuf= NULL; @@ -5045,7 +5045,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l re->lampren.first= re->lampren.last= NULL; slurph_opt= 0; - re->i.partsdone= 0; /* signal now in use for previewrender */ + re->i.partsdone = FALSE; /* signal now in use for previewrender */ /* in localview, lamps are using normal layers, objects only local bits */ if (re->lay & 0xFF000000) @@ -5164,7 +5164,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l if (re->test_break(re->tbh)) RE_Database_Free(re); else - re->i.convertdone= 1; + re->i.convertdone = TRUE; re->i.infostr= NULL; re->stats_draw(re->sdh, &re->i); @@ -5651,8 +5651,8 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned // NT check for fluidsim special treatment fluidmd = (FluidsimModifierData *)modifiers_findByType(obi->ob, eModifierType_Fluidsim); if (fluidmd && fluidmd->fss && (fluidmd->fss->type & OB_FLUIDSIM_DOMAIN)) { - // use preloaded per vertex simulation data, only does calculation for step=1 - // NOTE/FIXME - velocities and meshes loaded unnecessarily often during the database_fromscene_vectors calls... + /* use preloaded per vertex simulation data, only does calculation for step=1 */ + /* NOTE/FIXME - velocities and meshes loaded unnecessarily often during the database_fromscene_vectors calls... */ load_fluidsimspeedvectors(re, obi, oldobi->vectors, step); } else { |