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:
Diffstat (limited to 'source/blender/collada/MeshImporter.cpp')
-rw-r--r--source/blender/collada/MeshImporter.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index b4b37f7d0bd..1e0f0244072 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -315,7 +315,8 @@ bool MeshImporter::primitive_has_faces(COLLADAFW::MeshPrimitive *mp) {
case COLLADAFW::MeshPrimitive::TRIANGLES:
case COLLADAFW::MeshPrimitive::TRIANGLE_FANS:
case COLLADAFW::MeshPrimitive::POLYLIST:
- case COLLADAFW::MeshPrimitive::POLYGONS: {
+ case COLLADAFW::MeshPrimitive::POLYGONS:
+ {
has_faces = true;
break;
}
@@ -347,8 +348,8 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
case COLLADAFW::MeshPrimitive::TRIANGLES:
case COLLADAFW::MeshPrimitive::TRIANGLE_FANS:
case COLLADAFW::MeshPrimitive::POLYLIST:
- case COLLADAFW::MeshPrimitive::POLYGONS: {
-
+ case COLLADAFW::MeshPrimitive::POLYGONS:
+ {
COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons *)mp;
size_t prim_poly_count = mpvc->getFaceCount();
@@ -361,7 +362,8 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
total_loop_count += prim_loop_count;
break;
}
- default: break;
+ default:
+ break;
}
}
@@ -400,16 +402,19 @@ unsigned int MeshImporter::get_vertex_count(COLLADAFW::Polygons *mp, int index)
int result;
switch (type) {
case COLLADAFW::MeshPrimitive::TRIANGLES:
- case COLLADAFW::MeshPrimitive::TRIANGLE_FANS: {
+ case COLLADAFW::MeshPrimitive::TRIANGLE_FANS:
+ {
result = 3;
break;
}
case COLLADAFW::MeshPrimitive::POLYLIST:
- case COLLADAFW::MeshPrimitive::POLYGONS: {
+ case COLLADAFW::MeshPrimitive::POLYGONS:
+ {
result = mp->getGroupedVerticesVertexCountArray()[index];
break;
}
- default: {
+ default:
+ {
result = -1;
break;
}
@@ -427,12 +432,14 @@ unsigned int MeshImporter::get_loose_edge_count(COLLADAFW::Mesh *mesh) {
COLLADAFW::MeshPrimitive *mp = prim_arr[i];
int type = mp->getPrimitiveType();
switch (type) {
- case COLLADAFW::MeshPrimitive::LINES: {
+ case COLLADAFW::MeshPrimitive::LINES:
+ {
size_t prim_totface = mp->getFaceCount();
loose_edge_count += prim_totface;
break;
}
- default: break;
+ default:
+ break;
}
}
return loose_edge_count;