diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index d8982fb68ca..6b1f5736f03 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -194,15 +194,15 @@ void smooth_view(bContext *C, Object *oldcamera, Object *camera, float *ofs, flo /* initialize sms */ memset(&sms,0,sizeof(struct SmoothViewStore)); - VECCOPY(sms.new_ofs, rv3d->ofs); - QUATCOPY(sms.new_quat, rv3d->viewquat); + copy_v3_v3(sms.new_ofs, rv3d->ofs); + copy_qt_qt(sms.new_quat, rv3d->viewquat); sms.new_dist= rv3d->dist; sms.new_lens= v3d->lens; sms.to_camera= 0; /* store the options we want to end with */ - if(ofs) VECCOPY(sms.new_ofs, ofs); - if(quat) QUATCOPY(sms.new_quat, quat); + if(ofs) copy_v3_v3(sms.new_ofs, ofs); + if(quat) copy_qt_qt(sms.new_quat, quat); if(dist) sms.new_dist= *dist; if(lens) sms.new_lens= *lens; @@ -243,8 +243,8 @@ void smooth_view(bContext *C, Object *oldcamera, Object *camera, float *ofs, flo if (quat && !ofs && !dist) { float vec1[3], vec2[3]; - VECCOPY(vec1, sms.new_quat); - VECCOPY(vec2, sms.orig_quat); + copy_v3_v3(vec1, sms.new_quat); + copy_v3_v3(vec2, sms.orig_quat); normalize_v3(vec1); normalize_v3(vec2); /* scale the time allowed by the rotation */ @@ -257,8 +257,8 @@ void smooth_view(bContext *C, Object *oldcamera, Object *camera, float *ofs, flo view3d_settings_from_ob(oldcamera, sms.orig_ofs, sms.orig_quat, &sms.orig_dist, &sms.orig_lens); } else { - VECCOPY(sms.orig_ofs, rv3d->ofs); - QUATCOPY(sms.orig_quat, rv3d->viewquat); + copy_v3_v3(sms.orig_ofs, rv3d->ofs); + copy_qt_qt(sms.orig_quat, rv3d->viewquat); sms.orig_dist= rv3d->dist; sms.orig_lens= v3d->lens; } @@ -289,8 +289,8 @@ void smooth_view(bContext *C, Object *oldcamera, Object *camera, float *ofs, flo /* if we get here nothing happens */ if(sms.to_camera==0) { - VECCOPY(rv3d->ofs, sms.new_ofs); - QUATCOPY(rv3d->viewquat, sms.new_quat); + copy_v3_v3(rv3d->ofs, sms.new_ofs); + copy_qt_qt(rv3d->viewquat, sms.new_quat); rv3d->dist = sms.new_dist; v3d->lens = sms.new_lens; } @@ -317,14 +317,14 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *op, wmEvent *event) /* if we went to camera, store the original */ if(sms->to_camera) { rv3d->persp= RV3D_CAMOB; - VECCOPY(rv3d->ofs, sms->orig_ofs); - QUATCOPY(rv3d->viewquat, sms->orig_quat); + copy_v3_v3(rv3d->ofs, sms->orig_ofs); + copy_qt_qt(rv3d->viewquat, sms->orig_quat); rv3d->dist = sms->orig_dist; v3d->lens = sms->orig_lens; } else { - VECCOPY(rv3d->ofs, sms->new_ofs); - QUATCOPY(rv3d->viewquat, sms->new_quat); + copy_v3_v3(rv3d->ofs, sms->new_ofs); + copy_qt_qt(rv3d->viewquat, sms->new_quat); rv3d->dist = sms->new_dist; v3d->lens = sms->new_lens; } @@ -571,9 +571,9 @@ void viewvector(RegionView3D *rv3d, 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(rv3d->viewmat, p2); @@ -584,7 +584,7 @@ void viewvector(RegionView3D *rv3d, float coord[3], float vec[3]) sub_v3_v3v3(vec, p1, p2); } else { - VECCOPY(vec, rv3d->viewinv[2]); + copy_v3_v3(vec, rv3d->viewinv[2]); } normalize_v3(vec); } @@ -686,7 +686,7 @@ void view3d_project_float(ARegion *ar, float *vec, float *adr, float mat[4][4]) float vec4[4]; adr[0]= IS_CLIPPED; - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(mat, vec4); @@ -713,7 +713,7 @@ int boundbox_clip(RegionView3D *rv3d, float obmat[][4], BoundBox *bb) mul_m4_m4m4(mat, obmat, rv3d->persmat); for(a=0; a<8; a++) { - VECCOPY(vec, bb->vec[a]); + copy_v3_v3(vec, bb->vec[a]); vec[3]= 1.0; mul_m4_v4(mat, vec); max= vec[3]; @@ -746,7 +746,7 @@ void project_short(ARegion *ar, float *vec, short *adr) /* clips */ return; } - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(rv3d->persmat, vec4); @@ -771,7 +771,7 @@ void project_int(ARegion *ar, float *vec, int *adr) float fx, fy, vec4[4]; adr[0]= (int)2140000000.0f; - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(rv3d->persmat, vec4); @@ -795,7 +795,7 @@ void project_int_noclip(ARegion *ar, float *vec, int *adr) RegionView3D *rv3d= ar->regiondata; float fx, fy, vec4[4]; - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(rv3d->persmat, vec4); @@ -820,7 +820,7 @@ void project_short_noclip(ARegion *ar, float *vec, short *adr) float fx, fy, vec4[4]; adr[0]= IS_CLIPPED; - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(rv3d->persmat, vec4); @@ -846,7 +846,7 @@ void project_float(ARegion *ar, float *vec, float *adr) float vec4[4]; adr[0]= IS_CLIPPED; - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(rv3d->persmat, vec4); @@ -862,7 +862,7 @@ void project_float_noclip(ARegion *ar, float *vec, float *adr) RegionView3D *rv3d= ar->regiondata; float vec4[4]; - VECCOPY(vec4, vec); + copy_v3_v3(vec4, vec); vec4[3]= 1.0; mul_m4_v4(rv3d->persmat, vec4); @@ -1109,7 +1109,7 @@ static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short float orig_ofs[3]; float orig_dist= rv3d->dist; float orig_lens= v3d->lens; - VECCOPY(orig_ofs, rv3d->ofs); + copy_v3_v3(orig_ofs, rv3d->ofs); /* Switch from camera view */ mat3_to_quat( new_quat,tmat); @@ -1205,11 +1205,11 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) Object *ob= v3d->ob_centre; float vec[3]; - VECCOPY(vec, ob->obmat[3]); + copy_v3_v3(vec, ob->obmat[3]); if(ob->type==OB_ARMATURE && v3d->ob_centre_bone[0]) { bPoseChannel *pchan= get_pose_channel(ob->pose, v3d->ob_centre_bone); if(pchan) { - VECCOPY(vec, pchan->pose_mat[3]); + copy_v3_v3(vec, pchan->pose_mat[3]); mul_m4_v3(ob->obmat, vec); } } @@ -1543,8 +1543,8 @@ static void restore_localviewdata(ScrArea *sa, int free) if(rv3d->localvd) { rv3d->dist= rv3d->localvd->dist; - VECCOPY(rv3d->ofs, rv3d->localvd->ofs); - QUATCOPY(rv3d->viewquat, rv3d->localvd->viewquat); + copy_v3_v3(rv3d->ofs, rv3d->localvd->ofs); + copy_qt_qt(rv3d->viewquat, rv3d->localvd->viewquat); rv3d->view= rv3d->localvd->view; rv3d->persp= rv3d->localvd->persp; rv3d->camzoom= rv3d->localvd->camzoom; @@ -2057,7 +2057,7 @@ static int initFlyInfo (bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *even /* perspective or ortho */ if (fly->rv3d->persp==RV3D_ORTHO) fly->rv3d->persp= RV3D_PERSP; /*if ortho projection, make perspective */ - QUATCOPY(fly->rot_backup, fly->rv3d->viewquat); + copy_qt_qt(fly->rot_backup, fly->rv3d->viewquat); copy_v3_v3(fly->ofs_backup, fly->rv3d->ofs); fly->rv3d->dist= 0.0f; @@ -2101,8 +2101,8 @@ static int flyEnd(bContext *C, FlyInfo *fly) DAG_id_flush_update(&ob_back->id, OB_RECALC_OB); } else { /* Non Camera we need to reset the view back to the original location bacause the user canceled*/ - QUATCOPY(rv3d->viewquat, fly->rot_backup); - VECCOPY(rv3d->ofs, fly->ofs_backup); + copy_qt_qt(rv3d->viewquat, fly->rot_backup); + copy_v3_v3(rv3d->ofs, fly->ofs_backup); rv3d->persp= fly->persp_backup; } } @@ -2590,7 +2590,7 @@ static int flyApply(bContext *C, FlyInfo *fly) /*were not redrawing but we need to update the time else the view will jump */ fly->time_lastdraw= PIL_check_seconds_timer(); /* end drawing */ - VECCOPY(fly->dvec_prev, dvec); + copy_v3_v3(fly->dvec_prev, dvec); } /* moved to flyEnd() */ @@ -2703,7 +2703,7 @@ void view3d_align_axis_to_vector(View3D *v3d, RegionView3D *rv3d, int axisidx, f float orig_dist= rv3d->dist; float orig_lens= v3d->lens; - VECCOPY(orig_ofs, rv3d->ofs); + copy_v3_v3(orig_ofs, rv3d->ofs); rv3d->persp= RV3D_PERSP; rv3d->dist= 0.0; view3d_settings_from_ob(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens); |