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-09-08 10:40:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-08 10:40:03 +0400
commita9f10b6bc2fb55be26ae3a7e8b1467213678a0f6 (patch)
tree12ac3a6320add8687c455cc7065b6eef0a73de7d /source/blender/editors/mesh/editmesh_rip.c
parentc95d4f68b863c851d0b8bddef8092fdc0932610e (diff)
style cleanup
Diffstat (limited to 'source/blender/editors/mesh/editmesh_rip.c')
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index d2806233fa9..4d4a890300f 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -464,6 +464,8 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
dist = FLT_MAX;
+ /* in the loop below we find the best vertex to drag based on its connected geometry,
+ * either by its face corner, or connected edge (when no faces are attached) */
for (i = 0; i < vout_len; i++) {
if (BM_vert_is_wire(vout[i]) == FALSE) {
@@ -473,7 +475,8 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
float l_mid_co[3];
BM_loop_calc_face_tangent(l, l_mid_co);
- /* scale to average of surrounding edge size, only needs to be approx */
+ /* scale to average of surrounding edge size, only needs to be approx, but should
+ * be roughly equivalent to the check below which uses the middle of the edge. */
mul_v3_fl(l_mid_co, (BM_edge_calc_length(l->e) + BM_edge_calc_length(l->prev->e)) / 2.0f);
add_v3_v3(l_mid_co, v->co);