static void walkApply_ndof(bContext *C, WalkInfo *walk)
{
	Object *lock_ob = ED_view3d_cameracontrol_object_get(walk->v3d_camera_control);
	bool has_translate, has_rotate;

	view3d_ndof_fly(walk->ndof,
	                walk->v3d, walk->rv3d,
	                walk->is_slow, lock_ob ? lock_ob->protectflag : 0,
	                &has_translate, &has_rotate);

	if (has_translate || has_rotate) {
		walk->redraw = true;

		if (walk->rv3d->persp == RV3D_CAMOB) {
			walkMoveCamera(C, walk, has_rotate, has_translate);
		}
	}
}
Exemple #2
0
static void flyApply_ndof(bContext *C, FlyInfo *fly)
{
	Object *lock_ob = ED_view3d_cameracontrol_object_get(fly->v3d_camera_control);
	bool has_translate, has_rotate;

	view3d_ndof_fly(fly->ndof,
	                fly->v3d, fly->rv3d,
	                fly->use_precision, lock_ob ? lock_ob->protectflag : 0,
	                &has_translate, &has_rotate);

	if (has_translate || has_rotate) {
		fly->redraw = true;

		if (fly->rv3d->persp == RV3D_CAMOB) {
			flyMoveCamera(C, fly, has_rotate, has_translate);
		}
	}
}