Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/action.c28
-rw-r--r--source/blender/blenkernel/intern/anim.c24
-rw-r--r--source/blender/blenkernel/intern/armature.c76
-rw-r--r--source/blender/blenkernel/intern/curve.c60
-rw-r--r--source/blender/blenkernel/intern/fcurve.c20
-rw-r--r--source/blender/blenkernel/intern/key.c26
-rw-r--r--source/blender/blenkernel/intern/object.c10
-rw-r--r--source/blender/blenlib/intern/math_rotation.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c21
-rw-r--r--source/blender/editors/armature/poseSlide.c4
-rw-r--r--source/blender/editors/armature/poseUtils.c20
-rw-r--r--source/blender/editors/armature/poseobject.c26
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
-rw-r--r--source/blender/editors/object/object_constraint.c7
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c42
-rw-r--r--source/blender/editors/transform/transform.c4
-rw-r--r--source/blender/editors/transform/transform_conversions.c8
-rw-r--r--source/blender/editors/transform/transform_generics.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c2
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c12
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp26
22 files changed, 206 insertions, 220 deletions
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; a<MAX_BBONE_SUBDIV; a++, fp+=4) {
- QUATCOPY(temp[a], fp);
+ copy_qt_qt(temp[a], fp);
pdist[a+1]= pdist[a]+len_v3v3(fp, fp+4);
}
/* do last point */
- QUATCOPY(temp[a], fp);
+ copy_qt_qt(temp[a], fp);
totdist= pdist[a];
/* go over distances and calculate new points */
@@ -420,7 +420,7 @@ static void equalize_bezier(float *data, int desired)
fp[3]= fac1*temp[nr-1][3]+ fac2*temp[nr][3];
}
/* set last point, needed for orientation calculus */
- QUATCOPY(fp, temp[MAX_BBONE_SUBDIV]);
+ copy_qt_qt(fp, temp[MAX_BBONE_SUBDIV]);
}
/* returns pointer to static array, filled with desired amount of bone->segments 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; i<nu->pntsu; 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; i<nu->pntsu*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; i<nu->pntsu; 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; i<nu->pntsu*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; i<nu->pntsu; 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; i<nu->pntsu*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; a<kb->totelem; 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; a<tot; a++, fp+=3, bp++) {
- VECCOPY(bp->vec, 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; a<kb->totelem; 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; a<tot; a++, fp+=3, mvert++) {
- VECCOPY(mvert->co, 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]);
}
}
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 51d12f5430e..0ca8b72c1e3 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -53,7 +53,7 @@ void unit_qt(float q[4])
q[1]= q[2]= q[3]= 0.0f;
}
-void copy_qt_qt(float *q1, const float *q2)
+void copy_qt_qt(float q1[4], const float q2[4])
{
q1[0]= q2[0];
q1[1]= q2[1];
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 45ab4a5cdaf..16da7321524 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5319,8 +5319,8 @@ static void view3d_split_250(View3D *v3d, ListBase *regions)
rv3d->persp= v3d->persp;
rv3d->view= v3d->view;
rv3d->dist= v3d->dist;
- VECCOPY(rv3d->ofs, v3d->ofs);
- QUATCOPY(rv3d->viewquat, v3d->viewquat);
+ copy_v3_v3(rv3d->ofs, v3d->ofs);
+ copy_qt_qt(rv3d->viewquat, v3d->viewquat);
}
}
@@ -10464,6 +10464,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
sce->gm.dome.warptext = sce->r.dometext;
//Stand Alone
+ sce->gm.fullscreen = sce->r.fullscreen;
sce->gm.xplay = sce->r.xplay;
sce->gm.yplay = sce->r.yplay;
sce->gm.freqplay = sce->r.freqplay;
@@ -12190,22 +12191,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
-
- {
- /* Initialize BGE exit key to esc key */
- Scene *scene;
- for(scene= main->scene.first; scene; scene= scene->id.next) {
- if (!scene->gm.exitkey)
- scene->gm.exitkey = 218; //218 is the Blender key code for ESC
- }
- }
-
- {
- /* Initialize default values for collision masks */
- Object *ob;
- for(ob=main->object.first; ob; ob=ob->id.next)
- ob->col_group = ob->col_mask = 1;
- }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
index 0497c0507dc..efc8ffe4c7d 100644
--- a/source/blender/editors/armature/poseSlide.c
+++ b/source/blender/editors/armature/poseSlide.c
@@ -421,7 +421,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
sub_qt_qtqt(quat_diff, pchan->quat, quat_prev);
/* make a copy of the original rotation */
- QUATCOPY(quat_orig, pchan->quat);
+ copy_qt_qt(quat_orig, pchan->quat);
/* increase the original by the delta transform, by an amount determined by percentage */
add_qt_qtqt(pchan->quat, quat_orig, quat_diff, pso->percentage);
@@ -436,7 +436,7 @@ static void pose_slide_apply_quat (tPoseSlideOp *pso, tPChanFCurveLink *pfl)
interp_qt_qtqt(quat_interp, quat_prev, quat_next, (cframe-pso->prevFrame) / (pso->nextFrame-pso->prevFrame) );
/* make a copy of the original rotation */
- QUATCOPY(quat_orig, pchan->quat);
+ copy_qt_qt(quat_orig, pchan->quat);
/* tricky interpolations - blending between original and new */
interp_qt_qtqt(pchan->quat, quat_orig, quat_interp, 1.0f/6.0f);
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 5c98fdc08bd..71cdda7fe15 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -111,11 +111,11 @@ static void fcurves_to_pchan_links_get (ListBase *pfLinks, Object *ob, bAction *
pchan->flag |= POSE_SIZE;
/* store current transforms */
- VECCOPY(pfl->oldloc, pchan->loc);
- VECCOPY(pfl->oldrot, pchan->eul);
- VECCOPY(pfl->oldscale, pchan->size);
- QUATCOPY(pfl->oldquat, pchan->quat);
- VECCOPY(pfl->oldaxis, pchan->rotAxis);
+ copy_v3_v3(pfl->oldloc, pchan->loc);
+ copy_v3_v3(pfl->oldrot, pchan->eul);
+ copy_v3_v3(pfl->oldscale, pchan->size);
+ copy_qt_qt(pfl->oldquat, pchan->quat);
+ copy_v3_v3(pfl->oldaxis, pchan->rotAxis);
pfl->oldangle = pchan->rotAngle;
/* make copy of custom properties */
@@ -205,11 +205,11 @@ void poseAnim_mapping_reset (ListBase *pfLinks)
bPoseChannel *pchan= pfl->pchan;
/* just copy all the values over regardless of whether they changed or not */
- VECCOPY(pchan->loc, pfl->oldloc);
- VECCOPY(pchan->eul, pfl->oldrot);
- VECCOPY(pchan->size, pfl->oldscale);
- QUATCOPY(pchan->quat, pfl->oldquat);
- VECCOPY(pchan->rotAxis, pfl->oldaxis);
+ copy_v3_v3(pchan->loc, pfl->oldloc);
+ copy_v3_v3(pchan->eul, pfl->oldrot);
+ copy_v3_v3(pchan->size, pfl->oldscale);
+ copy_qt_qt(pchan->quat, pfl->oldquat);
+ copy_v3_v3(pchan->rotAxis, pfl->oldaxis);
pchan->rotAngle = pfl->oldangle;
/* just overwrite values of properties from the stored copies (there should be some) */
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index beae9c12bfe..e89674e8a37 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -783,14 +783,14 @@ static void pose_copy_menu(Scene *scene)
{
switch (nr) {
case 1: /* Local Location */
- VECCOPY(pchan->loc, pchanact->loc);
+ copy_v3_v3(pchan->loc, pchanact->loc);
break;
case 2: /* Local Rotation */
- QUATCOPY(pchan->quat, pchanact->quat);
- VECCOPY(pchan->eul, pchanact->eul);
+ copy_qt_qt(pchan->quat, pchanact->quat);
+ copy_v3_v3(pchan->eul, pchanact->eul);
break;
case 3: /* Local Size */
- VECCOPY(pchan->size, pchanact->size);
+ copy_v3_v3(pchan->size, pchanact->size);
break;
case 4: /* All Constraints */
{
@@ -822,9 +822,9 @@ static void pose_copy_menu(Scene *scene)
case 7: /* IK (DOF) settings */
{
pchan->ikflag = pchanact->ikflag;
- VECCOPY(pchan->limitmin, pchanact->limitmin);
- VECCOPY(pchan->limitmax, pchanact->limitmax);
- VECCOPY(pchan->stiffness, pchanact->stiffness);
+ copy_v3_v3(pchan->limitmin, pchanact->limitmin);
+ copy_v3_v3(pchan->limitmax, pchanact->limitmax);
+ copy_v3_v3(pchan->stiffness, pchanact->stiffness);
pchan->ikstretch= pchanact->ikstretch;
pchan->ikrotweight= pchanact->ikrotweight;
pchan->iklinweight= pchanact->iklinweight;
@@ -861,7 +861,7 @@ static void pose_copy_menu(Scene *scene)
armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
mat4_to_size( size,delta_mat);
- VECCOPY(pchan->size, size);
+ copy_v3_v3(pchan->size, size);
}
}
}
@@ -1014,22 +1014,22 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
/* only loc rot size
* - only copies transform info for the pose
*/
- VECCOPY(pchan->loc, chan->loc);
- VECCOPY(pchan->size, chan->size);
+ copy_v3_v3(pchan->loc, chan->loc);
+ copy_v3_v3(pchan->size, chan->size);
pchan->flag= chan->flag;
/* check if rotation modes are compatible (i.e. do they need any conversions) */
if (pchan->rotmode == chan->rotmode) {
/* copy the type of rotation in use */
if (pchan->rotmode > 0) {
- VECCOPY(pchan->eul, chan->eul);
+ copy_v3_v3(pchan->eul, chan->eul);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
- VECCOPY(pchan->rotAxis, chan->rotAxis);
+ copy_v3_v3(pchan->rotAxis, chan->rotAxis);
pchan->rotAngle = chan->rotAngle;
}
else {
- QUATCOPY(pchan->quat, chan->quat);
+ copy_qt_qt(pchan->quat, chan->quat);
}
}
else if (pchan->rotmode > 0) {
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 07858f7182c..64da61f8f55 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -580,8 +580,8 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
/* set color, stroke thickness, and point size */
glLineWidth(lthick);
- QUATCOPY(color, gpl->color); // just for copying 4 array elements
- QUATCOPY(tcolor, gpl->color); // additional copy of color (for ghosting)
+ copy_v4_v4(color, gpl->color); // just for copying 4 array elements
+ copy_v4_v4(tcolor, gpl->color); // additional copy of color (for ghosting)
glColor4fv(color);
glPointSize((float)(gpl->thickness + 2));
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index ab9c071ab30..50b798c5bea 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1268,9 +1268,10 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
else
mul_v3_m4v3(obt->loc, obact->obmat, pchanact->pose_head);
}
- else
- VECCOPY(obt->loc, obact->obmat[3]);
-
+ else {
+ copy_v3_v3(obt->loc, obact->obmat[3]);
+ }
+
/* restore, add_object sets active */
BASACT= base;
base->flag |= SELECT;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index e08f6fcbffa..d49ce0cf49a 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5583,7 +5583,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
if(h > maxsize) h= maxsize;
ibuf= ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, err_out);
- if(!ibuf || 1) {
+ if(!ibuf) {
/* Mostly happens when OpenGL offscreen buffer was failed to create, */
/* but could be other reasons. Should be handled in the future. nazgul */
BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer: %s", err_out);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 8000a3b03f1..1b726cd90b3 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -168,11 +168,11 @@ static void special_transvert_update(Object *obedit)
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 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);
}
}
}
@@ -250,7 +250,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
for(eve= em->verts.first; eve; eve= eve->next) {
if(eve->f1) {
- VECCOPY(tv->oldloc, eve->co);
+ copy_v3_v3(tv->oldloc, eve->co);
tv->loc= eve->co;
if(eve->no[0] != 0.0f || eve->no[1] != 0.0f ||eve->no[2] != 0.0f)
tv->nor= eve->no; // note this is a hackish signal (ton)
@@ -280,7 +280,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
* location as heads.
*/
if (rootok) {
- VECCOPY (tv->oldloc, ebo->head);
+ copy_v3_v3(tv->oldloc, ebo->head);
tv->loc= ebo->head;
tv->nor= NULL;
tv->flag= 1;
@@ -289,7 +289,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
}
if ((mode & TM_ALL_JOINTS) && (tipsel)) {
- VECCOPY (tv->oldloc, ebo->tail);
+ copy_v3_v3(tv->oldloc, ebo->tail);
tv->loc= ebo->tail;
tv->nor= NULL;
tv->flag= 1;
@@ -298,7 +298,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
}
}
else if (tipsel) {
- VECCOPY (tv->oldloc, ebo->tail);
+ copy_v3_v3(tv->oldloc, ebo->tail);
tv->loc= ebo->tail;
tv->nor= NULL;
tv->flag= 1;
@@ -333,14 +333,14 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
skip_handle= mode & TM_SKIP_HANDLES;
if((bezt->f1 & SELECT) && !skip_handle) {
- VECCOPY(tv->oldloc, bezt->vec[0]);
+ copy_v3_v3(tv->oldloc, bezt->vec[0]);
tv->loc= bezt->vec[0];
tv->flag= bezt->f1 & SELECT;
tv++;
tottrans++;
}
if(bezt->f2 & SELECT) {
- VECCOPY(tv->oldloc, bezt->vec[1]);
+ copy_v3_v3(tv->oldloc, bezt->vec[1]);
tv->loc= bezt->vec[1];
tv->val= &(bezt->alfa);
tv->oldval= bezt->alfa;
@@ -349,7 +349,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
tottrans++;
}
if((bezt->f3 & SELECT) && !skip_handle) {
- VECCOPY(tv->oldloc, bezt->vec[2]);
+ copy_v3_v3(tv->oldloc, bezt->vec[2]);
tv->loc= bezt->vec[2];
tv->flag= bezt->f3 & SELECT;
tv++;
@@ -365,7 +365,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
while(a--) {
if(bp->hide==0) {
if(bp->f1 & SELECT) {
- VECCOPY(tv->oldloc, bp->vec);
+ copy_v3_v3(tv->oldloc, bp->vec);
tv->loc= bp->vec;
tv->val= &(bp->alfa);
tv->oldval= bp->alfa;
@@ -474,7 +474,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
tv= transvmain;
for(a=0; a<tottrans; a++, tv++) {
- VECCOPY(vec, tv->loc);
+ copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
add_v3_v3(vec, obedit->obmat[3]);
vec[0]= gridf*floorf(0.5f+ vec[0]/gridf);
@@ -483,7 +483,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
sub_v3_v3(vec, obedit->obmat[3]);
mul_m3_v3(imat, vec);
- VECCOPY(tv->loc, vec);
+ copy_v3_v3(tv->loc, vec);
}
special_transvert_update(obedit);
@@ -507,7 +507,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
float vecN[3], nLoc[3];
/* get nearest grid point to snap to */
- VECCOPY(nLoc, pchan->pose_mat[3]);
+ copy_v3_v3(nLoc, pchan->pose_mat[3]);
vec[0]= gridf * (float)(floor(0.5f+ nLoc[0]/gridf));
vec[1]= gridf * (float)(floor(0.5f+ nLoc[1]/gridf));
vec[2]= gridf * (float)(floor(0.5f+ nLoc[2]/gridf));
@@ -632,7 +632,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
float cursp[3];
invert_m4_m4(ob->imat, ob->obmat);
- VECCOPY(cursp, curs);
+ copy_v3_v3(cursp, curs);
mul_m4_v3(ob->imat, cursp);
for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
@@ -779,7 +779,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
tv= transvmain;
for(a=0; a<tottrans; a++, tv++) {
- VECCOPY(vec, tv->loc);
+ copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
add_v3_v3(vec, obedit->obmat[3]);
add_v3_v3(centroid, vec);
@@ -788,7 +788,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
if(v3d->around==V3D_CENTROID) {
mul_v3_fl(centroid, 1.0f/(float)tottrans);
- VECCOPY(curs, centroid);
+ copy_v3_v3(curs, centroid);
}
else {
mid_v3_v3v3(curs, min, max);
@@ -805,7 +805,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
for (pchan = obact->pose->chanbase.first; pchan; pchan=pchan->next) {
if(arm->layer & pchan->bone->layer) {
if(pchan->bone->flag & BONE_SELECTED) {
- VECCOPY(vec, pchan->pose_head);
+ copy_v3_v3(vec, pchan->pose_head);
mul_m4_v3(obact->obmat, vec);
add_v3_v3(centroid, vec);
DO_MINMAX(vec, min, max);
@@ -816,7 +816,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
}
else {
CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
- VECCOPY(vec, ob->obmat[3]);
+ copy_v3_v3(vec, ob->obmat[3]);
add_v3_v3(centroid, vec);
DO_MINMAX(vec, min, max);
count++;
@@ -826,7 +826,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
if(count) {
if(v3d->around==V3D_CENTROID) {
mul_v3_fl(centroid, 1.0f/(float)count);
- VECCOPY(curs, centroid);
+ copy_v3_v3(curs, centroid);
}
else {
mid_v3_v3v3(curs, min, max);
@@ -881,7 +881,7 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
}
else {
if (obact) {
- VECCOPY(curs, obact->obmat[3]);
+ copy_v3_v3(curs, obact->obmat[3]);
}
}
@@ -958,7 +958,7 @@ int minmax_verts(Object *obedit, float *min, float *max)
tv= transvmain;
for(a=0; a<tottrans; a++, tv++) {
- VECCOPY(vec, tv->loc);
+ copy_v3_v3(vec, tv->loc);
mul_m3_v3(bmat, vec);
add_v3_v3(vec, obedit->obmat[3]);
add_v3_v3(centroid, vec);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 2fc1182a280..9c1d5adcd1b 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1690,8 +1690,8 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
values[0]= RNA_float_get(op->ptr, "value");
}
- QUATCOPY(t->values, values);
- QUATCOPY(t->auto_values, values);
+ copy_v4_v4(t->values, values);
+ copy_v4_v4(t->auto_values, values);
t->flag |= T_AUTOVALUES;
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index a9f9208346c..6de854ff6c9 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -555,7 +555,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->rotAngle= NULL;
td->ext->quat= pchan->quat;
- QUATCOPY(td->ext->iquat, pchan->quat);
+ copy_qt_qt(td->ext->iquat, pchan->quat);
}
td->ext->rotOrder= pchan->rotmode;
@@ -1305,7 +1305,7 @@ static void createTransMBallVerts(TransInfo *t)
/* quat is used for rotation of MetaElem */
tx->quat = ml->quat;
- QUATCOPY(tx->iquat, ml->quat);
+ copy_qt_qt(tx->iquat, ml->quat);
tx->rot = NULL;
@@ -4299,8 +4299,8 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->rotAngle= NULL;
td->ext->quat= ob->quat;
- QUATCOPY(td->ext->iquat, ob->quat);
- QUATCOPY(td->ext->dquat, ob->dquat);
+ copy_qt_qt(td->ext->iquat, ob->quat);
+ copy_qt_qt(td->ext->dquat, ob->dquat);
}
td->ext->rotOrder=ob->rotmode;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 103556accd8..2c69cc85214 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1299,7 +1299,7 @@ static void restoreElement(TransData *td)
copy_v3_v3(td->ext->size, td->ext->isize);
}
if (td->ext->quat) {
- QUATCOPY(td->ext->quat, td->ext->iquat);
+ copy_qt_qt(td->ext->quat, td->ext->iquat);
}
}
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 554d4ba132d..7eb39509e6b 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1157,7 +1157,7 @@ PyObject *newQuaternionObject(float *quat, int type, PyTypeObject *base_type)
unit_qt(self->quat);
}
else {
- QUATCOPY(self->quat, quat);
+ copy_qt_qt(self->quat, quat);
}
self->wrapped = Py_NEW;
}
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index 44bb2ed51aa..6e8624721b7 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -628,14 +628,14 @@ static PyObject *M_Geometry_intersect_point_line(PyObject *UNUSED(self), PyObjec
return NULL;
/* accept 2d verts */
- if (pt->size==3) { VECCOPY(pt_in, pt->vec);}
- else { pt_in[2]=0.0; VECCOPY2D(pt_in, pt->vec) }
+ if (pt->size==3) { copy_v3_v3(pt_in, pt->vec);}
+ else { pt_in[2]=0.0; copy_v2_v2(pt_in, pt->vec); }
- if (line_1->size==3) { VECCOPY(l1, line_1->vec);}
- else { l1[2]=0.0; VECCOPY2D(l1, line_1->vec) }
+ if (line_1->size==3) { copy_v3_v3(l1, line_1->vec);}
+ else { l1[2]=0.0; copy_v2_v2(l1, line_1->vec); }
- if (line_2->size==3) { VECCOPY(l2, line_2->vec);}
- else { l2[2]=0.0; VECCOPY2D(l2, line_2->vec) }
+ if (line_2->size==3) { copy_v3_v3(l2, line_2->vec);}
+ else { l2[2]=0.0; copy_v2_v2(l2, line_2->vec); }
/* do the calculation */
lambda= closest_to_line_v3(pt_out, pt_in, l1, l2);
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index cedebbb9d0d..77bd6e0f374 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1236,7 +1236,7 @@ static float my_boundbox_mesh(Mesh *me, float *loc, float *size)
static void my_tex_space_mesh(Mesh *me)
- {
+{
KeyBlock *kb;
float *fp, loc[3], size[3], min[3], max[3];
int a;
@@ -1247,37 +1247,37 @@ static void my_tex_space_mesh(Mesh *me)
if(me->key) {
kb= me->key->refkey;
if (kb) {
-
+
INIT_MINMAX(min, max);
-
+
fp= (float *)kb->data;
- for(a=0; a<kb->totelem; a++, fp+=3) {
+ for(a=0; a<kb->totelem; a++, fp+=3) {
DO_MINMAX(fp, min, max);
}
if(kb->totelem) {
loc[0]= (min[0]+max[0])/2.0f; loc[1]= (min[1]+max[1])/2.0f; loc[2]= (min[2]+max[2])/2.0f;
size[0]= (max[0]-min[0])/2.0f; size[1]= (max[1]-min[1])/2.0f; size[2]= (max[2]-min[2])/2.0f;
- }
- else {
+ }
+ else {
loc[0]= loc[1]= loc[2]= 0.0;
size[0]= size[1]= size[2]= 0.0;
}
}
- }
-
- VECCOPY(me->loc, loc);
- VECCOPY(me->size, size);
+ }
+
+ copy_v3_v3(me->loc, loc);
+ copy_v3_v3(me->size, size);
me->rot[0]= me->rot[1]= me->rot[2]= 0.0f;
-
+
if(me->size[0]==0.0) me->size[0]= 1.0f;
else if(me->size[0]>0.0 && me->size[0]< 0.00001f) me->size[0]= 0.00001f;
else if(me->size[0]<0.0 && me->size[0]> -0.00001f) me->size[0]= -0.00001f;
-
+
if(me->size[1]==0.0) me->size[1]= 1.0f;
else if(me->size[1]>0.0 && me->size[1]< 0.00001f) me->size[1]= 0.00001f;
else if(me->size[1]<0.0 && me->size[1]> -0.00001f) me->size[1]= -0.00001f;
-
+
if(me->size[2]==0.0) me->size[2]= 1.0f;
else if(me->size[2]>0.0 && me->size[2]< 0.00001f) me->size[2]= 0.00001f;
else if(me->size[2]<0.0 && me->size[2]> -0.00001f) me->size[2]= -0.00001f;