replace unhelpfully named `eck!` and `eek!` error prints, also some minor changes...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 Nov 2011 23:09:55 +0000 (23:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 Nov 2011 23:09:55 +0000 (23:09 +0000)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/operators/bevel.c
source/blender/bmesh/operators/connectops.c

index 5dff3f5c3ac65108e60768b3ef7cf08352fdf04c..995d755187f8d7c53b5c3f85267dbff6c70d3399 100644 (file)
@@ -386,7 +386,9 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob)
                        }
                        
                        if (!kb) {
-                               printf("error in DM_to_mesh: could not find active shapekey! eek!!\n");
+                               printf("%s: error - could not find active shapekey %d!\n",
+                                      __func__, ob->shapenr-1);
+
                                i = INT_MAX;
                        }
                } else {
index 7d42b3031ecc011703a2b4624c2814209997aa83..f9f19f760ee8961294391a1562f58a5863e1c250 100644 (file)
@@ -305,7 +305,7 @@ void BM_Compute_Normals(BMesh *bm)
                           adjust the dot product if one but not both loops 
                           actually runs from from e->v2 to e->v1 */
                        if ((l->prev->e->v1 == l->prev->v) ^ (l->e->v1 == l->v)) {
-                               dotprod *= -1.0f;
+                               dotprod= -dotprod;
                        }
 
                        fac = saacos(-dotprod);
@@ -321,8 +321,7 @@ void BM_Compute_Normals(BMesh *bm)
                        continue;
 
                if (normalize_v3(v->no) == 0.0f) {
-                       copy_v3_v3(v->no, v->co);
-                       normalize_v3(v->no);
+                       normalize_v3_v3(v->no, v->co);
                }
        }
        
@@ -395,7 +394,7 @@ static void bmesh_set_mdisps_space(BMesh *bm, int from, int to)
                                MDisps *lmd = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MDISPS);
                                
                                if (!lmd->disps) {
-                                       printf("eck!\n");
+                                       printf("%s: warning - 'lmd->disps' == NULL\n", __func__);
                                }
                                
                                if (lmd->disps && lmd->totdisp == mdisps->totdisp) {
index d8313802d690bf06b169433a5612e2a51af6f653..1c02f40c10823b63ca65b7b8e40a361b1164936b 100644 (file)
@@ -512,7 +512,7 @@ void bmesh_update_face_normal(BMesh *bm, BMFace *f, float (*projectverts)[3])
 void BM_flip_normal(BMesh *bm, BMFace *f)
 {      
        bmesh_loop_reverse(bm, f);
-       mul_v3_fl(f->no, -1.0f);
+       negate_v3(f->no);
 }
 
 /* detects if two line segments cross each other (intersects).
index 717ba0a7621b77a847ec297831943472df8e233f..3094ba4a157d30765a48167a90f39a6c419da85c 100644 (file)
@@ -430,7 +430,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                
                f = BM_Make_Ngon(bm, verts[0], verts[1], edges, BLI_array_count(edges), 0);
                if (!f) {
-                       printf("eek!!\n");
+                       printf("%s: could not make face!\n", __func__);
                        continue;
                }
                        
index e7a9322d8fdd78c8f2158f4c810d9d58a5ec075e..6c84b45c83b12021965bc59aeff1f3d879163e59 100644 (file)
@@ -227,7 +227,7 @@ void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op)
                        if (v && !e3) {                 
                                if (c==0) {
                                        if (BLI_array_count(vv1) && v == vv1[BLI_array_count(vv1)-1]) {
-                                               printf("eck!\n");
+                                               printf("%s: internal state waning *TODO DESCRIPTION!*\n", __func__);
                                        }
                                        BLI_array_append(vv1, v);
                                } else {