diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-24 03:57:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-24 03:57:00 +0400 |
commit | 39c0e690d3ad350195c8c68b7a8d317d056ff6a0 (patch) | |
tree | 8536e8465b35c4bd0a4728eac5e7f21fce5f60fa /source/blender/editors/armature | |
parent | 394537715d1988056fe47a1c3a0dace6d39499e5 (diff) |
sub_v3_v3v3 --> sub_v3_v3 (where possible)
Diffstat (limited to 'source/blender/editors/armature')
4 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 6363732de8d..5e03dcfbefc 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -457,8 +457,8 @@ void docenter_armature (Scene *scene, View3D *v3d, Object *ob, int centermode) /* Do the adjustments */ for (ebone= arm->edbo->first; ebone; ebone=ebone->next) { - sub_v3_v3v3(ebone->head, ebone->head, cent); - sub_v3_v3v3(ebone->tail, ebone->tail, cent); + sub_v3_v3(ebone->head, cent); + sub_v3_v3(ebone->tail, cent); } /* Turn the list into an armature */ @@ -469,9 +469,7 @@ void docenter_armature (Scene *scene, View3D *v3d, Object *ob, int centermode) copy_m3_m4(omat, ob->obmat); mul_m3_v3(omat, cent); - ob->loc[0] += cent[0]; - ob->loc[1] += cent[1]; - ob->loc[2] += cent[2]; + add_v3_v3(ob->loc, cent); } else ED_armature_edit_free(ob); diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index d432b2fa653..c48e7686ca9 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -60,7 +60,7 @@ void setBoneRollFromNormal(EditBone *bone, float *no, float invmat[][4], float t sub_v3_v3v3(tangent, bone->tail, bone->head); project_v3_v3v3(vec, tangent, normal); - sub_v3_v3v3(normal, normal, vec); + sub_v3_v3(normal, vec); normalize_v3(normal); @@ -102,7 +102,7 @@ float calcArcCorrelation(BArcIterator *iter, int start, int end, float v0[3], fl IT_peek(iter, i); sub_v3_v3v3(v, iter->p, v0); project_v3_v3v3(d, v, n); - sub_v3_v3v3(v, v, d); + sub_v3_v3(v, d); dt = len_v3(d) - avg_t; diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 307abe809ec..521241373d0 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -568,8 +568,8 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end) { float d_rgb[3] = {1, 1, 1}; - VECCOPY(rgb, color); - sub_v3_v3v3(d_rgb, d_rgb, rgb); + copy_v3_v3(rgb, color); + sub_v3_v3(d_rgb, rgb); mul_v3_fl(d_rgb, 1.0f / (float)stk->nb_points); for (i = 0; i < stk->nb_points; i++) diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 8842e08d5eb..8c1171e967b 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -632,7 +632,7 @@ void addVertToBucket(EmbedBucket *b, float co[3]) void removeVertFromBucket(EmbedBucket *b, float co[3]) { mul_v3_fl(b->p, (float)b->nv); - sub_v3_v3v3(b->p, b->p, co); + sub_v3_v3(b->p, co); b->nv--; mul_v3_fl(b->p, 1.0f / (float)b->nv); } |