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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-05 16:03:01 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-05 16:03:01 +0300
commit7bae9ee6b62dbc5defffb698ec3d3f39ce460254 (patch)
tree4361f69ef42814c6df54e49fe98925aca4f4cfaf /source/blender/makesrna/intern/rna_mesh_api.c
parente442b9916eefaea9f98c126e2390b5aafa4518cc (diff)
Mesh validate: add an option to not clean temp/cache CDLayers.
This is mandatory for incoming custom normal imports from io scripts, because often geometry here is corrupted, so we need to call mesh.validate() to clean it up. Issue is, we cannot set custom normals before geometry is clean, so we need to store temporary plain loop normals in a CD_NORMAL layer, validate, and then set custom normals. So we need a way to prevent 'temp' lnors to be freed by validate.
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 015883d87ec..09f12f6a4af 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -207,7 +207,9 @@ void RNA_api_mesh(StructRNA *srna)
func = RNA_def_function(srna, "validate", "BKE_mesh_validate");
RNA_def_function_ui_description(func, "Validate geometry, return True when the mesh has had "
"invalid geometry corrected/removed");
- RNA_def_boolean(func, "verbose", 0, "Verbose", "Output information about the errors found");
+ RNA_def_boolean(func, "verbose", false, "Verbose", "Output information about the errors found");
+ RNA_def_boolean(func, "cleanup_cddata", true, "Cleanup CDData",
+ "Remove temp/cached cdlayers, like e.g. normals...");
parm = RNA_def_boolean(func, "result", 0, "Result", "");
RNA_def_function_return(func, parm);