[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36694] trunk/blender/source/blender/ editors/space_view3d/view3d_edit.c: fix for bug with camera locking, view dolly and rotate with 'about selection' preference enabled would offset the camera.
Campbell Barton
ideasman42 at gmail.com
Sun May 15 05:07:11 CEST 2011
Revision: 36694
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36694
Author: campbellbarton
Date: 2011-05-15 03:07:07 +0000 (Sun, 15 May 2011)
Log Message:
-----------
fix for bug with camera locking, view dolly and rotate with 'about selection' preference enabled would offset the camera.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2011-05-15 02:39:36 UTC (rev 36693)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2011-05-15 03:07:07 UTC (rev 36694)
@@ -360,6 +360,11 @@
vod->ar= CTX_wm_region(C);
vod->v3d= vod->sa->spacedata.first;
vod->rv3d= rv3d= vod->ar->regiondata;
+
+ /* set the view from the camera, if view locking is enabled.
+ * we may want to make this optional but for now its needed always */
+ ED_view3d_camera_lock_init(vod->v3d, vod->rv3d);
+
vod->dist0= rv3d->dist;
copy_qt_qt(vod->oldquat, rv3d->viewquat);
vod->origx= vod->oldx= event->x;
@@ -797,8 +802,6 @@
return OPERATOR_PASS_THROUGH;
}
- ED_view3d_camera_lock_init(vod->v3d, vod->rv3d);
-
/* switch from camera view when: */
if(rv3d->persp != RV3D_PERSP) {
@@ -993,11 +996,8 @@
/* makes op->customdata */
viewops_data_create(C, op, event);
-
vod= op->customdata;
- ED_view3d_camera_lock_init(vod->v3d, vod->rv3d);
-
if (event->type == MOUSEPAN) {
viewmove_apply(vod, event->prevx, event->prevy);
request_depth_update(vod->rv3d);
@@ -1308,8 +1308,6 @@
viewops_data_create(C, op, event);
vod= op->customdata;
- ED_view3d_camera_lock_init(vod->v3d, vod->rv3d);
-
/* if one or the other zoom position aren't set, set from event */
if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my"))
{
@@ -1515,11 +1513,8 @@
/* makes op->customdata */
viewops_data_create(C, op, event);
-
vod= op->customdata;
- ED_view3d_camera_lock_init(vod->v3d, vod->rv3d);
-
/* if one or the other zoom position aren't set, set from event */
if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my"))
{
More information about the Bf-blender-cvs
mailing list