Revision: 36693 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36693 Author: campbellbarton Date: 2011-05-15 02:39:36 +0000 (Sun, 15 May 2011) Log Message: ----------- fix for user reported issues - camera object movement was missing a notifier - auto perspective now works when rotating the view. - shift+b now zooms.
Modified Paths: -------------- trunk/blender/source/blender/editors/include/ED_view3d.h trunk/blender/source/blender/editors/space_view3d/view3d_edit.c trunk/blender/source/blender/editors/space_view3d/view3d_view.c Modified: trunk/blender/source/blender/editors/include/ED_view3d.h =================================================================== --- trunk/blender/source/blender/editors/include/ED_view3d.h 2011-05-14 20:23:05 UTC (rev 36692) +++ trunk/blender/source/blender/editors/include/ED_view3d.h 2011-05-15 02:39:36 UTC (rev 36693) @@ -193,7 +193,10 @@ void ED_view3d_from_object(struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens); void ED_view3d_to_object(struct Object *ob, const float ofs[3], const float quat[4], const float dist); +/* camera lock functions */ +/* copy the camera to the view before starting a view transformation */ void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d); +/* copy the view to the camera */ void ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d); int view3d_is_ortho(struct View3D *v3d, struct RegionView3D *rv3d); Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c =================================================================== --- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2011-05-14 20:23:05 UTC (rev 36692) +++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2011-05-15 02:39:36 UTC (rev 36693) @@ -93,6 +93,7 @@ if(v3d->camera && (v3d->flag2 & V3D_LOCK_CAMERA) && (rv3d->persp==RV3D_CAMOB)) { ED_view3d_to_object(v3d->camera, rv3d->ofs, rv3d->viewquat, rv3d->dist); DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, v3d->camera); } } @@ -802,7 +803,9 @@ if(rv3d->persp != RV3D_PERSP) { if (U.uiflag & USER_AUTOPERSP) { - rv3d->persp= RV3D_PERSP; + if(!((rv3d->persp==RV3D_CAMOB) && (vod->v3d->flag2 & V3D_LOCK_CAMERA))) { + rv3d->persp= RV3D_PERSP; + } } else if(rv3d->persp==RV3D_CAMOB) { @@ -2103,10 +2106,11 @@ static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event) { + View3D *v3d= CTX_wm_view3d(C); RegionView3D *rv3d= CTX_wm_region_view3d(C); /* if in camera view do not exec the operator so we do not conflict with set render border*/ - if (rv3d->persp != RV3D_CAMOB) + if ((rv3d->persp != RV3D_CAMOB) || (v3d->flag2 & V3D_LOCK_CAMERA)) return WM_border_select_invoke(C, op, event); else return OPERATOR_PASS_THROUGH; Modified: trunk/blender/source/blender/editors/space_view3d/view3d_view.c =================================================================== --- trunk/blender/source/blender/editors/space_view3d/view3d_view.c 2011-05-14 20:23:05 UTC (rev 36692) +++ trunk/blender/source/blender/editors/space_view3d/view3d_view.c 2011-05-15 02:39:36 UTC (rev 36693) @@ -308,6 +308,8 @@ copy_qt_qt(rv3d->viewquat, sms->new_quat); rv3d->dist = sms->new_dist; v3d->lens = sms->new_lens; + + ED_view3d_camera_lock_sync(v3d, rv3d); } if((rv3d->viewlock & RV3D_LOCKED)==0) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs