From 44505b38df557a5711703613685a1dec9fc2c3d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 Jun 2018 09:31:30 +0200 Subject: Cleanup: strip trailing space in editors --- .../blender/editors/armature/armature_skinning.c | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'source/blender/editors/armature/armature_skinning.c') diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index 0458fc4ed1b..8ab8d60af75 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -72,7 +72,7 @@ static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap) * This function performs 2 functions: * * a) It returns 1 if the bone is skinnable. - * If we loop over all bones with this + * If we loop over all bones with this * function, we can count the number of * skinnable bones. * b) If the pointer data is non null, @@ -97,10 +97,10 @@ static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap) segments = bone->segments; else segments = 1; - + if (data->list != NULL) { hbone = (Bone ***) &data->list; - + for (a = 0; a < segments; a++) { **hbone = bone; ++*hbone; @@ -112,10 +112,10 @@ static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap) return 0; } -static int vgroup_add_unique_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr)) +static int vgroup_add_unique_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr)) { /* This group creates a vertex group to ob that has the - * same name as bone (provided the bone is skinnable). + * same name as bone (provided the bone is skinnable). * If such a vertex group already exist the routine exits. */ if (!(bone->flag & BONE_NO_DEFORM)) { @@ -127,7 +127,7 @@ static int vgroup_add_unique_bone_cb(Object *ob, Bone *bone, void *UNUSED(ptr)) return 0; } -static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) +static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) { /* Bones that are deforming * are regarded to be "skinnable" and are eligible for @@ -135,16 +135,16 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) * * This function performs 2 functions: * - * a) If the bone is skinnable, it creates + * a) If the bone is skinnable, it creates * a vertex group for ob that has * the name of the skinnable bone * (if one doesn't exist already). * b) If the pointer data is non null, * it is treated like a handle to a - * bDeformGroup pointer -- the + * bDeformGroup pointer -- the * bDeformGroup pointer is set to point * to the deform group with the bone's - * name, and the pointer the handle + * name, and the pointer the handle * points to is incremented to point to the * next member of an array of pointers * to bDeformGroups. This way we can loop using @@ -164,7 +164,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) segments = bone->segments; else segments = 1; - + if (!wpmode || ((arm->layer & bone->layer) && (bone->flag & BONE_SELECTED))) { if (!(defgroup = defgroup_find_name(ob, bone->name))) { defgroup = BKE_object_defgroup_add_name(ob, bone->name); @@ -174,10 +174,10 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) defgroup = NULL; } } - + if (data->list != NULL) { hgroup = (bDeformGroup ***) &data->list; - + for (a = 0; a < segments; a++) { **hgroup = defgroup; ++*hgroup; @@ -216,25 +216,25 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i } iflip = (dgroupflip) ? mesh_get_x_mirror_vert(ob, NULL, i, use_topology) : -1; - + /* for each skinnable bone */ for (j = 0; j < numbones; ++j) { if (!selected[j]) continue; - + bone = bonelist[j]; dgroup = dgrouplist[j]; - + /* store the distance-factor from the vertex to the bone */ distance = distfactor_to_bone(verts[i], root[j], tip[j], bone->rad_head * scale, bone->rad_tail * scale, bone->dist * scale); - + /* add the vert to the deform group if (weight != 0.0) */ if (distance != 0.0f) ED_vgroup_vert_add(ob, dgroup, i, distance, WEIGHT_REPLACE); else ED_vgroup_vert_remove(ob, dgroup, i); - + /* do same for mirror */ if (dgroupflip && dgroupflip[j] && iflip != -1) { if (distance != 0.0f) @@ -281,10 +281,10 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, /* count the number of skinnable bones */ numbones = bone_looper(ob, arm->bonebase.first, &looper_data, bone_skinnable_cb); - + if (numbones == 0) return; - + if (BKE_object_defgroup_data_create(ob->data) == NULL) return; @@ -312,13 +312,13 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, for (j = 0; j < numbones; ++j) { bone = bonelist[j]; dgroup = dgrouplist[j]; - + /* handle bbone */ if (heat) { if (segments == 0) { segments = 1; bbone = NULL; - + if ((par->pose) && (pchan = BKE_pose_channel_find_name(par->pose, bone->name))) { if (bone->segments > 1) { segments = bone->segments; @@ -327,10 +327,10 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, } } } - + segments--; } - + /* compute root and tip */ if (bbone) { mul_v3_m4v3(root[j], bone->arm_mat, bbone[segments].mat[3]); @@ -345,10 +345,10 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, copy_v3_v3(root[j], bone->arm_head); copy_v3_v3(tip[j], bone->arm_tail); } - + mul_m4_v3(par->obmat, root[j]); mul_m4_v3(par->obmat, tip[j]); - + /* set selected */ if (wpmode) { if ((arm->layer & bone->layer) && (bone->flag & BONE_SELECTED)) @@ -356,7 +356,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, } else selected[j] = 1; - + /* find flipped group */ if (dgroup && mirror) { char name_flip[MAXBONENAME]; @@ -373,12 +373,12 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, if (wpmode) { /* if in weight paint mode, use final verts from derivedmesh */ DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); - + if (dm->foreachMappedVert) { mesh_get_mapped_verts_coords(dm, verts, mesh->totvert); vertsfilled = 1; } - + dm->release(dm); } else if (modifiers_findByType(ob, eModifierType_Subsurf)) { @@ -427,7 +427,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, void ED_object_vgroup_calc_from_armature(ReportList *reports, Scene *scene, Object *ob, Object *par, const int mode, const bool mirror) { - /* Lets try to create some vertex groups + /* Lets try to create some vertex groups * based on the bones of the parent armature. */ bArmature *arm = par->data; @@ -435,7 +435,7 @@ void ED_object_vgroup_calc_from_armature(ReportList *reports, Scene *scene, Obje if (mode == ARM_GROUPS_NAME) { const int defbase_tot = BLI_listbase_count(&ob->defbase); int defbase_add; - /* Traverse the bone list, trying to create empty vertex + /* Traverse the bone list, trying to create empty vertex * groups corresponding to the bone. */ defbase_add = bone_looper(ob, arm->bonebase.first, NULL, vgroup_add_unique_bone_cb); @@ -447,7 +447,7 @@ void ED_object_vgroup_calc_from_armature(ReportList *reports, Scene *scene, Obje } } else if (ELEM(mode, ARM_GROUPS_ENVELOPE, ARM_GROUPS_AUTO)) { - /* Traverse the bone list, trying to create vertex groups + /* Traverse the bone list, trying to create vertex groups * that are populated with the vertices for which the * bone is closest. */ -- cgit v1.2.3