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:
authorGaia Clary <gaia.clary@machinimatrix.org>2016-11-13 00:20:07 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2016-11-13 00:20:07 +0300
commit447fc7c4ce3e2c7ddc0590a0373b5831304745e2 (patch)
tree71e19bda713fff1d65ca69b80d99213600910553 /source/blender/collada
parent4151f12713ce38b779e87afffdaf2ab30f9248fd (diff)
fix T50004: Removed check for empty mesh and adjusted the vertex import function to accept meshes without vertices as well
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/MeshImporter.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 6ff6de33d56..8f3bf88af65 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -317,11 +317,6 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh) // checks if mesh has su
}
}
- if (mesh->getPositions().empty()) {
- fprintf(stderr, "ERROR: Mesh %s has no vertices.\n", name.c_str());
- return false;
- }
-
return true;
}
@@ -329,11 +324,15 @@ void MeshImporter::read_vertices(COLLADAFW::Mesh *mesh, Mesh *me)
{
// vertices
COLLADAFW::MeshVertexData& pos = mesh->getPositions();
+ if (pos.empty()) {
+ return;
+ }
+
int stride = pos.getStride(0);
if (stride == 0) stride = 3;
-
- me->totvert = mesh->getPositions().getFloatValues()->getCount() / stride;
- me->mvert = (MVert *)CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, me->totvert);
+
+ me->totvert = pos.getFloatValues()->getCount() / stride;
+ me->mvert = (MVert *)CustomData_add_layer(&me->vdata, CD_MVERT, CD_CALLOC, NULL, me->totvert);
MVert *mvert;
int i;