From 0d63bb005ff7c45ca0ebcfbe4eaf1215dfe2d3e2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Oct 2011 12:40:15 +0000 Subject: replace VECCOPY and QUATCOPY with inline funcs. --- source/blender/blenkernel/intern/action.c | 28 +++++------ source/blender/blenkernel/intern/anim.c | 24 ++++----- source/blender/blenkernel/intern/armature.c | 76 ++++++++++++++--------------- source/blender/blenkernel/intern/curve.c | 60 +++++++++++------------ source/blender/blenkernel/intern/fcurve.c | 20 ++++---- source/blender/blenkernel/intern/key.c | 26 +++++----- source/blender/blenkernel/intern/object.c | 10 ++-- 7 files changed, 122 insertions(+), 122 deletions(-) (limited to 'source/blender/blenkernel/intern') diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 8e9d5ee34a8..2a1794fe2fc 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -647,12 +647,12 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan { bConstraint *pcon, *con; - VECCOPY(pchan->loc, chan->loc); - VECCOPY(pchan->size, chan->size); - VECCOPY(pchan->eul, chan->eul); - VECCOPY(pchan->rotAxis, chan->rotAxis); + copy_v3_v3(pchan->loc, chan->loc); + copy_v3_v3(pchan->size, chan->size); + copy_v3_v3(pchan->eul, chan->eul); + copy_v3_v3(pchan->rotAxis, chan->rotAxis); pchan->rotAngle= chan->rotAngle; - QUATCOPY(pchan->quat, chan->quat); + copy_qt_qt(pchan->quat, chan->quat); pchan->rotmode= chan->rotmode; copy_m4_m4(pchan->chan_mat, (float(*)[4])chan->chan_mat); copy_m4_m4(pchan->pose_mat, (float(*)[4])chan->pose_mat); @@ -681,9 +681,9 @@ void duplicate_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *pchan_ /* ik (dof) settings */ pchan->ikflag = pchan_from->ikflag; - VECCOPY(pchan->limitmin, pchan_from->limitmin); - VECCOPY(pchan->limitmax, pchan_from->limitmax); - VECCOPY(pchan->stiffness, pchan_from->stiffness); + copy_v3_v3(pchan->limitmin, pchan_from->limitmin); + copy_v3_v3(pchan->limitmax, pchan_from->limitmax); + copy_v3_v3(pchan->stiffness, pchan_from->stiffness); pchan->ikstretch= pchan_from->ikstretch; pchan->ikrotweight= pchan_from->ikrotweight; pchan->iklinweight= pchan_from->iklinweight; @@ -1118,13 +1118,13 @@ void copy_pose_result(bPose *to, bPose *from) copy_m4_m4(pchanto->chan_mat, pchanfrom->chan_mat); /* used for local constraints */ - VECCOPY(pchanto->loc, pchanfrom->loc); - QUATCOPY(pchanto->quat, pchanfrom->quat); - VECCOPY(pchanto->eul, pchanfrom->eul); - VECCOPY(pchanto->size, pchanfrom->size); + copy_v3_v3(pchanto->loc, pchanfrom->loc); + copy_qt_qt(pchanto->quat, pchanfrom->quat); + copy_v3_v3(pchanto->eul, pchanfrom->eul); + copy_v3_v3(pchanto->size, pchanfrom->size); - VECCOPY(pchanto->pose_head, pchanfrom->pose_head); - VECCOPY(pchanto->pose_tail, pchanfrom->pose_tail); + copy_v3_v3(pchanto->pose_head, pchanfrom->pose_head); + copy_v3_v3(pchanto->pose_tail, pchanfrom->pose_tail); pchanto->rotmode= pchanfrom->rotmode; pchanto->flag= pchanfrom->flag; diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 716f3ed2726..2ef13318af4 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -363,10 +363,10 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets) if (mpt->pchan) { /* heads or tails */ if (mpath->flag & MOTIONPATH_FLAG_BHEAD) { - VECCOPY(mpv->co, mpt->pchan->pose_head); + copy_v3_v3(mpv->co, mpt->pchan->pose_head); } else { - VECCOPY(mpv->co, mpt->pchan->pose_tail); + copy_v3_v3(mpv->co, mpt->pchan->pose_tail); } /* result must be in worldspace */ @@ -374,7 +374,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets) } else { /* worldspace object location */ - VECCOPY(mpv->co, mpt->ob->obmat[3]); + copy_v3_v3(mpv->co, mpt->ob->obmat[3]); } } } @@ -654,15 +654,15 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat, totfac= data[0]+data[3]; if(totfac>FLT_EPSILON) interp_qt_qtqt(q1, p0->quat, p3->quat, data[3] / totfac); - else QUATCOPY(q1, p1->quat); + else copy_qt_qt(q1, p1->quat); totfac= data[1]+data[2]; if(totfac>FLT_EPSILON) interp_qt_qtqt(q2, p1->quat, p2->quat, data[2] / totfac); - else QUATCOPY(q2, p3->quat); + else copy_qt_qt(q2, p3->quat); totfac = data[0]+data[1]+data[2]+data[3]; if(totfac>FLT_EPSILON) interp_qt_qtqt(quat, q1, q2, (data[1]+data[2]) / totfac); - else QUATCOPY(quat, q2); + else copy_qt_qt(quat, q2); } if(radius) @@ -842,7 +842,7 @@ static void vertex_dupli__mapFunc(void *userData, int index, float *co, float *n add_v3_v3(vec, vdd->obmat[3]); copy_m4_m4(obmat, vdd->obmat); - VECCOPY(obmat[3], vec); + copy_v3_v3(obmat[3], vec); if(vdd->par->transflag & OB_DUPLIROT) { if(no_f) { @@ -867,7 +867,7 @@ static void vertex_dupli__mapFunc(void *userData, int index, float *co, float *n vdd->ob->lay = origlay; if(vdd->orco) - VECCOPY(dob->orco, vdd->orco[index]); + copy_v3_v3(dob->orco, vdd->orco[index]); if(vdd->ob->transflag & OB_DUPLI) { float tmpmat[4][4]; @@ -1119,7 +1119,7 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa copy_m4_m4(obmat, ob__obmat); - VECCOPY(obmat[3], cent); + copy_v3_v3(obmat[3], cent); /* rotation */ tri_to_quat( quat,v1, v2, v3); @@ -1378,7 +1378,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p psys_get_dupli_path_transform(&sim, NULL, cpa, cache, pamat, &scale); } - VECCOPY(pamat[3], cache->co); + copy_v3_v3(pamat[3], cache->co); pamat[3][3]= 1.0f; } @@ -1426,7 +1426,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p /* to give ipos in object correct offset */ where_is_object_time(scene, ob, ctime-pa_time); - VECCOPY(vec, obmat[3]); + copy_v3_v3(vec, obmat[3]); obmat[3][0] = obmat[3][1] = obmat[3][2] = 0.0f; /* particle rotation uses x-axis as the aligned axis, so pre-rotate the object accordingly */ @@ -1546,7 +1546,7 @@ static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, i mul_m4_v3(pmat, vec); copy_m4_m4(obmat, par->obmat); - VECCOPY(obmat[3], vec); + copy_v3_v3(obmat[3], vec); new_dupli_object(lb, ob, obmat, par->lay, a, OB_DUPLIVERTS, animated); } diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 2ebede13d70..9fba18dd7cf 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -390,11 +390,11 @@ static void equalize_bezier(float *data, int desired) pdist[0]= 0.0f; for(a=0, fp= data; asegments elements */ @@ -488,9 +488,9 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest) /* transform previous point inside this bone space */ if(rest) - VECCOPY(h1, prev->bone->arm_head) + copy_v3_v3(h1, prev->bone->arm_head); else - VECCOPY(h1, prev->pose_head) + copy_v3_v3(h1, prev->pose_head); mul_m4_v3(imat, h1); if(prev->bone->segments>1) { @@ -527,9 +527,9 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest) /* transform next point inside this bone space */ if(rest) - VECCOPY(h2, next->bone->arm_tail) + copy_v3_v3(h2, next->bone->arm_tail); else - VECCOPY(h2, next->pose_tail) + copy_v3_v3(h2, next->pose_tail); mul_m4_v3(imat, h2); /* if next bone is B-bone too, use average handle direction */ if(next->bone->segments>1); @@ -575,7 +575,7 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest) vec_roll_to_mat3(h1, fp[3], mat3); // fp[3] is roll copy_m4_m3(result_array[a].mat, mat3); - VECCOPY(result_array[a].mat[3], fp); + copy_v3_v3(result_array[a].mat[3], fp); if(doscale) { /* correct for scaling when this matrix is used in scaled space */ @@ -737,7 +737,7 @@ static float dist_bone_deform(bPoseChannel *pchan, bPoseChanDeform *pdef_info, f if(bone==NULL) return 0.0f; - VECCOPY (cop, co); + copy_v3_v3(cop, co); fac= distfactor_to_bone(cop, bone->arm_head, bone->arm_tail, bone->rad_head, bone->rad_tail, bone->dist); @@ -782,7 +782,7 @@ static void pchan_bone_deform(bPoseChannel *pchan, bPoseChanDeform *pdef_info, f if (!weight) return; - VECCOPY(cop, co); + copy_v3_v3(cop, co); if(vec) { if(pchan->bone->segments>1) @@ -1019,7 +1019,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, normalize_dq(dq, contrib); if(armature_weight != 1.0f) { - VECCOPY(dco, co); + copy_v3_v3(dco, co); mul_v3m3_dq( dco, (defMats)? summat: NULL,dq); sub_v3_v3(dco, co); mul_v3_fl(dco, armature_weight); @@ -1115,11 +1115,11 @@ void armature_loc_world_to_pose(Object *ob, float *inloc, float *outloc) float nLocMat[4][4]; /* build matrix for location */ - VECCOPY(xLocMat[3], inloc); + copy_v3_v3(xLocMat[3], inloc); /* get bone-space cursor matrix and extract location */ armature_mat_world_to_pose(ob, xLocMat, nLocMat); - VECCOPY(outloc, nLocMat[3]); + copy_v3_v3(outloc, nLocMat[3]); } /* Convert Pose-Space Matrix to Bone-Space Matrix @@ -1194,11 +1194,11 @@ void armature_loc_pose_to_bone(bPoseChannel *pchan, float *inloc, float *outloc) float nLocMat[4][4]; /* build matrix for location */ - VECCOPY(xLocMat[3], inloc); + copy_v3_v3(xLocMat[3], inloc); /* get bone-space cursor matrix and extract location */ armature_mat_pose_to_bone(pchan, xLocMat, nLocMat); - VECCOPY(outloc, nLocMat[3]); + copy_v3_v3(outloc, nLocMat[3]); } /* same as object_mat3_to_rot() */ @@ -1403,7 +1403,7 @@ void where_is_armature_bone(Bone *bone, Bone *prevbone) 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]+= prevbone->length; @@ -1413,7 +1413,7 @@ void where_is_armature_bone(Bone *bone, Bone *prevbone) } else { copy_m4_m3(bone->arm_mat, bone->bone_mat); - VECCOPY(bone->arm_mat[3], bone->head); + copy_v3_v3(bone->arm_mat[3], bone->head); } /* and the kiddies */ @@ -1849,8 +1849,8 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o /* firstly, calculate the bone matrix the standard way, since this is needed for roll control */ where_is_pose_bone(scene, ob, pchan, ctime, 1); - VECCOPY(poseHead, pchan->pose_head); - VECCOPY(poseTail, pchan->pose_tail); + copy_v3_v3(poseHead, pchan->pose_head); + copy_v3_v3(poseTail, pchan->pose_tail); /* step 1: determine the positions for the endpoints of the bone */ { @@ -1894,7 +1894,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o /* store the position, and convert it to pose space */ mul_m4_v3(ob->imat, vec); - VECCOPY(poseHead, vec); + copy_v3_v3(poseHead, vec); /* set the new radius (it should be the average value) */ radius = (radius+rad) / 2; @@ -1918,9 +1918,9 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o /* compute the raw rotation matrix from the bone's current matrix by extracting only the * orientation-relevant axes, and normalising them */ - VECCOPY(rmat[0], pchan->pose_mat[0]); - VECCOPY(rmat[1], pchan->pose_mat[1]); - VECCOPY(rmat[2], pchan->pose_mat[2]); + copy_v3_v3(rmat[0], pchan->pose_mat[0]); + copy_v3_v3(rmat[1], pchan->pose_mat[1]); + copy_v3_v3(rmat[2], pchan->pose_mat[2]); normalize_m3(rmat); /* also, normalise the orientation imposed by the bone, now that we've extracted the scale factor */ @@ -2011,7 +2011,7 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o /* when the 'no-root' option is affected, the chain can retain * the shape but be moved elsewhere */ - VECCOPY(poseHead, pchan->pose_head); + copy_v3_v3(poseHead, pchan->pose_head); } else if (tree->con->enforce < 1.0f) { /* when the influence is too low @@ -2019,18 +2019,18 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o * - stick to the parent for any other */ if (pchan->parent) { - VECCOPY(poseHead, pchan->pose_head); + copy_v3_v3(poseHead, pchan->pose_head); } else { // FIXME: this introduces popping artifacts when we reach 0.0 interp_v3_v3v3(poseHead, pchan->pose_head, poseHead, tree->con->enforce); } } - VECCOPY(poseMat[3], poseHead); + copy_v3_v3(poseMat[3], poseHead); /* finally, store the new transform */ copy_m4_m4(pchan->pose_mat, poseMat); - VECCOPY(pchan->pose_head, poseHead); + copy_v3_v3(pchan->pose_head, poseHead); /* recalculate tail, as it's now outdated after the head gets adjusted above! */ where_is_pose_bone_tail(pchan); @@ -2109,7 +2109,7 @@ void pchan_to_mat4(bPoseChannel *pchan, float chan_mat[4][4]) /* prevent action channels breaking chains */ /* need to check for bone here, CONSTRAINT_TYPE_ACTION uses this call */ if ((pchan->bone==NULL) || !(pchan->bone->flag & BONE_CONNECTED)) { - VECCOPY(chan_mat[3], pchan->loc); + copy_v3_v3(chan_mat[3], pchan->loc); } } @@ -2195,11 +2195,11 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha ofs = amod->turbul / 200.0f; /* make a copy of starting conditions */ - VECCOPY(loc, pchan->pose_mat[3]); + copy_v3_v3(loc, pchan->pose_mat[3]); mat4_to_eul( eul,pchan->pose_mat); mat4_to_size( size,pchan->pose_mat); - VECCOPY(eulo, eul); - VECCOPY(sizeo, size); + copy_v3_v3(eulo, eul); + copy_v3_v3(sizeo, size); /* apply noise to each set of channels */ if (amod->channels & 4) { @@ -2250,7 +2250,7 @@ void where_is_pose_bone_tail(bPoseChannel *pchan) { float vec[3]; - VECCOPY(vec, pchan->pose_mat[1]); + copy_v3_v3(vec, pchan->pose_mat[1]); mul_v3_fl(vec, pchan->bone->length); add_v3_v3v3(pchan->pose_tail, pchan->pose_head, vec); } @@ -2284,7 +2284,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti 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; @@ -2362,7 +2362,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti bConstraintOb *cob; /* make a copy of location of PoseChannel for later */ - VECCOPY(vec, pchan->pose_mat[3]); + copy_v3_v3(vec, pchan->pose_mat[3]); /* prepare PoseChannel for Constraint solving * - makes a copy of matrix, and creates temporary struct to use @@ -2379,13 +2379,13 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti /* prevent constraints breaking a chain */ if(pchan->bone->flag & BONE_CONNECTED) { - VECCOPY(pchan->pose_mat[3], vec); + copy_v3_v3(pchan->pose_mat[3], vec); } } } /* calculate head */ - VECCOPY(pchan->pose_head, pchan->pose_mat[3]); + copy_v3_v3(pchan->pose_head, pchan->pose_mat[3]); /* calculate tail */ where_is_pose_bone_tail(pchan); } @@ -2416,8 +2416,8 @@ void where_is_pose (Scene *scene, Object *ob) bone= pchan->bone; if(bone) { copy_m4_m4(pchan->pose_mat, bone->arm_mat); - VECCOPY(pchan->pose_head, bone->arm_head); - VECCOPY(pchan->pose_tail, bone->arm_tail); + copy_v3_v3(pchan->pose_head, bone->arm_head); + copy_v3_v3(pchan->pose_tail, bone->arm_tail); } } } diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 3f014f241ff..13b1da22449 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1229,7 +1229,7 @@ float *make_orco_curve(Scene *scene, Object *ob) fp[1]= 0.0; fp[2]= 0.0; } else { - VECCOPY(fp, &dl->verts[u*3]); + copy_v3_v3(fp, &dl->verts[u*3]); fp[0]= (fp[0]-cu->loc[0])/cu->size[0]; fp[1]= (fp[1]-cu->loc[1])/cu->size[1]; @@ -1258,7 +1258,7 @@ float *make_orco_curve(Scene *scene, Object *ob) int realu= u % dl->parts; vert= dl->verts + 3*(dl->nr*realu + realv); - VECCOPY(fp, vert); + copy_v3_v3(fp, vert); fp[0]= (fp[0]-cu->loc[0])/cu->size[0]; fp[1]= (fp[1]-cu->loc[1])/cu->size[1]; @@ -1519,7 +1519,7 @@ static short bevelinside(BevList *bl1,BevList *bl2) hvec1[0]= bevp->vec[0]; hvec1[1]= bevp->vec[1]; hvec1[2]= 0.0; - VECCOPY(hvec2,hvec1); + copy_v3_v3(hvec2,hvec1); hvec2[0]+=1000; /* test it with all edges of potential surounding poly */ @@ -1690,15 +1690,15 @@ static void bevel_list_cyclic_fix_3D(BevList *bl) bevp= (BevPoint *)(bl+1); bevp1= bevp+1; - QUATCOPY(bevp->quat, bevp1->quat); - VECCOPY(bevp->dir, bevp1->dir); - VECCOPY(bevp->tan, bevp1->tan); + copy_qt_qt(bevp->quat, bevp1->quat); + copy_v3_v3(bevp->dir, bevp1->dir); + copy_v3_v3(bevp->tan, bevp1->tan); bevp= (BevPoint *)(bl+1); bevp+= (bl->nr-1); bevp1= bevp-1; - QUATCOPY(bevp->quat, bevp1->quat); - VECCOPY(bevp->dir, bevp1->dir); - VECCOPY(bevp->tan, bevp1->tan); + copy_qt_qt(bevp->quat, bevp1->quat); + copy_v3_v3(bevp->dir, bevp1->dir); + copy_v3_v3(bevp->tan, bevp1->tan); } /* utility for make_bevel_list_3D_* funcs */ static void bevel_list_calc_bisect(BevList *bl) @@ -1791,7 +1791,7 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter) } - QUATCOPY(bevp0_quat, bevp0->quat); + copy_qt_qt(bevp0_quat, bevp0->quat); while(nr--) { /* interpolate quats */ @@ -1804,7 +1804,7 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter) axis_angle_to_quat(q2, cross, angle_normalized_v3v3(zaxis, bevp1->dir)); normalize_qt(q2); - QUATCOPY(bevp0_quat, bevp1->quat); + copy_qt_qt(bevp0_quat, bevp1->quat); mul_qt_qtqt(q, q2, q); interp_qt_qtqt(bevp1->quat, bevp1->quat, q, 0.5); normalize_qt(bevp1->quat); @@ -1866,7 +1866,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl) mul_qt_qtqt(bevp1->quat, q, bevp0->quat); } else { - QUATCOPY(bevp1->quat, bevp0->quat); + copy_qt_qt(bevp1->quat, bevp0->quat); } } @@ -1975,7 +1975,7 @@ static void make_bevel_list_3D_tangent(BevList *bl) bevp1= bevp2+(bl->nr-1); bevp0= bevp1-1; - VECCOPY(bevp0_tan, bevp0->tan); + copy_v3_v3(bevp0_tan, bevp0->tan); nr= bl->nr; while(nr--) { @@ -2035,8 +2035,8 @@ static void make_bevel_list_segment_3D(BevList *bl) axis_angle_to_quat(q, bevp1->dir, bevp1->alfa); mul_qt_qtqt(bevp1->quat, q, bevp1->quat); normalize_qt(bevp1->quat); - VECCOPY(bevp2->dir, bevp1->dir); - QUATCOPY(bevp2->quat, bevp1->quat); + copy_v3_v3(bevp2->dir, bevp1->dir); + copy_qt_qt(bevp2->quat, bevp1->quat); } @@ -2106,7 +2106,7 @@ void makeBevelList(Object *ob) bp= nu->bp; while(len--) { - VECCOPY(bevp->vec, bp->vec); + copy_v3_v3(bevp->vec, bp->vec); bevp->alfa= bp->alfa; bevp->radius= bp->radius; bevp->weight= bp->weight; @@ -2139,7 +2139,7 @@ void makeBevelList(Object *ob) while(a--) { if(prevbezt->h2==HD_VECT && bezt->h1==HD_VECT) { - VECCOPY(bevp->vec, prevbezt->vec[1]); + copy_v3_v3(bevp->vec, prevbezt->vec[1]); bevp->alfa= prevbezt->alfa; bevp->radius= prevbezt->radius; bevp->weight= prevbezt->weight; @@ -2191,7 +2191,7 @@ void makeBevelList(Object *ob) } if((nu->flagu & CU_NURB_CYCLIC)==0) { /* not cyclic: endpoint */ - VECCOPY(bevp->vec, prevbezt->vec[1]); + copy_v3_v3(bevp->vec, prevbezt->vec[1]); bevp->alfa= prevbezt->alfa; bevp->radius= prevbezt->radius; bevp->weight= prevbezt->weight; @@ -3011,15 +3011,15 @@ float (*curve_getVertexCos(Curve *UNUSED(cu), ListBase *lb, int *numVerts_r))[3] BezTriple *bezt = nu->bezt; for (i=0; ipntsu; i++,bezt++) { - VECCOPY(co, bezt->vec[0]); co+=3; - VECCOPY(co, bezt->vec[1]); co+=3; - VECCOPY(co, bezt->vec[2]); co+=3; + copy_v3_v3(co, bezt->vec[0]); co+=3; + copy_v3_v3(co, bezt->vec[1]); co+=3; + copy_v3_v3(co, bezt->vec[2]); co+=3; } } else { BPoint *bp = nu->bp; for (i=0; ipntsu*nu->pntsv; i++,bp++) { - VECCOPY(co, bp->vec); co+=3; + copy_v3_v3(co, bp->vec); co+=3; } } } @@ -3038,15 +3038,15 @@ void curve_applyVertexCos(Curve *UNUSED(cu), ListBase *lb, float (*vertexCos)[3] BezTriple *bezt = nu->bezt; for (i=0; ipntsu; i++,bezt++) { - VECCOPY(bezt->vec[0], co); co+=3; - VECCOPY(bezt->vec[1], co); co+=3; - VECCOPY(bezt->vec[2], co); co+=3; + copy_v3_v3(bezt->vec[0], co); co+=3; + copy_v3_v3(bezt->vec[1], co); co+=3; + copy_v3_v3(bezt->vec[2], co); co+=3; } } else { BPoint *bp = nu->bp; for (i=0; ipntsu*nu->pntsv; i++,bp++) { - VECCOPY(bp->vec, co); co+=3; + copy_v3_v3(bp->vec, co); co+=3; } } } @@ -3064,9 +3064,9 @@ float (*curve_getKeyVertexCos(Curve *UNUSED(cu), ListBase *lb, float *key))[3] BezTriple *bezt = nu->bezt; for (i=0; ipntsu; i++,bezt++) { - VECCOPY(co, key); co+=3; key+=3; - VECCOPY(co, key); co+=3; key+=3; - VECCOPY(co, key); co+=3; key+=3; + copy_v3_v3(co, key); co+=3; key+=3; + copy_v3_v3(co, key); co+=3; key+=3; + copy_v3_v3(co, key); co+=3; key+=3; key+=3; /* skip tilt */ } } @@ -3074,7 +3074,7 @@ float (*curve_getKeyVertexCos(Curve *UNUSED(cu), ListBase *lb, float *key))[3] BPoint *bp = nu->bp; for(i=0; ipntsu*nu->pntsv; i++,bp++) { - VECCOPY(co, key); co+=3; key+=3; + copy_v3_v3(co, key); co+=3; key+=3; key++; /* skip tilt */ } } diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 3529b7b9e6d..474b3a5ce63 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1178,16 +1178,16 @@ static float dvar_eval_locDiff (ChannelDriver *driver, DriverVar *dvar) constraint_mat_convertspace(ob, pchan, mat, CONSTRAINT_SPACE_POSE, CONSTRAINT_SPACE_LOCAL); /* ... and from that, we get our transform */ - VECCOPY(tmp_loc, mat[3]); + copy_v3_v3(tmp_loc, mat[3]); } else { /* transform space (use transform values directly) */ - VECCOPY(tmp_loc, pchan->loc); + copy_v3_v3(tmp_loc, pchan->loc); } } else { /* convert to worldspace */ - VECCOPY(tmp_loc, pchan->pose_head); + copy_v3_v3(tmp_loc, pchan->pose_head); mul_m4_v3(ob->obmat, tmp_loc); } } @@ -1203,25 +1203,25 @@ static float dvar_eval_locDiff (ChannelDriver *driver, DriverVar *dvar) constraint_mat_convertspace(ob, NULL, mat, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL); /* ... and from that, we get our transform */ - VECCOPY(tmp_loc, mat[3]); + copy_v3_v3(tmp_loc, mat[3]); } else { /* transform space (use transform values directly) */ - VECCOPY(tmp_loc, ob->loc); + copy_v3_v3(tmp_loc, ob->loc); } } else { /* worldspace */ - VECCOPY(tmp_loc, ob->obmat[3]); + copy_v3_v3(tmp_loc, ob->obmat[3]); } } /* copy the location to the right place */ if (tarIndex) { - VECCOPY(loc2, tmp_loc); + copy_v3_v3(loc2, tmp_loc); } else { - VECCOPY(loc1, tmp_loc); + copy_v3_v3(loc1, tmp_loc); } } DRIVER_TARGETS_LOOPER_END @@ -1262,7 +1262,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar) if (pchan) { /* bone */ if (pchan->rotmode > 0) { - VECCOPY(oldEul, pchan->eul); + copy_v3_v3(oldEul, pchan->eul); rotOrder= pchan->rotmode; useEulers = 1; } @@ -1289,7 +1289,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar) else { /* object */ if (ob->rotmode > 0) { - VECCOPY(oldEul, ob->rot); + copy_v3_v3(oldEul, ob->rot); rotOrder= ob->rotmode; useEulers = 1; } diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 5fbe1ca3a23..0a467142f74 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -505,7 +505,7 @@ static char *key_block_get_data(Key *key, KeyBlock *actkb, KeyBlock *kb, char ** co= MEM_callocN(sizeof(float)*3*me->edit_mesh->totvert, "key_block_get_data"); for(eve=me->edit_mesh->verts.first; eve; eve=eve->next, a++) - VECCOPY(co[a], eve->co); + copy_v3_v3(co[a], eve->co); *freedata= (char*)co; return (char*)co; @@ -1568,7 +1568,7 @@ void latt_to_key(Lattice *lt, KeyBlock *kb) bp= lt->def; fp= kb->data; for(a=0; atotelem; a++, fp+=3, bp++) { - VECCOPY(fp, bp->vec); + copy_v3_v3(fp, bp->vec); } } @@ -1585,7 +1585,7 @@ void key_to_latt(KeyBlock *kb, Lattice *lt) tot= MIN2(kb->totelem, tot); for(a=0; avec, fp); + copy_v3_v3(bp->vec, fp); } } @@ -1615,11 +1615,11 @@ void curve_to_key(Curve *cu, KeyBlock *kb, ListBase *nurb) bezt= nu->bezt; a= nu->pntsu; while(a--) { - VECCOPY(fp, bezt->vec[0]); + copy_v3_v3(fp, bezt->vec[0]); fp+= 3; - VECCOPY(fp, bezt->vec[1]); + copy_v3_v3(fp, bezt->vec[1]); fp+= 3; - VECCOPY(fp, bezt->vec[2]); + copy_v3_v3(fp, bezt->vec[2]); fp+= 3; fp[0]= bezt->alfa; fp+= 3; /* alphas */ @@ -1630,7 +1630,7 @@ void curve_to_key(Curve *cu, KeyBlock *kb, ListBase *nurb) bp= nu->bp; a= nu->pntsu*nu->pntsv; while(a--) { - VECCOPY(fp, bp->vec); + copy_v3_v3(fp, bp->vec); fp[3]= bp->alfa; fp+= 4; @@ -1662,11 +1662,11 @@ void key_to_curve(KeyBlock *kb, Curve *UNUSED(cu), ListBase *nurb) bezt= nu->bezt; a= nu->pntsu; while(a-- && tot>0) { - VECCOPY(bezt->vec[0], fp); + copy_v3_v3(bezt->vec[0], fp); fp+= 3; - VECCOPY(bezt->vec[1], fp); + copy_v3_v3(bezt->vec[1], fp); fp+= 3; - VECCOPY(bezt->vec[2], fp); + copy_v3_v3(bezt->vec[2], fp); fp+= 3; bezt->alfa= fp[0]; fp+= 3; /* alphas */ @@ -1679,7 +1679,7 @@ void key_to_curve(KeyBlock *kb, Curve *UNUSED(cu), ListBase *nurb) bp= nu->bp; a= nu->pntsu*nu->pntsv; while(a-- && tot>0) { - VECCOPY(bp->vec, fp); + copy_v3_v3(bp->vec, fp); bp->alfa= fp[3]; fp+= 4; @@ -1708,7 +1708,7 @@ void mesh_to_key(Mesh *me, KeyBlock *kb) mvert= me->mvert; fp= kb->data; for(a=0; atotelem; a++, fp+=3, mvert++) { - VECCOPY(fp, mvert->co); + copy_v3_v3(fp, mvert->co); } } @@ -1725,7 +1725,7 @@ void key_to_mesh(KeyBlock *kb, Mesh *me) tot= MIN2(kb->totelem, me->totvert); for(a=0; aco, fp); + copy_v3_v3(mvert->co, fp); } } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index e1a428ce242..0d0552cf3b3 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2033,7 +2033,7 @@ static void give_parvert(Object *par, int nr, float *vec) while(a--) { if(count==nr) { found= 1; - VECCOPY(vec, bezt->vec[1]); + copy_v3_v3(vec, bezt->vec[1]); break; } count++; @@ -2101,7 +2101,7 @@ static void ob_parvert3(Object *ob, Object *par, float mat[][4]) copy_m4_m3(mat, cmat); if(ob->type==OB_CURVE) { - VECCOPY(mat[3], v1); + copy_v3_v3(mat[3], v1); } else { add_v3_v3v3(mat[3], v1, v2); @@ -2225,7 +2225,7 @@ static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[ case PARVERT1: unit_m4(totmat); if (simul){ - VECCOPY(totmat[3], par->obmat[3]); + copy_v3_v3(totmat[3], par->obmat[3]); } else{ give_parvert(par, ob->par1, vec); @@ -2259,10 +2259,10 @@ static void solve_parenting (Scene *scene, Object *ob, Object *par, float obmat[ // origin, voor help line if( (ob->partype & PARTYPE)==PARSKEL ) { - VECCOPY(ob->orig, par->obmat[3]); + copy_v3_v3(ob->orig, par->obmat[3]); } else { - VECCOPY(ob->orig, totmat[3]); + copy_v3_v3(ob->orig, totmat[3]); } } -- cgit v1.2.3