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-24 10:24:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 10:24:53 +0400
commit5a90ea77bc1333efe4e1e54984a080550ed3f707 (patch)
tree8ba5f94ddcd2c57440197a910305daae5e913554 /source/blender/modifiers/intern/MOD_weightvg_util.c
parent69e6894b15271884623ea6f56ead06db83acbe99 (diff)
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 95e752c35df..47a2aeaf4a2 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -64,14 +64,14 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
/* Return immediately, if we have nothing to do! */
/* Also security checks... */
- if(((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL))
+ if (((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL))
|| !ELEM7(falloff_type, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH,
MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM,
MOD_WVG_MAPPING_STEP))
return;
/* Map each weight (vertex) to its new value, accordingly to the chosen mode. */
- for(i = 0; i < num; ++i) {
+ for (i = 0; i < num; ++i) {
float fac = new_w[i];
/* Code borrowed from the warp modifier. */
@@ -146,7 +146,7 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
MEM_freeN(v_co);
/* For each weight (vertex), make the mix between org and new weights. */
- for(i = 0; i < num; ++i) {
+ for (i = 0; i < num; ++i) {
int idx = indices ? indices[i] : i;
TexResult texres;
float h, s, v; /* For HSV color space. */
@@ -237,7 +237,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws,
{
int i;
- for(i = 0; i < num; i++) {
+ for (i = 0; i < num; i++) {
float w = weights[i];
MDeformVert *dv = &dvert[indices ? indices[i] : i];
MDeformWeight *dw = dws ? dws[i] : defvert_find_index(dv, defgrp_idx);
@@ -246,8 +246,8 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws,
CLAMP(w, 0.0f, 1.0f);
/* If the vertex is in this vgroup, remove it if needed, or just update it. */
- if(dw != NULL) {
- if(do_rem && w < rem_thresh) {
+ if (dw != NULL) {
+ if (do_rem && w < rem_thresh) {
defvert_remove_group(dv, dw);
}
else {
@@ -255,7 +255,7 @@ void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws,
}
}
/* Else, add it if needed! */
- else if(do_add && w > add_thresh) {
+ else if (do_add && w > add_thresh) {
defvert_add_index_notest(dv, defgrp_idx, w);
}
}