From 37bad42b9ddb22b923287ca0f09388d2355b2c65 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 2 Sep 2013 18:33:06 +0000 Subject: Ack... Followup to r59743: in fact, bitflags groups are not always wanted/needed, thanks to Campell for notifying me about this! So now, their generation is controlled by a flag, else previous "simple values" group ids are generated (one per poly region, no need here to reduce the number of used IDs!). Will update obj exporter too. --- source/blender/makesrna/intern/rna_mesh_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_mesh_api.c') diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index ad9977fef50..7fec4a1ff9c 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -57,14 +57,15 @@ static const char *rna_Mesh_unit_test_compare(struct Mesh *mesh, bContext *C, st return ret; } -void rna_Mesh_calc_smooth_groups(struct Mesh *mesh, int *r_poly_group_len, int **r_poly_group, int *r_group_total) +void rna_Mesh_calc_smooth_groups(struct Mesh *mesh, int use_bitflags, int *r_poly_group_len, + int **r_poly_group, int *r_group_total) { *r_poly_group_len = mesh->totpoly; *r_poly_group = BKE_mesh_calc_smoothgroups( mesh->medge, mesh->totedge, mesh->mpoly, mesh->totpoly, mesh->mloop, mesh->totloop, - r_group_total); + r_group_total, use_bitflags); } #else @@ -87,6 +88,7 @@ void RNA_api_mesh(StructRNA *srna) func = RNA_def_function(srna, "calc_smooth_groups", "rna_Mesh_calc_smooth_groups"); RNA_def_function_ui_description(func, "Calculate smooth groups from sharp edges"); + RNA_def_boolean(func, "use_bitflags", false, "", "Produce bitflags groups instead of simple numeric values"); /* return values */ parm = RNA_def_int_array(func, "poly_groups", 1, NULL, 0, 0, "", "Smooth Groups", 0, 0); RNA_def_property_flag(parm, PROP_DYNAMIC | PROP_OUTPUT); -- cgit v1.2.3