From b10d0058d72da3051895481ae5830a7b668b7d80 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 18 Aug 2016 00:21:55 -0400 Subject: NDOF: compile 3D mouse code only if WITH_INPUT_NDOF When WITH_INPUT_NDOF is disabled, 3D mouse handling code is removed from: - GHOST (was mostly done, finished the job) - window manager - various editors - RNA - keymaps The input tab of user prefs does not show 3D mouse settings. Key map editor does not show NDOF mappings. DNA does not change. On my Mac the compiled binary is 42KB smaller after this change. It runs fine WITH_INPUT_NDOF on or off. --- source/blender/editors/space_view3d/view3d_intern.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_view3d/view3d_intern.h') diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index bdd2702a6ce..314dadbaa52 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -46,7 +46,6 @@ struct bContext; struct bMotionPath; struct bPoseChannel; struct Mesh; -struct wmNDOFMotionData; struct wmOperatorType; struct wmWindowManager; struct wmKeyConfig; @@ -76,10 +75,12 @@ void VIEW3D_OT_dolly(struct wmOperatorType *ot); void VIEW3D_OT_zoom_camera_1_to_1(struct wmOperatorType *ot); void VIEW3D_OT_move(struct wmOperatorType *ot); void VIEW3D_OT_rotate(struct wmOperatorType *ot); +#ifdef WITH_INPUT_NDOF void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot); void VIEW3D_OT_ndof_orbit_zoom(struct wmOperatorType *ot); void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot); void VIEW3D_OT_ndof_all(struct wmOperatorType *ot); +#endif /* WITH_INPUT_NDOF */ void VIEW3D_OT_view_all(struct wmOperatorType *ot); void VIEW3D_OT_viewnumpad(struct wmOperatorType *ot); void VIEW3D_OT_view_selected(struct wmOperatorType *ot); @@ -111,11 +112,15 @@ void view3d_orbit_apply_dyn_ofs( float r_ofs[3], const float ofs_old[3], const float viewquat_old[4], const float viewquat_new[4], const float dyn_ofs[3]); +#ifdef WITH_INPUT_NDOF +struct wmNDOFMotionData; + void view3d_ndof_fly( const struct wmNDOFMotionData *ndof, struct View3D *v3d, struct RegionView3D *rv3d, const bool use_precision, const short protectflag, bool *r_has_translate, bool *r_has_rotate); +#endif /* WITH_INPUT_NDOF */ /* view3d_fly.c */ void view3d_keymap(struct wmKeyConfig *keyconf); -- cgit v1.2.3