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>2019-04-22 02:15:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-22 12:48:16 +0300
commita25a7714c592dff1fc1b3b4b0888bf984fa9e6fd (patch)
tree31335c1e02de10d3c97f9fdbe98b71ebc410e451 /source/blender/modifiers/intern/MOD_array.c
parent6cc09d006af4a89cea14485e8e3896bd38a80e4b (diff)
Cleanup: style, use braces for modifiers
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index c909f9dc076..3443d275c81 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -121,12 +121,15 @@ static int svert_sum_cmp(const void *e1, const void *e2)
const SortVertsElem *sv1 = e1;
const SortVertsElem *sv2 = e2;
- if (sv1->sum_co > sv2->sum_co)
+ if (sv1->sum_co > sv2->sum_co) {
return 1;
- else if (sv1->sum_co < sv2->sum_co)
+ }
+ else if (sv1->sum_co < sv2->sum_co) {
return -1;
- else
+ }
+ else {
return 0;
+ }
}
static void svert_from_mvert(SortVertsElem *sv,
@@ -441,10 +444,12 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
float obinv[4][4];
float result_mat[4][4];
- if (ctx->object)
+ if (ctx->object) {
invert_m4_m4(obinv, ctx->object->obmat);
- else
+ }
+ else {
unit_m4(obinv);
+ }
mul_m4_series(result_mat, offset, obinv, amd->offset_ob->obmat);
copy_m4_m4(offset, result_mat);
@@ -482,8 +487,9 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
}
}
- if (count < 1)
+ if (count < 1) {
count = 1;
+ }
/* The number of verts, edges, loops, polys, before eventually merging doubles */
result_nverts = chunk_nverts * count + start_cap_nverts + end_cap_nverts;