From 62ac943e3108ad5f70cd5349cd5f1cef98138313 Mon Sep 17 00:00:00 2001 From: Andrew Hale Date: Fri, 20 Jan 2012 02:10:09 +0000 Subject: - Added functions to remove mesh vertices, edges and faces. These functions remove a specified number of elements from the end of their respective arrays. For example, removing two vertices removes the last two vertices of the mesh. - Minor fixes to descriptions of add edge and add face functions. --- source/blender/makesrna/intern/rna_mesh.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index f6e958ab1f5..689b19b9371 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1699,6 +1699,10 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "add", "ED_mesh_vertices_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX); + + func= RNA_def_function(srna, "remove", "ED_mesh_vertices_remove"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to remove", 0, INT_MAX); } /* mesh.edges */ @@ -1717,7 +1721,11 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "add", "ED_mesh_edges_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of edges to add", 0, INT_MAX); + + func= RNA_def_function(srna, "remove", "ED_mesh_edges_remove"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of edges to remove", 0, INT_MAX); } /* mesh.faces */ @@ -1746,7 +1754,11 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "add", "ED_mesh_faces_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of faces to add", 0, INT_MAX); + + func= RNA_def_function(srna, "remove", "ED_mesh_faces_remove"); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of faces to remove", 0, INT_MAX); } /* mesh.vertex_colors */ -- cgit v1.2.3