[Bf-blender-cvs] [cbeb9f2c359] gsoc-2018-many-light-sampling: 3D View: minor change to NDOF view orbit
Campbell Barton
noreply at git.blender.org
Fri Jun 1 16:17:55 CEST 2018
Commit: cbeb9f2c359e509674a5cd5bee6a8e6f99082d7f
Author: Campbell Barton
Date: Sun May 27 10:34:01 2018 +0200
Branches: gsoc-2018-many-light-sampling
https://developer.blender.org/rBcbeb9f2c359e509674a5cd5bee6a8e6f99082d7f
3D View: minor change to NDOF view orbit
This change is needed for 2.8, where the NULL check isn't a reliable way
of testing if dynamic offset is needed.
===================================================================
M source/blender/editors/space_view3d/view3d_edit.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 199800df539..8573bb3457a 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1098,7 +1098,7 @@ static void view3d_ndof_pan_zoom(
static void view3d_ndof_orbit(
const struct wmNDOFMotionData *ndof, ScrArea *sa, ARegion *ar,
/* optional, can be NULL*/
- ViewOpsData *vod)
+ ViewOpsData *vod, const bool apply_dyn_ofs)
{
View3D *v3d = sa->spacedata.first;
RegionView3D *rv3d = ar->regiondata;
@@ -1161,7 +1161,7 @@ static void view3d_ndof_orbit(
mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, quat);
}
- if (vod) {
+ if (apply_dyn_ofs) {
viewrotate_apply_dyn_ofs(vod, rv3d->viewquat);
}
}
@@ -1329,7 +1329,7 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *op, const wmEvent *event)
}
if (has_rotation) {
- view3d_ndof_orbit(ndof, vod->sa, vod->ar, vod);
+ view3d_ndof_orbit(ndof, vod->sa, vod->ar, vod, true);
}
}
@@ -1410,7 +1410,7 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
}
if (has_rotation) {
- view3d_ndof_orbit(ndof, vod->sa, vod->ar, vod);
+ view3d_ndof_orbit(ndof, vod->sa, vod->ar, vod, true);
}
}
else { /* free/explore (like fly mode) */
@@ -1428,7 +1428,7 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
ED_view3d_distance_set(rv3d, 0.0f);
if (has_rotation) {
- view3d_ndof_orbit(ndof, vod->sa, vod->ar, NULL);
+ view3d_ndof_orbit(ndof, vod->sa, vod->ar, NULL, false);
}
ED_view3d_distance_set(rv3d, dist_backup);
More information about the Bf-blender-cvs
mailing list