From 264c8c21623c3b011494e169f0571c410331e553 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 10 Feb 2011 09:29:31 +0000 Subject: mesh.validate() now returns True if any corrections were made. tested that correcting invalid meshes works by generating random meshes and checking that only the first call to mesh.validate() makes changes. found 2 bugs in mesh validation. - face sorting array wasn't assigned correct indices. - removing invalid edges used wrong comparison. --- source/blender/makesrna/intern/rna_mesh_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index dd78e93835e..3090f8512e0 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -59,7 +59,10 @@ void RNA_api_mesh(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_CONTEXT); func= RNA_def_function(srna, "validate", "BKE_mesh_validate"); - RNA_def_function_ui_description(func, "validate geometry."); + RNA_def_function_ui_description(func, "validate geometry, return True when the mesh has had invalid geometry corrected/removed."); + parm= RNA_def_boolean(func, "verbose", 0, "Verbose", "Output information about the errors found"); + parm= RNA_def_boolean(func, "result", 0, "Result", ""); + RNA_def_function_return(func, parm); } #endif -- cgit v1.2.3