[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25615] trunk/blender/source/blender/ editors/space_view3d/view3d_edit.c: view3d orbit and rotate operators now check for rv3d viewlock in their poll functions (this means you can also set mmb = pan later in the keymap to pan locked views with mmb only).
Martin Poirier
theeth at yahoo.com
Tue Dec 29 21:11:13 CET 2009
Revision: 25615
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25615
Author: theeth
Date: 2009-12-29 21:11:13 +0100 (Tue, 29 Dec 2009)
Log Message:
-----------
view3d orbit and rotate operators now check for rv3d viewlock in their poll functions (this means you can also set mmb = pan later in the keymap to pan locked views with mmb only).
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-12-29 19:08:01 UTC (rev 25614)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2009-12-29 20:11:13 UTC (rev 25615)
@@ -680,6 +680,15 @@
return OPERATOR_RUNNING_MODAL;
}
+static int ED_operator_view3d_rotate(bContext *C)
+{
+ if (!ED_operator_view3d_active(C)) {
+ return 0;
+ } else {
+ RegionView3D *rv3d= CTX_wm_region_view3d(C);
+ return rv3d->viewlock == 0;
+ }
+}
void VIEW3D_OT_rotate(wmOperatorType *ot)
{
@@ -692,7 +701,7 @@
/* api callbacks */
ot->invoke= viewrotate_invoke;
ot->modal= viewrotate_modal;
- ot->poll= ED_operator_view3d_active;
+ ot->poll= ED_operator_view3d_rotate;
/* flags */
ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
@@ -1874,7 +1883,7 @@
/* api callbacks */
ot->exec= vieworbit_exec;
- ot->poll= ED_operator_view3d_active;
+ ot->poll= ED_operator_view3d_rotate;
/* flags */
ot->flag= 0;
More information about the Bf-blender-cvs
mailing list