diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
commit | b9898ebde44d6584ea37a05aaeca8760d31ccc7b (patch) | |
tree | e6dfc796cc82b4b8b8c248c4ff29d2e2047ff84c /source/blender/makesrna/intern/rna_mesh_api.c | |
parent | b17380971a144896b34b7863a82bbda3ff68a39f (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh_api.c | 13 |
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 " |