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-11-20 09:50:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-20 09:50:19 +0400
commitdbdc76c9d01d9f84cf315555ddabd5cba43932d3 (patch)
treee0713eccadef62e11fa6c60711d5532a66c21629 /source/blender/modifiers
parente8667421ed4a72ceec9c73b4599e4f7f9b06b346 (diff)
code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c24
-rw-r--r--source/blender/modifiers/intern/MOD_laplaciansmooth.c6
-rw-r--r--source/blender/modifiers/intern/MOD_skin.c10
3 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index d9526199d16..4921c5e3585 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -185,7 +185,7 @@ static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op,
i++;
}
- BMO_ITER (ele, &oiter, dupe_op->slots_out, "newout", BM_ALL) {
+ BMO_ITER (ele, &oiter, dupe_op->slots_out, "geom.out", BM_ALL) {
BM_elem_index_set(ele, i); /* set_dirty */
i++;
}
@@ -197,7 +197,7 @@ static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op,
index_map = MEM_callocN(sizeof(int) * (*index_map_length), "index_map");
/*element type argument doesn't do anything here*/
- BMO_ITER (v, &oiter, find_op.slots_out, "targetmapout", 0) {
+ BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) {
v2 = BMO_iter_map_value_p(&oiter);
index_map[BM_elem_index_get(v)] = BM_elem_index_get(v2) + 1;
@@ -267,7 +267,7 @@ static void bm_merge_dm_transform(BMesh *bm, DerivedMesh *dm, float mat[4][4],
BMO_op_exec(bm, &find_op);
/* add new merge targets to weld operator */
- BMO_ITER (v, &oiter, find_op.slots_out, "targetmapout", 0) {
+ BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) {
v2 = BMO_iter_map_value_p(&oiter);
/* check in case the target vertex (v2) is already marked
* for merging */
@@ -307,12 +307,12 @@ static void merge_first_last(BMesh *bm,
/* append the last dupe's geom to the findop input verts */
BMO_slot_buffer_append(&find_op, slots_in, "verts",
- dupe_last, slots_out, "newout");
+ dupe_last, slots_out, "geom.out");
BMO_op_exec(bm, &find_op);
/* add new merge targets to weld operator */
- BMO_ITER (v, &oiter, find_op.slots_out, "targetmapout", 0) {
+ BMO_ITER (v, &oiter, find_op.slots_out, "targetmap.out", 0) {
v2 = BMO_iter_map_value_p(&oiter);
BMO_slot_map_ptr_insert(weld_op, weld_op->slots_in, "targetmap", v, v2);
}
@@ -437,18 +437,18 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
for (j = 0; j < count - 1; j++) {
BMVert *v, *v2, *v3;
BMOpSlot *geom_slot;
- BMOpSlot *newout_slot;
+ BMOpSlot *geom_out_slot;
BMOIter oiter;
if (j != 0) {
BMO_op_initf(bm, &dupe_op,
(BMO_FLAG_DEFAULTS & ~BMO_FLAG_RESPECT_HIDE),
- "duplicate geom=%S", &old_dupe_op, "newout");
+ "duplicate geom=%S", &old_dupe_op, "geom.out");
}
BMO_op_exec(bm, &dupe_op);
geom_slot = BMO_slot_get(dupe_op.slots_in, "geom");
- newout_slot = BMO_slot_get(dupe_op.slots_out, "newout");
+ geom_out_slot = BMO_slot_get(dupe_op.slots_out, "geom.out");
if ((amd->flags & MOD_ARR_MERGEFINAL) && j == 0) {
int first_geom_bytes = sizeof(BMVert *) * geom_slot->len;
@@ -460,7 +460,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
}
/* apply transformation matrix */
- BMO_ITER (v, &oiter, dupe_op.slots_out, "newout", BM_VERT) {
+ BMO_ITER (v, &oiter, dupe_op.slots_out, "geom.out", BM_VERT) {
mul_m4_v3(offset, v->co);
}
@@ -479,8 +479,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
for (i = 0; i < index_len; i++) {
if (!indexMap[i]) continue;
- /* merge v (from 'newout') into v2 (from old 'geom') */
- v = _E(newout_slot, i - geom_slot->len);
+ /* merge v (from 'geom.out') into v2 (from old 'geom') */
+ v = _E(geom_out_slot, i - geom_slot->len);
v2 = _E(geom_slot, indexMap[i] - 1);
/* check in case the target vertex (v2) is already marked
@@ -533,7 +533,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
mult_m4_m4m4(endoffset, offset, final_offset);
bm_merge_dm_transform(bm, end_cap, endoffset, amd,
&dupe_op, (count == 1) ? dupe_op.slots_in : dupe_op.slots_out,
- (count == 1) ? "geom" : "newout", &weld_op);
+ (count == 1) ? "geom" : "geom.out", &weld_op);
}
}
/* done capping */
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
index 6f6589d4d14..266226040a3 100644
--- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c
+++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
@@ -199,7 +199,7 @@ static void init_data(ModifierData *md)
smd->lambda = 0.00001f;
smd->lambda_border = 0.00005f;
smd->repeat = 1;
- smd->flag = MOD_LAPLACIANSMOOTH_X | MOD_LAPLACIANSMOOTH_Y | MOD_LAPLACIANSMOOTH_Z | MOD_LAPLACIANSMOOTH_VOLUME_PRESERVATION;
+ smd->flag = MOD_LAPLACIANSMOOTH_X | MOD_LAPLACIANSMOOTH_Y | MOD_LAPLACIANSMOOTH_Z | MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME;
smd->defgrp_name[0] = '\0';
}
@@ -511,7 +511,7 @@ static void validate_solution(LaplacianSystem *sys, short flag)
float leni, lene;
float vini, vend;
float *vi1, *vi2, ve1[3], ve2[3];
- if (flag & MOD_LAPLACIANSMOOTH_VOLUME_PRESERVATION) {
+ if (flag & MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME) {
vini = compute_volume(sys->vertexCos, sys->mfaces, sys->numFaces);
}
for (i = 0; i < sys->numEdges; i++) {
@@ -545,7 +545,7 @@ static void validate_solution(LaplacianSystem *sys, short flag)
}
}
}
- if (flag & MOD_LAPLACIANSMOOTH_VOLUME_PRESERVATION) {
+ if (flag & MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME) {
vend = compute_volume(sys->vertexCos, sys->mfaces, sys->numFaces);
volume_preservation(sys, vini, vend, flag);
}
diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c
index cc2405ed186..5e6c178762a 100644
--- a/source/blender/modifiers/intern/MOD_skin.c
+++ b/source/blender/modifiers/intern/MOD_skin.c
@@ -249,14 +249,14 @@ static int build_hull(SkinOutput *so, Frame **frames, int totframe)
}
/* Apply face attributes to hull output */
- BMO_ITER (f, &oiter, op.slots_out, "geomout", BM_FACE) {
+ BMO_ITER (f, &oiter, op.slots_out, "geom.out", BM_FACE) {
if (so->smd->flag & MOD_SKIN_SMOOTH_SHADING)
BM_elem_flag_enable(f, BM_ELEM_SMOOTH);
f->mat_nr = so->mat_nr;
}
/* Mark interior frames */
- BMO_ITER (v, &oiter, op.slots_out, "interior_geom_out", BM_VERT) {
+ BMO_ITER (v, &oiter, op.slots_out, "geom_interior.out", BM_VERT) {
for (i = 0; i < totframe; i++) {
Frame *frame = frames[i];
@@ -309,7 +309,7 @@ static int build_hull(SkinOutput *so, Frame **frames, int totframe)
/* Check if removing triangles above will create wire triangles,
* mark them too */
- BMO_ITER (e, &oiter, op.slots_out, "geomout", BM_EDGE) {
+ BMO_ITER (e, &oiter, op.slots_out, "geom.out", BM_EDGE) {
int is_wire = TRUE;
BM_ITER_ELEM (f, &iter, e, BM_FACES_OF_EDGE) {
if (!BM_elem_flag_test(f, BM_ELEM_TAG)) {
@@ -1229,7 +1229,7 @@ static void skin_fix_hole_no_good_verts(BMesh *bm, Frame *frame, BMFace *split_f
/* Update split face (should only be one new face created
* during extrusion) */
split_face = NULL;
- BMO_ITER (f, &oiter, op.slots_out, "faceout", BM_FACE) {
+ BMO_ITER (f, &oiter, op.slots_out, "faces.out", BM_FACE) {
BLI_assert(!split_face);
split_face = f;
}
@@ -1247,7 +1247,7 @@ static void skin_fix_hole_no_good_verts(BMesh *bm, Frame *frame, BMFace *split_f
BM_elem_flag_enable(longest_edge, BM_ELEM_TAG);
BMO_op_callf(bm, BMO_FLAG_DEFAULTS,
- "subdivide_edges edges=%he numcuts=%i quadcornertype=%i",
+ "subdivide_edges edges=%he cuts=%i quad_corner_type=%i",
BM_ELEM_TAG, 1, SUBD_STRAIGHT_CUT);
}
else if (split_face->len > 4) {