Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-07 08:53:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-07 08:53:43 +0400
commit46045fbb09684ebc74835168ff4c5924261e3fc0 (patch)
treed233bc2baea422008e5f330ff457291907a387bc /source/blender/render
parent71e5edeb6a769e2fd861f5fe374e75391415402a (diff)
style cleanup - braces & else / if's
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/convertblender.c3
-rw-r--r--source/blender/render/intern/source/volumetric.c18
2 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 0af55e28b04..4f891ea17c2 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -3476,8 +3476,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
mc[vindex]=mcol[a*4+rev_tab[vindex]];
}
else if (layer->type == CD_TANGENT && mtng < 1) {
- if(need_nmap_tangent!=0)
- {
+ if (need_nmap_tangent != 0) {
const float * tangent = (const float *) layer->data;
float * ftang = RE_vlakren_get_nmap_tangent(obr, vlr, 1);
for(vindex=0; vindex<nr_verts; vindex++)
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index d45aee8ccf1..fee71563d2b 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -135,19 +135,20 @@ static int vol_get_bounds(ShadeInput *shi, const float co[3], const float vec[3]
isect->skip = RE_SKIP_VLR_NEIGHBOUR;
isect->orig.face = (void*)shi->vlr;
isect->orig.ob = (void*)shi->obi;
- } else { // if (intersect_type == VOL_BOUNDS_SS) {
+ }
+ else { // if (intersect_type == VOL_BOUNDS_SS) {
isect->skip= 0;
isect->orig.face= NULL;
isect->orig.ob = NULL;
}
- if(RE_rayobject_raycast(R.raytree, isect))
- {
+ if(RE_rayobject_raycast(R.raytree, isect)) {
hitco[0] = isect->start[0] + isect->dist*isect->dir[0];
hitco[1] = isect->start[1] + isect->dist*isect->dir[1];
hitco[2] = isect->start[2] + isect->dist*isect->dir[2];
return 1;
- } else {
+ }
+ else {
return 0;
}
}
@@ -492,8 +493,7 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, const float co[3], const
if (shi->mat->vol.shade_type == MA_VOL_SHADE_SHADOWED) {
mul_v3_fl(lacol, vol_get_shadow(shi, lar, co));
}
- else if (ELEM3(shi->mat->vol.shade_type, MA_VOL_SHADE_SHADED, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SHADEDPLUSMULTIPLE))
- {
+ else if (ELEM3(shi->mat->vol.shade_type, MA_VOL_SHADE_SHADED, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SHADEDPLUSMULTIPLE)) {
Isect is;
if (shi->mat->vol.shadeflag & MA_VOL_RECV_EXT_SHADOW) {
@@ -686,8 +686,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
}
- if (inside_volume == VOL_SHADE_INSIDE)
- {
+ if (inside_volume == VOL_SHADE_INSIDE) {
startco = shi->camera_co;
endco = shi->co;
@@ -706,8 +705,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
}
/* trace to find a backface, the other side bounds of the volume */
/* (ray intersect ignores front faces here) */
- else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, VOL_BOUNDS_DEPTH))
- {
+ else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, VOL_BOUNDS_DEPTH)) {
VlakRen *vlr = (VlakRen *)is.hit.face;
startco = shi->co;