diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-12 08:14:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-12 08:14:12 +0400 |
commit | 4bd0a2ba2dadee66d52f9a1101ee918f1327eec4 (patch) | |
tree | b567b077039e78467e21548c5e03fa8b94fc2b6c /source/blender/editors/transform | |
parent | 471a86bf9ccae23b63cb1a05c9525ef99987581d (diff) |
replace VECCOPY -> copy_v3_v3, added copy_v*_v*_short too for typesafe copying, some parts of the code are copying float -> short normals without scaling. fix coming next.
Diffstat (limited to 'source/blender/editors/transform')
7 files changed, 202 insertions, 202 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 5e2b1455b28..82598e0b5c6 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1091,7 +1091,7 @@ int calculateTransformCenter(bContext *C, int centerMode, float *vec) calculateCenter(t); // Copy center from constraint center. Transform center can be local - VECCOPY(vec, t->con.center); + copy_v3_v3(vec, t->con.center); } @@ -1210,7 +1210,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) mval[0]= x; mval[1]= y; - VECCOPY(vecrot, t->center); + copy_v3_v3(vecrot, t->center); if(t->flag & T_EDIT) { Object *ob= t->obedit; if(ob) mul_m4_v3(ob->obmat, vecrot); @@ -1963,7 +1963,7 @@ static void constraintTransLim(TransInfo *t, TransData *td) * - current space should be local */ unit_m4(cob.matrix); - VECCOPY(cob.matrix[3], td->loc); + copy_v3_v3(cob.matrix[3], td->loc); /* Evaluate valid constraints */ for (con= td->con; con; con= con->next) { @@ -2022,7 +2022,7 @@ static void constraintTransLim(TransInfo *t, TransData *td) } /* copy results from cob->matrix */ - VECCOPY(td->loc, cob.matrix[3]); + copy_v3_v3(td->loc, cob.matrix[3]); } } @@ -2292,8 +2292,8 @@ int Warp(TransInfo *t, const int UNUSED(mval[2])) * It needs to be in view space, but we need to take object's offset * into account if in Edit mode. */ - VECCOPY(cursor, curs); - VECCOPY(gcursor, cursor); + copy_v3_v3(cursor, curs); + copy_v3_v3(gcursor, cursor); if (t->flag & T_EDIT) { sub_v3_v3(cursor, t->obedit->obmat[3]); sub_v3_v3(gcursor, t->obedit->obmat[3]); @@ -2336,7 +2336,7 @@ int Warp(TransInfo *t, const int UNUSED(mval[2])) continue; /* translate point to center, rotate in such a way that outline==distance */ - VECCOPY(vec, td->iloc); + copy_v3_v3(vec, td->iloc); mul_m3_v3(td->mtx, vec); mul_m4_v3(t->viewmat, vec); sub_v3_v3(vec, t->viewmat[3]); @@ -2603,23 +2603,23 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) { /* local constraint shouldn't alter center */ if (t->around == V3D_LOCAL) { if (t->flag & T_OBJECT) { - VECCOPY(center, td->center); + copy_v3_v3(center, td->center); } else if (t->flag & T_EDIT) { if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) { - VECCOPY(center, td->center); + copy_v3_v3(center, td->center); } else { - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); } } else { - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); } } else { - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); } if (td->ext) { @@ -2719,10 +2719,10 @@ int Resize(TransInfo *t, const int mval[2]) if (t->flag & T_AUTOVALUES) { - VECCOPY(size, t->auto_values); + copy_v3_v3(size, t->auto_values); } - VECCOPY(t->values, size); + copy_v3_v3(t->values, size); size_to_mat3( mat,size); @@ -3020,7 +3020,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short mul_m3_m3m3(smat, td->smtx, totmat); /* calculate the total rotatation in eulers */ - VECCOPY(eul, td->ext->irot); + copy_v3_v3(eul, td->ext->irot); eulO_to_mat3( eulmat,eul, td->ext->rotOrder); /* mat = transform, obmat = bone rotation */ @@ -3030,7 +3030,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* and apply (to end result only) */ protectedRotateBits(td->protectflag, eul, td->ext->irot); - VECCOPY(td->ext->rot, eul); + copy_v3_v3(td->ext->rot, eul); } constraintRotLim(t, td); @@ -3100,7 +3100,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* and apply */ protectedRotateBits(td->protectflag, eul, td->ext->irot); - VECCOPY(td->ext->rot, eul); + copy_v3_v3(td->ext->rot, eul); } constraintRotLim(t, td); @@ -3244,8 +3244,8 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2])) float mat[3][3], totmat[3][3], smat[3][3]; float phi[2]; - VECCOPY(axis1, t->persinv[0]); - VECCOPY(axis2, t->persinv[1]); + copy_v3_v3(axis1, t->persinv[0]); + copy_v3_v3(axis2, t->persinv[1]); normalize_v3(axis1); normalize_v3(axis2); @@ -3341,7 +3341,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) { else { float dvec[3]; - VECCOPY(dvec, vec); + copy_v3_v3(dvec, vec); applyAspectRatio(t, dvec); dist = len_v3(vec); @@ -3448,7 +3448,7 @@ static void applyTranslation(TransInfo *t, float vec[3]) { t->con.applyVec(t, td, vec, tvec, pvec); } else { - VECCOPY(tvec, vec); + copy_v3_v3(tvec, vec); } mul_m3_v3(td->smtx, tvec); @@ -3475,7 +3475,7 @@ int Translation(TransInfo *t, const int UNUSED(mval[2])) } applySnapping(t, t->values); t->con.applyVec(t, NULL, t->values, tvec, pvec); - VECCOPY(t->values, tvec); + copy_v3_v3(t->values, tvec); headerTranslation(t, pvec, str); } else { @@ -3564,7 +3564,7 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) if (td->flag & TD_SKIP) continue; - VECCOPY(vec, td->axismtx[2]); + copy_v3_v3(vec, td->axismtx[2]); mul_v3_fl(vec, distance); mul_v3_fl(vec, td->factor); @@ -4608,7 +4608,7 @@ static int createSlideVerts(TransInfo *t) add_v3_v3(start, end); mul_v3_fl(start, 0.5f*(1.0f/totvec)); - VECCOPY(vec, start); + copy_v3_v3(vec, start); start[0] = t->mval[0]; start[1] = t->mval[1]; add_v3_v3v3(end, start, vec); @@ -5215,7 +5215,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2])) int i; /* saving original center */ - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); for(i = 0 ; i < t->total; i++, td++) { @@ -5229,11 +5229,11 @@ int Align(TransInfo *t, const int UNUSED(mval[2])) /* around local centers */ if (t->flag & (T_OBJECT|T_POSE)) { - VECCOPY(t->center, td->center); + copy_v3_v3(t->center, td->center); } else { if(t->settings->selectmode & SCE_SELECT_FACE) { - VECCOPY(t->center, td->center); + copy_v3_v3(t->center, td->center); } } @@ -5245,7 +5245,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2])) } /* restoring original center */ - VECCOPY(t->center, center); + copy_v3_v3(t->center, center); recalcData(t); @@ -5317,7 +5317,7 @@ int SeqSlide(TransInfo *t, const int UNUSED(mval[2])) float pvec[3] = {0.0f, 0.0f, 0.0f}; float tvec[3]; t->con.applyVec(t, NULL, t->values, tvec, pvec); - VECCOPY(t->values, tvec); + copy_v3_v3(t->values, tvec); } else { snapGrid(t, t->values); diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index be5f539431f..a06de9fa1ce 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -239,7 +239,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3 if(factor<0.0f) factor*= -factor; else factor*= factor; - VECCOPY(out, axis); + copy_v3_v3(out, axis); normalize_v3(out); mul_v3_fl(out, -factor); /* -factor makes move down going backwards */ } @@ -261,7 +261,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3 /* give arbitrary large value if projection is impossible */ factor = dot_v3v3(axis, norm); if (1.0f - fabsf(factor) < 0.0002f) { - VECCOPY(out, axis); + copy_v3_v3(out, axis); if (factor > 0) { mul_v3_fl(out, 1000000000.0f); } else { @@ -300,7 +300,7 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) { } factor = dot_v3v3(vec, vec) / factor; - VECCOPY(vec, norm); + copy_v3_v3(vec, norm); mul_v3_fl(vec, factor); add_v3_v3v3(out, in, vec); @@ -317,7 +317,7 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) { static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3]) { - VECCOPY(out, in); + copy_v3_v3(out, in); if (!td && t->con.mode & CON_APPLY) { mul_m3_v3(t->con.pmtx, out); @@ -332,13 +332,13 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo float c[3]; if (t->con.mode & CON_AXIS0) { - VECCOPY(c, t->con.mtx[0]); + copy_v3_v3(c, t->con.mtx[0]); } else if (t->con.mode & CON_AXIS1) { - VECCOPY(c, t->con.mtx[1]); + copy_v3_v3(c, t->con.mtx[1]); } else if (t->con.mode & CON_AXIS2) { - VECCOPY(c, t->con.mtx[2]); + copy_v3_v3(c, t->con.mtx[2]); } axisProjection(t, c, in, out); } @@ -360,7 +360,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo static void applyObjectConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3]) { - VECCOPY(out, in); + copy_v3_v3(out, in); if (t->con.mode & CON_APPLY) { if (!td) { mul_m3_v3(t->con.pmtx, out); @@ -373,18 +373,18 @@ static void applyObjectConstraintVec(TransInfo *t, TransData *td, float in[3], f float c[3]; if (t->con.mode & CON_AXIS0) { - VECCOPY(c, t->con.mtx[0]); + copy_v3_v3(c, t->con.mtx[0]); } else if (t->con.mode & CON_AXIS1) { - VECCOPY(c, t->con.mtx[1]); + copy_v3_v3(c, t->con.mtx[1]); } else if (t->con.mode & CON_AXIS2) { - VECCOPY(c, t->con.mtx[2]); + copy_v3_v3(c, t->con.mtx[2]); } axisProjection(t, c, in, out); } postConstraintChecks(t, out, pvec); - VECCOPY(out, pvec); + copy_v3_v3(out, pvec); } else { int i=0; @@ -481,15 +481,15 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], fl switch(mode) { case CON_AXIS0: case (CON_AXIS1|CON_AXIS2): - VECCOPY(vec, t->con.mtx[0]); + copy_v3_v3(vec, t->con.mtx[0]); break; case CON_AXIS1: case (CON_AXIS0|CON_AXIS2): - VECCOPY(vec, t->con.mtx[1]); + copy_v3_v3(vec, t->con.mtx[1]); break; case CON_AXIS2: case (CON_AXIS0|CON_AXIS1): - VECCOPY(vec, t->con.mtx[2]); + copy_v3_v3(vec, t->con.mtx[2]); break; } /* don't flip axis if asked to or if num input */ @@ -528,15 +528,15 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3], switch(mode) { case CON_AXIS0: case (CON_AXIS1|CON_AXIS2): - VECCOPY(vec, td->axismtx[0]); + copy_v3_v3(vec, td->axismtx[0]); break; case CON_AXIS1: case (CON_AXIS0|CON_AXIS2): - VECCOPY(vec, td->axismtx[1]); + copy_v3_v3(vec, td->axismtx[1]); break; case CON_AXIS2: case (CON_AXIS0|CON_AXIS1): - VECCOPY(vec, td->axismtx[2]); + copy_v3_v3(vec, td->axismtx[2]); break; } if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) { @@ -724,7 +724,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) glPushMatrix(); - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); if((t->spacetype == SPACE_VIEW3D) && t->obedit) { @@ -897,7 +897,7 @@ static void setNearestAxis3d(TransInfo *t) zfac = len_v3(t->persinv[0]) * 2.0f/t->ar->winx * zfac * 30.0f; for (i = 0; i<3; i++) { - VECCOPY(axis, t->con.mtx[i]); + copy_v3_v3(axis, t->con.mtx[i]); mul_v3_fl(axis, zfac); /* now we can project to get window coordinate */ diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index cae64899aeb..b98cd277f80 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -269,7 +269,7 @@ static void createTransTexspace(TransInfo *t) td->ext= t->ext= MEM_callocN(sizeof(TransDataExtension), "TransTexspace"); td->flag= TD_SELECTED; - VECCOPY(td->center, ob->obmat[3]); + copy_v3_v3(td->center, ob->obmat[3]); td->ob = ob; copy_m3_m4(td->mtx, ob->obmat); @@ -282,9 +282,9 @@ static void createTransTexspace(TransInfo *t) *texflag &= ~AUTOSPACE; } - VECCOPY(td->iloc, td->loc); - VECCOPY(td->ext->irot, td->ext->rot); - VECCOPY(td->ext->isize, td->ext->size); + copy_v3_v3(td->iloc, td->loc); + copy_v3_v3(td->ext->irot, td->ext->rot); + copy_v3_v3(td->ext->isize, td->ext->size); } /* ********************* edge (for crease) ***** */ @@ -420,7 +420,7 @@ static short apply_targetless_ik(Object *ob) copy_m4_m3(offs_bone, bone->bone_mat); /* The bone's root offset (is in the parent's coordinate system) */ - VECCOPY(offs_bone[3], bone->head); + copy_v3_v3(offs_bone[3], bone->head); /* Get the length translation of parent (length along y axis) */ offs_bone[3][1]+= parbone->length; @@ -431,7 +431,7 @@ static short apply_targetless_ik(Object *ob) copy_m4_m4(rmat, parbone->arm_mat); /* rmat used as temp */ /* the location of actual parent transform */ - VECCOPY(rmat[3], offs_bone[3]); + copy_v3_v3(rmat[3], offs_bone[3]); offs_bone[3][0]= offs_bone[3][1]= offs_bone[3][2]= 0.0f; mul_m4_v3(parchan->parent->pose_mat, rmat[3]); @@ -449,7 +449,7 @@ static short apply_targetless_ik(Object *ob) else { copy_m4_m3(tmat, bone->bone_mat); - VECCOPY(tmat[3], bone->head); + copy_v3_v3(tmat[3], bone->head); invert_m4_m4(imat, tmat); } /* result matrix */ @@ -491,7 +491,7 @@ static short apply_targetless_ik(Object *ob) /* causes problems with some constraints (e.g. childof), so disable this */ /* as it is IK shouldn't affect location directly */ - /* VECCOPY(parchan->loc, rmat[3]); */ + /* copy_v3_v3(parchan->loc, rmat[3]); */ } } @@ -511,8 +511,8 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr float cmat[3][3], tmat[3][3]; float vec[3]; - VECCOPY(vec, pchan->pose_mat[3]); - VECCOPY(td->center, vec); + copy_v3_v3(vec, pchan->pose_mat[3]); + copy_v3_v3(td->center, vec); td->ob = ob; td->flag = TD_SELECTED; @@ -530,10 +530,10 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr td->protectflag= pchan->protectflag; td->loc = pchan->loc; - VECCOPY(td->iloc, pchan->loc); + copy_v3_v3(td->iloc, pchan->loc); td->ext->size= pchan->size; - VECCOPY(td->ext->isize, pchan->size); + copy_v3_v3(td->ext->isize, pchan->size); if (pchan->rotmode > 0) { td->ext->rot= pchan->eul; @@ -541,7 +541,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr td->ext->rotAngle= NULL; td->ext->quat= NULL; - VECCOPY(td->ext->irot, pchan->eul); + copy_v3_v3(td->ext->irot, pchan->eul); } else if (pchan->rotmode == ROT_MODE_AXISANGLE) { td->ext->rot= NULL; @@ -550,7 +550,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr td->ext->quat= NULL; td->ext->irotAngle= pchan->rotAngle; - VECCOPY(td->ext->irotAxis, pchan->rotAxis); + copy_v3_v3(td->ext->irotAxis, pchan->rotAxis); } else { td->ext->rot= NULL; @@ -626,7 +626,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr else { // abusive storage of scale in the loc pointer :) td->loc= &bone->xwidth; - VECCOPY (td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); td->val= NULL; } } @@ -636,13 +636,13 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr bKinematicConstraint *data= has_targetless_ik(pchan); if(data) { if(data->flag & CONSTRAINT_IK_TIP) { - VECCOPY(data->grabtarget, pchan->pose_tail); + copy_v3_v3(data->grabtarget, pchan->pose_tail); } else { - VECCOPY(data->grabtarget, pchan->pose_head); + copy_v3_v3(data->grabtarget, pchan->pose_head); } td->loc = data->grabtarget; - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); data->flag |= CONSTRAINT_IK_AUTO; /* only object matrix correction */ @@ -885,7 +885,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) else data->flag= CONSTRAINT_IK_TIP; data->flag |= CONSTRAINT_IK_TEMP|CONSTRAINT_IK_AUTO; - VECCOPY(data->grabtarget, pchan->pose_tail); + copy_v3_v3(data->grabtarget, pchan->pose_tail); data->rootbone= 0; /* watch-it! has to be 0 here, since we're still on the same bone for the first time through the loop [#25885] */ /* we only include bones that are part of a continual connected chain */ @@ -1109,7 +1109,7 @@ static void createTransArmatureVerts(TransInfo *t) td->val= &ebo->rad_head; td->ival= *td->val; - VECCOPY (td->center, ebo->head); + copy_v3_v3(td->center, ebo->head); td->flag= TD_SELECTED; copy_m3_m3(td->smtx, smtx); @@ -1125,7 +1125,7 @@ static void createTransArmatureVerts(TransInfo *t) { td->val= &ebo->rad_tail; td->ival= *td->val; - VECCOPY (td->center, ebo->tail); + copy_v3_v3(td->center, ebo->tail); td->flag= TD_SELECTED; copy_m3_m3(td->smtx, smtx); @@ -1152,10 +1152,10 @@ static void createTransArmatureVerts(TransInfo *t) { // abusive storage of scale in the loc pointer :) td->loc= &ebo->xwidth; - VECCOPY (td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); td->val= NULL; } - VECCOPY (td->center, ebo->head); + copy_v3_v3(td->center, ebo->head); td->flag= TD_SELECTED; /* use local bone matrix */ @@ -1181,7 +1181,7 @@ static void createTransArmatureVerts(TransInfo *t) td->val= &(ebo->roll); td->ival= ebo->roll; - VECCOPY (td->center, ebo->head); + copy_v3_v3(td->center, ebo->head); td->flag= TD_SELECTED; td->ext = NULL; @@ -1194,8 +1194,8 @@ static void createTransArmatureVerts(TransInfo *t) { if (ebo->flag & BONE_TIPSEL) { - VECCOPY (td->iloc, ebo->tail); - VECCOPY (td->center, td->iloc); + copy_v3_v3(td->iloc, ebo->tail); + copy_v3_v3(td->center, td->iloc); td->loc= ebo->tail; td->flag= TD_SELECTED; if (ebo->flag & BONE_EDITMODE_LOCKED) @@ -1220,8 +1220,8 @@ static void createTransArmatureVerts(TransInfo *t) } if (ebo->flag & BONE_ROOTSEL) { - VECCOPY (td->iloc, ebo->head); - VECCOPY (td->center, td->iloc); + copy_v3_v3(td->iloc, ebo->head); + copy_v3_v3(td->center, td->iloc); td->loc= ebo->head; td->flag= TD_SELECTED; if (ebo->flag & BONE_EDITMODE_LOCKED) @@ -1279,8 +1279,8 @@ static void createTransMBallVerts(TransInfo *t) for(ml= mb->editelems->first; ml; ml= ml->next) { if(propmode || (ml->flag & SELECT)) { td->loc= &ml->x; - VECCOPY(td->iloc, td->loc); - VECCOPY(td->center, td->loc); + copy_v3_v3(td->iloc, td->loc); + copy_v3_v3(td->center, td->loc); if(ml->flag & SELECT) td->flag= TD_SELECTED | TD_USEQUAT | TD_SINGLESIZE; else td->flag= TD_USEQUAT; @@ -1444,9 +1444,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) ((bezt->f2 & SELECT) && hide_handles) || ((bezt->f1 & SELECT) && hide_handles == 0) ) { - VECCOPY(td->iloc, bezt->vec[0]); + copy_v3_v3(td->iloc, bezt->vec[0]); td->loc= bezt->vec[0]; - VECCOPY(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]); + copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]); if (hide_handles) { if(bezt->f2 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; @@ -1469,9 +1469,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) /* This is the Curve Point, the other two are handles */ if(propmode || (bezt->f2 & SELECT)) { - VECCOPY(td->iloc, bezt->vec[1]); + copy_v3_v3(td->iloc, bezt->vec[1]); td->loc= bezt->vec[1]; - VECCOPY(td->center, td->loc); + copy_v3_v3(td->center, td->loc); if(bezt->f2 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; td->ext = NULL; @@ -1503,9 +1503,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) ((bezt->f2 & SELECT) && hide_handles) || ((bezt->f3 & SELECT) && hide_handles == 0) ) { - VECCOPY(td->iloc, bezt->vec[2]); + copy_v3_v3(td->iloc, bezt->vec[2]); td->loc= bezt->vec[2]; - VECCOPY(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]); + copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]); if (hide_handles) { if(bezt->f2 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; @@ -1547,9 +1547,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t) for(a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) { if(bp->hide==0) { if(propmode || (bp->f1 & SELECT)) { - VECCOPY(td->iloc, bp->vec); + copy_v3_v3(td->iloc, bp->vec); td->loc= bp->vec; - VECCOPY(td->center, td->loc); + copy_v3_v3(td->center, td->loc); if(bp->f1 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; td->ext = NULL; @@ -1619,9 +1619,9 @@ static void createTransLatticeVerts(TransInfo *t) while(a--) { if(propmode || (bp->f1 & SELECT)) { if(bp->hide==0) { - VECCOPY(td->iloc, bp->vec); + copy_v3_v3(td->iloc, bp->vec); td->loc= bp->vec; - VECCOPY(td->center, td->loc); + copy_v3_v3(td->center, td->loc); if(bp->f1 & SELECT) td->flag= TD_SELECTED; else td->flag= 0; copy_m3_m3(td->smtx, smtx); @@ -1714,15 +1714,15 @@ static void createTransParticleVerts(bContext *C, TransInfo *t) for(k=0, key=point->keys; k<point->totkey; k++, key++) { if(key->flag & PEK_USE_WCO) { - VECCOPY(key->world_co, key->co); + copy_v3_v3(key->world_co, key->co); mul_m4_v3(mat, key->world_co); td->loc = key->world_co; } else td->loc = key->co; - VECCOPY(td->iloc, td->loc); - VECCOPY(td->center, td->loc); + copy_v3_v3(td->iloc, td->loc); + copy_v3_v3(td->center, td->loc); if(key->flag & PEK_SELECT) td->flag |= TD_SELECTED; @@ -1787,13 +1787,13 @@ void flushTransParticles(TransInfo *t) invert_m4_m4(imat,mat); for(k=0, key=point->keys; k<point->totkey; k++, key++) { - VECCOPY(co, key->world_co); + copy_v3_v3(co, key->world_co); mul_m4_v3(imat, co); /* optimization for proportional edit */ if(!propmode || !compare_v3v3(key->co, co, 0.0001f)) { - VECCOPY(key->co, co); + copy_v3_v3(key->co, co); point->flag |= PEP_EDIT_RECALC; } } @@ -1910,7 +1910,7 @@ static void get_face_center(float *cent, EditMesh *em, EditVert *eve) if(efa->v1==eve || efa->v2==eve || efa->v3==eve || efa->v4==eve) break; if(efa) { - VECCOPY(cent, efa->cent); + copy_v3_v3(cent, efa->cent); } } @@ -1924,13 +1924,13 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert //else td->loc = eve->co; - VECCOPY(td->center, td->loc); + copy_v3_v3(td->center, td->loc); if(t->around==V3D_LOCAL && (em->selectmode & SCE_SELECT_FACE)) get_face_center(td->center, em, eve); - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); // Setting normals - VECCOPY(td->axismtx[2], eve->no); + copy_v3_v3(td->axismtx[2], eve->no); td->axismtx[0][0] = td->axismtx[0][1] = td->axismtx[0][2] = @@ -1960,9 +1960,9 @@ static void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head if ( (vtd = BME_get_transdata(td,v)) ) { tob->loc = vtd->loc; tob->val = &vtd->factor; - VECCOPY(tob->iloc,vtd->co); - VECCOPY(tob->center,vtd->org); - VECCOPY(tob->axismtx[0],vtd->vec); + copy_v3_v3(tob->iloc,vtd->co); + copy_v3_v3(tob->center,vtd->org); + copy_v3_v3(tob->axismtx[0],vtd->vec); tob->axismtx[1][0] = vtd->max ? *vtd->max : 0; tob++; i++; @@ -2305,8 +2305,8 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f td->flag = 0; td->loc = td2d->loc; - VECCOPY(td->center, td->loc); - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->center, td->loc); + copy_v3_v3(td->iloc, td->loc); memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; @@ -2606,10 +2606,10 @@ static void createTransNlaData(bContext *C, TransInfo *t) /* now, link the transform data up to this data */ if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) { td->loc= tdn->h1; - VECCOPY(td->iloc, tdn->h1); + copy_v3_v3(td->iloc, tdn->h1); /* store all the other gunk that is required by transform */ - VECCOPY(td->center, center); + copy_v3_v3(td->center, center); memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; @@ -2638,10 +2638,10 @@ static void createTransNlaData(bContext *C, TransInfo *t) /* now, link the transform data up to this data */ if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) { td->loc= tdn->h2; - VECCOPY(td->iloc, tdn->h2); + copy_v3_v3(td->iloc, tdn->h2); /* store all the other gunk that is required by transform */ - VECCOPY(td->center, center); + copy_v3_v3(td->center, center); memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; @@ -3194,7 +3194,7 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, td->center[1] = cent[1]; td->center[2] = 0.0f; - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); } else { td2d->loc[0] = loc[0]; @@ -3203,8 +3203,8 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, td2d->loc2d = loc; td->loc = td2d->loc; - VECCOPY(td->center, cent); - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->center, cent); + copy_v3_v3(td->iloc, td->loc); } if (td->flag & TD_MOVEHANDLE1) { @@ -3903,8 +3903,8 @@ static TransData *SeqToTransData(TransData *td, TransData2D *td2d, TransDataSeq td->flag = 0; td->loc = td2d->loc; - VECCOPY(td->center, td->loc); - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->center, td->loc); + copy_v3_v3(td->iloc, td->loc); memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; @@ -4255,7 +4255,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) td->ob = ob; td->loc = ob->loc; - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); if (ob->rotmode > 0) { td->ext->rot= ob->rot; @@ -4263,8 +4263,8 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) td->ext->rotAngle= NULL; td->ext->quat= NULL; - VECCOPY(td->ext->irot, ob->rot); - VECCOPY(td->ext->drot, ob->drot); + copy_v3_v3(td->ext->irot, ob->rot); + copy_v3_v3(td->ext->drot, ob->drot); } else if (ob->rotmode == ROT_MODE_AXISANGLE) { td->ext->rot= NULL; @@ -4273,9 +4273,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) td->ext->quat= NULL; td->ext->irotAngle= ob->rotAngle; - VECCOPY(td->ext->irotAxis, ob->rotAxis); + copy_v3_v3(td->ext->irotAxis, ob->rotAxis); // td->ext->drotAngle= ob->drotAngle; // XXX, not implimented - // VECCOPY(td->ext->drotAxis, ob->drotAxis); // XXX, not implimented + // copy_v3_v3(td->ext->drotAxis, ob->drotAxis); // XXX, not implimented } else { td->ext->rot= NULL; @@ -4289,10 +4289,10 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) td->ext->rotOrder=ob->rotmode; td->ext->size = ob->size; - VECCOPY(td->ext->isize, ob->size); - VECCOPY(td->ext->dsize, ob->dsize); + copy_v3_v3(td->ext->isize, ob->size); + copy_v3_v3(td->ext->dsize, ob->dsize); - VECCOPY(td->center, ob->obmat[3]); + copy_v3_v3(td->center, ob->obmat[3]); copy_m4_m4(td->ext->obmat, ob->obmat); @@ -5202,8 +5202,8 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node) } td->loc = td2d->loc; - VECCOPY(td->center, td->loc); - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->center, td->loc); + copy_v3_v3(td->iloc, td->loc); memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index ec76bb3ac35..19e794bb5f1 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -115,9 +115,9 @@ void getViewVector(TransInfo *t, float coord[3], float vec[3]) { float p1[4], p2[4]; - VECCOPY(p1, coord); + copy_v3_v3(p1, coord); p1[3] = 1.0f; - VECCOPY(p2, p1); + copy_v3_v3(p2, p1); p2[3] = 1.0f; mul_m4_v4(t->viewmat, p2); @@ -130,7 +130,7 @@ void getViewVector(TransInfo *t, float coord[3], float vec[3]) sub_v3_v3v3(vec, p1, p2); } else { - VECCOPY(vec, t->viewinv[2]); + copy_v3_v3(vec, t->viewinv[2]); } normalize_v3(vec); } @@ -694,12 +694,12 @@ static void recalcData_view3d(TransInfo *t) if ((ebo->flag & BONE_CONNECTED) && ebo->parent){ /* If this bone has a parent tip that has been moved */ if (ebo->parent->flag & BONE_TIPSEL){ - VECCOPY (ebo->head, ebo->parent->tail); + copy_v3_v3 (ebo->head, ebo->parent->tail); if(t->mode==TFM_BONE_ENVELOPE) ebo->rad_head= ebo->parent->rad_tail; } /* If this bone has a parent tip that has NOT been moved */ else{ - VECCOPY (ebo->parent->tail, ebo->head); + copy_v3_v3 (ebo->parent->tail, ebo->head); if(t->mode==TFM_BONE_ENVELOPE) ebo->parent->rad_tail= ebo->rad_head; } } @@ -736,7 +736,7 @@ static void recalcData_view3d(TransInfo *t) float qrot[4]; ebo = td->extra; - VECCOPY(up_axis, td->axismtx[2]); + copy_v3_v3(up_axis, td->axismtx[2]); if (t->mode != TFM_ROTATION) { @@ -1259,12 +1259,12 @@ void applyTransObjects(TransInfo *t) TransData *td; for (td = t->data; td < t->data + t->total; td++) { - VECCOPY(td->iloc, td->loc); + copy_v3_v3(td->iloc, td->loc); if (td->ext->rot) { - VECCOPY(td->ext->irot, td->ext->rot); + copy_v3_v3(td->ext->irot, td->ext->rot); } if (td->ext->size) { - VECCOPY(td->ext->isize, td->ext->size); + copy_v3_v3(td->ext->isize, td->ext->size); } } recalcData(t); @@ -1273,7 +1273,7 @@ void applyTransObjects(TransInfo *t) static void restoreElement(TransData *td) { /* TransData for crease has no loc */ if (td->loc) { - VECCOPY(td->loc, td->iloc); + copy_v3_v3(td->loc, td->iloc); } if (td->val) { *td->val = td->ival; @@ -1281,17 +1281,17 @@ static void restoreElement(TransData *td) { if (td->ext && (td->flag&TD_NO_EXT)==0) { if (td->ext->rot) { - VECCOPY(td->ext->rot, td->ext->irot); + copy_v3_v3(td->ext->rot, td->ext->irot); } if(td->ext->rotAngle) { *td->ext->rotAngle= td->ext->irotAngle; } if(td->ext->rotAxis) { - VECCOPY(td->ext->rotAxis, td->ext->irotAxis); + copy_v3_v3(td->ext->rotAxis, td->ext->irotAxis); } /* XXX, drotAngle & drotAxis not used yet */ if (td->ext->size) { - VECCOPY(td->ext->size, td->ext->isize); + copy_v3_v3(td->ext->size, td->ext->isize); } if (td->ext->quat) { QUATCOPY(td->ext->quat, td->ext->iquat); @@ -1335,7 +1335,7 @@ void calculateCenter2D(TransInfo *t) Object *ob= t->obedit?t->obedit:t->poseobj; float vec[3]; - VECCOPY(vec, t->center); + copy_v3_v3(vec, t->center); mul_m4_v3(ob->obmat, vec); projectIntView(t, vec, t->center2d); } @@ -1349,7 +1349,7 @@ void calculateCenterCursor(TransInfo *t) float *cursor; cursor = give_cursor(t->scene, t->view); - VECCOPY(t->center, cursor); + copy_v3_v3(t->center, cursor); /* If edit or pose mode, move cursor in local space */ if (t->flag & (T_EDIT|T_POSE)) { @@ -1421,7 +1421,7 @@ void calculateCenterMedian(TransInfo *t) } if(i) mul_v3_fl(partial, 1.0f / total); - VECCOPY(t->center, partial); + copy_v3_v3(t->center, partial); calculateCenter2D(t); } @@ -1446,8 +1446,8 @@ void calculateCenterBound(TransInfo *t) } } else { - VECCOPY(max, t->data[i].center); - VECCOPY(min, t->data[i].center); + copy_v3_v3(max, t->data[i].center); + copy_v3_v3(min, t->data[i].center); } } add_v3_v3v3(t->center, min, max); @@ -1501,7 +1501,7 @@ void calculateCenter(TransInfo *t) Object *ob= OBACT; if(ob) { - VECCOPY(t->center, ob->obmat[3]); + copy_v3_v3(t->center, ob->obmat[3]); projectIntView(t, t->center, t->center2d); } } @@ -1510,7 +1510,7 @@ void calculateCenter(TransInfo *t) } /* setting constraint center */ - VECCOPY(t->con.center, t->center); + copy_v3_v3(t->con.center, t->center); if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; @@ -1530,7 +1530,7 @@ void calculateCenter(TransInfo *t) { float axis[3]; /* persinv is nasty, use viewinv instead, always right */ - VECCOPY(axis, t->viewinv[2]); + copy_v3_v3(axis, t->viewinv[2]); normalize_v3(axis); /* 6.0 = 6 grid units */ @@ -1543,8 +1543,8 @@ void calculateCenter(TransInfo *t) /* rotate only needs correct 2d center, grab needs initgrabz() value */ if(t->mode==TFM_TRANSLATION) { - VECCOPY(t->center, axis); - VECCOPY(t->con.center, t->center); + copy_v3_v3(t->center, axis); + copy_v3_v3(t->con.center, t->center); } } } @@ -1557,7 +1557,7 @@ void calculateCenter(TransInfo *t) Object *ob= t->obedit?t->obedit:t->poseobj; float vec[3]; - VECCOPY(vec, t->center); + copy_v3_v3(vec, t->center); mul_m4_v3(ob->obmat, vec); initgrabz(t->ar->regiondata, vec[0], vec[1], vec[2]); } diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index d62227a122d..491666c4ac9 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -884,7 +884,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving, if(arcs) { /* clipplane makes nice handles, calc here because of multmatrix but with translate! */ - VECCOPY(plane, rv3d->viewinv[2]); + VECCOPY(plane, rv3d->viewinv[2]); /* float -> double */ plane[3]= -0.02f*size; // clip just a bit more glClipPlane(GL_CLIP_PLANE0, plane); } @@ -1498,15 +1498,15 @@ void BIF_draw_manipulator(const bContext *C) if(v3d->around==V3D_ACTIVE && scene->obedit==NULL) { Object *ob= OBACT; if(ob && !(ob->mode & OB_MODE_POSE)) - VECCOPY(rv3d->twmat[3], ob->obmat[3]); + copy_v3_v3(rv3d->twmat[3], ob->obmat[3]); } break; case V3D_LOCAL: case V3D_CENTROID: - VECCOPY(rv3d->twmat[3], scene->twcent); + copy_v3_v3(rv3d->twmat[3], scene->twcent); break; case V3D_CURSOR: - VECCOPY(rv3d->twmat[3], give_cursor(scene, v3d)); + copy_v3_v3(rv3d->twmat[3], give_cursor(scene, v3d)); break; } diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2d539055db3..847fd951bcc 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -222,7 +222,7 @@ int createSpaceNormal(float mat[3][3], float normal[3]) { float tangent[3] = {0.0f, 0.0f, 1.0f}; - VECCOPY(mat[2], normal); + copy_v3_v3(mat[2], normal); if (normalize_v3(mat[2]) == 0.0f) { return 0; /* error return */ } @@ -243,7 +243,7 @@ int createSpaceNormal(float mat[3][3], float normal[3]) int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3]) { - VECCOPY(mat[2], normal); + copy_v3_v3(mat[2], normal); if (normalize_v3(mat[2]) == 0.0f) { return 0; /* error return */ } @@ -659,7 +659,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], for(eed= em->edges.first; eed; eed= eed->next) { if(eed->f & SELECT) { /* use average vert normals as plane and edge vector as normal */ - VECCOPY(plane, eed->v1->no); + copy_v3_v3(plane, eed->v1->no); VECADD(plane, plane, eed->v2->no); sub_v3_v3v3(normal, eed->v2->co, eed->v1->co); break; @@ -680,7 +680,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], else { v2 = eve; - VECCOPY(plane, v1->no); + copy_v3_v3(plane, v1->no); VECADD(plane, plane, v2->no); sub_v3_v3v3(normal, v2->co, v1->co); break; @@ -694,7 +694,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], for (eve = em->verts.first; eve; eve = eve->next) { if ( eve->f & SELECT ) { - VECCOPY(normal, eve->no); + copy_v3_v3(normal, eve->no); break; } } @@ -792,7 +792,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], /* Rotation of MetaElem is stored in quat */ quat_to_mat4( mat,ml_sel->quat); - VECCOPY(normal, mat[2]); + copy_v3_v3(normal, mat[2]); negate_v3_v3(plane, mat[1]); @@ -893,8 +893,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], } if (ob) { - VECCOPY(normal, ob->obmat[2]); - VECCOPY(plane, ob->obmat[1]); + copy_v3_v3(normal, ob->obmat[2]); + copy_v3_v3(plane, ob->obmat[1]); } result = ORIENTATION_NORMAL; } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index ca89670dedb..17fd7517d71 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -264,7 +264,7 @@ void applyProject(TransInfo *t) if (td->flag & TD_SKIP) continue; - VECCOPY(iloc, td->loc); + copy_v3_v3(iloc, td->loc); if (t->flag & (T_EDIT|T_POSE)) { Object *ob = t->obedit?t->obedit:t->poseobj; @@ -274,7 +274,7 @@ void applyProject(TransInfo *t) { td->ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; object_handle_update(t->scene, td->ob); - VECCOPY(iloc, td->ob->obmat[3]); + copy_v3_v3(iloc, td->ob->obmat[3]); } project_float(t->ar, iloc, mval); @@ -543,7 +543,7 @@ void addSnapPoint(TransInfo *t) if (t->tsnap.status & POINT_INIT) { TransSnapPoint *p = MEM_callocN(sizeof(TransSnapPoint), "SnapPoint"); - VECCOPY(p->co, t->tsnap.snapPoint); + copy_v3_v3(p->co, t->tsnap.snapPoint); BLI_addtail(&t->tsnap.points, p); @@ -580,7 +580,7 @@ void getSnapPoint(TransInfo *t, float vec[3]) mul_v3_fl(vec, 1.0f / total); } else { - VECCOPY(vec, t->tsnap.snapPoint) + copy_v3_v3(vec, t->tsnap.snapPoint); } } @@ -628,7 +628,7 @@ float RotationBetween(TransInfo *t, float p1[3], float p2[3]) { float angle, start[3], end[3], center[3]; - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; mul_m4_v3(ob->obmat, center); @@ -684,7 +684,7 @@ float ResizeBetween(TransInfo *t, float p1[3], float p2[3]) { float d1[3], d2[3], center[3]; - VECCOPY(center, t->center); + copy_v3_v3(center, t->center); if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; mul_m4_v3(ob->obmat, center); @@ -784,12 +784,12 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) } else { - VECCOPY(vec, p1->p); + copy_v3_v3(vec, p1->p); } if (last_p == NULL) { - VECCOPY(p, vec); + copy_v3_v3(p, vec); max_dist = 0; break; } @@ -798,7 +798,7 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) if (new_dist < max_dist) { - VECCOPY(p, vec); + copy_v3_v3(p, vec); max_dist = new_dist; } } @@ -806,7 +806,7 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) if (max_dist != FLT_MAX) { - VECCOPY(loc, p); + copy_v3_v3(loc, p); /* XXX, is there a correct normal in this case ???, for now just z up */ no[0]= 0.0; no[1]= 0.0; @@ -830,11 +830,11 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) if (dot_v3v3(tangent, tangent) > 0) { - VECCOPY(t->tsnap.snapTangent, tangent); + copy_v3_v3(t->tsnap.snapTangent, tangent); } - VECCOPY(t->tsnap.snapPoint, loc); - VECCOPY(t->tsnap.snapNormal, no); + copy_v3_v3(t->tsnap.snapPoint, loc); + copy_v3_v3(t->tsnap.snapNormal, no); t->tsnap.status |= POINT_INIT; } @@ -873,7 +873,7 @@ void TargetSnapCenter(TransInfo *t) // Only need to calculate once if ((t->tsnap.status & TARGET_INIT) == 0) { - VECCOPY(t->tsnap.snapTarget, t->center); + copy_v3_v3(t->tsnap.snapTarget, t->center); if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; mul_m4_v3(ob->obmat, t->tsnap.snapTarget); @@ -903,7 +903,7 @@ void TargetSnapActive(TransInfo *t) if (active_td) { - VECCOPY(t->tsnap.snapTarget, active_td->center); + copy_v3_v3(t->tsnap.snapTarget, active_td->center); if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; @@ -974,14 +974,14 @@ void TargetSnapClosest(TransInfo *t) float loc[3]; float dist; - VECCOPY(loc, bb->vec[j]); + copy_v3_v3(loc, bb->vec[j]); mul_m4_v3(td->ext->obmat, loc); dist = t->tsnap.distance(t, loc, t->tsnap.snapPoint); if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist)) { - VECCOPY(t->tsnap.snapTarget, loc); + copy_v3_v3(t->tsnap.snapTarget, loc); closest = td; t->tsnap.dist = dist; } @@ -993,13 +993,13 @@ void TargetSnapClosest(TransInfo *t) float loc[3]; float dist; - VECCOPY(loc, td->center); + copy_v3_v3(loc, td->center); dist = t->tsnap.distance(t, loc, t->tsnap.snapPoint); if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist)) { - VECCOPY(t->tsnap.snapTarget, loc); + copy_v3_v3(t->tsnap.snapTarget, loc); closest = td; t->tsnap.dist = dist; } @@ -1014,7 +1014,7 @@ void TargetSnapClosest(TransInfo *t) float loc[3]; float dist; - VECCOPY(loc, td->center); + copy_v3_v3(loc, td->center); if(t->flag & (T_EDIT|T_POSE)) { Object *ob= t->obedit?t->obedit:t->poseobj; @@ -1025,7 +1025,7 @@ void TargetSnapClosest(TransInfo *t) if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist)) { - VECCOPY(t->tsnap.snapTarget, loc); + copy_v3_v3(t->tsnap.snapTarget, loc); closest = td; t->tsnap.dist = dist; } @@ -1052,11 +1052,11 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl int screen_loc[2]; int new_dist; - VECCOPY(intersect, ray_normal_local); + copy_v3_v3(intersect, ray_normal_local); mul_v3_fl(intersect, lambda); add_v3_v3(intersect, ray_start_local); - VECCOPY(location, intersect); + copy_v3_v3(location, intersect); if (v4co) normal_quad_v3( normal,v1co, v2co, v3co, v4co); @@ -1075,8 +1075,8 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl *depth = new_depth; retval = 1; - VECCOPY(loc, location); - VECCOPY(no, normal); + copy_v3_v3(loc, location); + copy_v3_v3(no, normal); mul_m3_v3(timat, no); normalize_v3(no); @@ -1095,7 +1095,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh int result; int retval = 0; - VECCOPY(ray_end, ray_normal_local); + copy_v3_v3(ray_end, ray_normal_local); mul_v3_fl(ray_end, 2000); add_v3_v3v3(ray_end, ray_start_local, ray_end); @@ -1116,11 +1116,11 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh if (mul > 1) { mul = 1; - VECCOPY(intersect, v1co); + copy_v3_v3(intersect, v1co); } else if (mul < 0) { mul = 0; - VECCOPY(intersect, v2co); + copy_v3_v3(intersect, v2co); } if (dot_v3v3(ray_normal_local, dvec) > 0) @@ -1130,7 +1130,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh int screen_loc[2]; int new_dist; - VECCOPY(location, intersect); + copy_v3_v3(location, intersect); mul_m4_v3(obmat, location); @@ -1164,7 +1164,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh normalize_v3(no); } - VECCOPY(loc, location); + copy_v3_v3(loc, location); *dist = new_dist; } @@ -1188,7 +1188,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], fl int screen_loc[2]; int new_dist; - VECCOPY(location, vco); + copy_v3_v3(location, vco); mul_m4_v3(obmat, location); @@ -1202,7 +1202,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], fl *depth = new_depth; retval = 1; - VECCOPY(loc, location); + copy_v3_v3(loc, location); if (no) { @@ -1226,8 +1226,8 @@ static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm invert_m4_m4(imat, obmat); - VECCOPY(ray_start_local, ray_start); - VECCOPY(ray_normal_local, ray_normal); + copy_v3_v3(ray_start_local, ray_start); + copy_v3_v3(ray_normal_local, ray_normal); mul_m4_v3(imat, ray_start_local); mul_mat3_m4_v3(imat, ray_normal_local); @@ -1300,8 +1300,8 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh copy_m3_m4(timat, imat); transpose_m3(timat); - VECCOPY(ray_start_local, ray_start); - VECCOPY(ray_normal_local, ray_normal); + copy_v3_v3(ray_start_local, ray_start); + copy_v3_v3(ray_normal_local, ray_normal); mul_m4_v3(imat, ray_start_local); mul_mat3_m4_v3(imat, ray_normal_local); @@ -1699,8 +1699,8 @@ static void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float n peel->depth = depth; peel->ob = ob; - VECCOPY(peel->p, p); - VECCOPY(peel->no, no); + copy_v3_v3(peel->p, p); + copy_v3_v3(peel->no, no); BLI_addtail(depth_peels, peel); @@ -1724,8 +1724,8 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float copy_m3_m4(timat, imat); transpose_m3(timat); - VECCOPY(ray_start_local, ray_start); - VECCOPY(ray_normal_local, ray_normal); + copy_v3_v3(ray_start_local, ray_start); + copy_v3_v3(ray_normal_local, ray_normal); mul_m4_v3(imat, ray_start_local); mul_mat3_m4_v3(imat, ray_normal_local); @@ -1757,11 +1757,11 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float float intersect[3]; float new_depth; - VECCOPY(intersect, ray_normal_local); + copy_v3_v3(intersect, ray_normal_local); mul_v3_fl(intersect, lambda); add_v3_v3(intersect, ray_start_local); - VECCOPY(location, intersect); + copy_v3_v3(location, intersect); if (f->v4) normal_quad_v3( normal,verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co); @@ -1787,11 +1787,11 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float float intersect[3]; float new_depth; - VECCOPY(intersect, ray_normal_local); + copy_v3_v3(intersect, ray_normal_local); mul_v3_fl(intersect, lambda); add_v3_v3(intersect, ray_start_local); - VECCOPY(location, intersect); + copy_v3_v3(location, intersect); if (f->v4) normal_quad_v3( normal,verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co); |