Cycles:
[blender.git] / intern / cycles / blender / blender_mesh.cpp
index 28d89e6fdc331e6e603ebdc46b964f7b3e047182..d628fa04f92170fb8ec772f39e26187fff25a485 100644 (file)
@@ -237,8 +237,8 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
                bool smooth = f->use_smooth();
 
                if(n == 4) {
-                       if(length_squared(cross(mesh->verts[vi[1]] - mesh->verts[vi[0]], mesh->verts[vi[2]] - mesh->verts[vi[0]])) == 0.0f ||
-                               length_squared(cross(mesh->verts[vi[2]] - mesh->verts[vi[0]], mesh->verts[vi[3]] - mesh->verts[vi[0]])) == 0.0f) {
+                       if(len_squared(cross(mesh->verts[vi[1]] - mesh->verts[vi[0]], mesh->verts[vi[2]] - mesh->verts[vi[0]])) == 0.0f ||
+                               len_squared(cross(mesh->verts[vi[2]] - mesh->verts[vi[0]], mesh->verts[vi[3]] - mesh->verts[vi[0]])) == 0.0f) {
                                mesh->add_triangle(vi[0], vi[1], vi[3], shader, smooth);
                                mesh->add_triangle(vi[2], vi[3], vi[1], shader, smooth);
                        }