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>2011-12-08 08:51:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-08 08:51:03 +0400
commit0feb2acd8a1deeb56c91723f557055ccd579ac0a (patch)
tree7f37eb3f1dd4cdcc4117848e7a637102da43d4a1 /source/blender/blenkernel/BKE_mesh.h
parent2b8249854499199299a4a067f9edfa691a14bbe9 (diff)
regarding [#29521] Invalid Vertex Weights
added checks to mesh.validate() so it checks for nan weights and negative groups which can crash blender. the file in the report looks to be corrupt, but this at least can make it load. also noticed validate was using isnan() and finite() were both used to check valid vertex locations, only finite is needed.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 232aa46575e..3e2b2e47be5 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -145,7 +145,13 @@ int mesh_center_bounds(struct Mesh *me, float cent[3]);
void mesh_translate(struct Mesh *me, float offset[3], int do_keys);
/* mesh_validate.c */
-int BKE_mesh_validate_arrays(struct Mesh *me, struct MVert *mverts, unsigned int totvert, struct MEdge *medges, unsigned int totedge, struct MFace *mfaces, unsigned int totface, const short do_verbose, const short do_fixes);
+int BKE_mesh_validate_arrays(
+ struct Mesh *me,
+ struct MVert *mverts, unsigned int totvert,
+ struct MEdge *medges, unsigned int totedge,
+ struct MFace *mfaces, unsigned int totface,
+ struct MDeformVert *dverts, /* assume totvert length */
+ const short do_verbose, const short do_fixes);
int BKE_mesh_validate(struct Mesh *me, int do_verbose);
int BKE_mesh_validate_dm(struct DerivedMesh *dm);