[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23865] trunk/blender/source/blender/ editors/space_view3d/view3d_edit.c: [#19644] Rotate around selection doesn' t work
Martin Poirier
theeth at yahoo.com
Thu Oct 15 17:58:12 CEST 2009
Revision: 23865
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23865
Author: theeth
Date: 2009-10-15 17:58:12 +0200 (Thu, 15 Oct 2009)
Log Message:
-----------
[#19644] Rotate around selection doesn't work
offset structures weren't initialized properly.
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 2009-10-15 14:41:21 UTC (rev 23864)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2009-10-15 15:58:12 UTC (rev 23865)
@@ -277,6 +277,7 @@
static void viewops_data(bContext *C, wmOperator *op, wmEvent *event)
{
+ static float lastofs[3] = {0,0,0};
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d;
ViewOpsData *vod= MEM_callocN(sizeof(ViewOpsData), "viewops data");
@@ -291,6 +292,15 @@
vod->origx= vod->oldx= event->x;
vod->origy= vod->oldy= event->y;
vod->origkey= event->type; /* the key that triggered the operator. */
+
+ if (U.uiflag & USER_ORBIT_SELECTION)
+ {
+ VECCOPY(vod->ofs, rv3d->ofs);
+ /* If there's no selection, lastofs is unmodified and last value since static */
+ calculateTransformCenter(C, event, V3D_CENTROID, lastofs);
+ VECCOPY(vod->obofs, lastofs);
+ VecMulf(vod->obofs, -1.0f);
+ }
/* lookup, we dont pass on v3d to prevent confusement */
vod->grid= v3d->grid;
More information about the Bf-blender-cvs
mailing list