diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-10 20:26:46 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-10 20:45:11 +0400 |
commit | 32bc1eb677687893f48e2a76c8b7421b53492631 (patch) | |
tree | fde56a8b6670babcd393a54bc629994da49b5422 /source/blender/editors/armature/armature_skinning.c | |
parent | b100bdca25b15df16c1cd3261f8151b824eb8b19 (diff) |
Cleanup (no functional changes):
* int -> bool where possible
* Use const where possible
* Get rid of magic numbers
* Add/tweak a few UI tips
* A few other misc changes.
Diffstat (limited to 'source/blender/editors/armature/armature_skinning.c')
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index fbc18e977ce..5ff15b84284 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -238,7 +238,8 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i } } -static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, Object *par, int heat, bool mirror) +static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, Object *par, + int heat, const bool mirror) { /* This functions implements the automatic computation of vertex group * weights, either through envelopes or using a heat equilibrium. @@ -418,7 +419,8 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, MEM_freeN(verts); } -void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob, Object *par, int mode, bool mirror) +void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob, Object *par, + const int mode, const bool mirror) { /* Lets try to create some vertex groups * based on the bones of the parent armature. @@ -439,7 +441,7 @@ void create_vgroups_from_armature(ReportList *reports, Scene *scene, Object *ob, ED_vgroup_data_clamp_range(ob->data, defbase_tot); } } - else if (mode == ARM_GROUPS_ENVELOPE || mode == ARM_GROUPS_AUTO) { + else if (ELEM(mode, ARM_GROUPS_ENVELOPE, ARM_GROUPS_AUTO)) { /* Traverse the bone list, trying to create vertex groups * that are populated with the vertices for which the * bone is closest. |