diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-06-20 17:04:11 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-06-20 17:04:11 +0400 |
commit | 0faeffb8a57493b6ccebc87decfed54c51152af0 (patch) | |
tree | 10def67b9673ff0ca238cb9a0987d97f5c45c8c4 /source | |
parent | 015b0ea00afc4f12be5fc830152930cd9bbb6dac (diff) |
Compile fix. Note that var introduction must happen at start of code block.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d1be99ce7ee..d506c4a5636 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -952,11 +952,13 @@ float ndof_to_angle_axis(const float ndof[3], float axis[3]) // Mike's version static int viewndof_invoke(bContext *C, wmOperator *op, wmEvent *event) { + RegionView3D* rv3d = CTX_wm_region_view3d(C); wmNDOFMotionData* ndof = (wmNDOFMotionData*) event->customdata; float sensitivity = 1.f; /* ooh, magic number! const float sensitivity = 0.035; /* ooh, magic number! there will be several of these as interactions get tuned */ + int /* bool */ has_rotation = rv3d->viewlock != RV3D_LOCKED && (ndof->rx || ndof->ry || ndof->rz); float dt = ndof->dt; if (dt > 0.25f) @@ -964,9 +966,7 @@ static int viewndof_invoke(bContext *C, wmOperator *op, wmEvent *event) /* TODO: replace such guesswork with a flag or field from the NDOF manager */ dt = 0.0125f; - RegionView3D* rv3d = CTX_wm_region_view3d(C); - int /* bool */ has_rotation = rv3d->viewlock != RV3D_LOCKED && (ndof->rx || ndof->ry || ndof->rz); if (has_rotation) rv3d->view = RV3D_VIEW_USER; |