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/makesrna/intern/rna_mesh_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index d647c647136..283590fc529 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -202,6 +202,14 @@ static void rna_Mesh_count_selected_items(Mesh *mesh, int r_count[3])
BKE_mesh_count_selected_items(mesh, r_count);
}
+static void rna_Mesh_clear_geometry(Mesh *mesh)
+{
+ BKE_mesh_clear_geometry(mesh);
+
+ DEG_id_tag_update(&mesh->id, ID_RECALC_GEOMETRY);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, mesh);
+}
+
#else
void RNA_api_mesh(StructRNA *srna)
@@ -319,6 +327,11 @@ void RNA_api_mesh(StructRNA *srna)
func, "result", "nothing", 64, "Return value", "String description of result of comparison");
RNA_def_function_return(func, parm);
+ func = RNA_def_function(srna, "clear_geometry", "rna_Mesh_clear_geometry");
+ RNA_def_function_ui_description(
+ func,
+ "Remove all geometry from the mesh. Note that this does not free shape keys or materials");
+
func = RNA_def_function(srna, "validate", "BKE_mesh_validate");
RNA_def_function_ui_description(func,
"Validate geometry, return True when the mesh has had "