[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38380] branches/merwin-spacenav/source/ blender: introduce variables for ndof settings
Mike Erwin
significant.bit at gmail.com
Thu Jul 14 05:27:35 CEST 2011
Revision: 38380
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38380
Author: merwin
Date: 2011-07-14 03:27:33 +0000 (Thu, 14 Jul 2011)
Log Message:
-----------
introduce variables for ndof settings
Modified Paths:
--------------
branches/merwin-spacenav/source/blender/makesdna/DNA_userdef_types.h
branches/merwin-spacenav/source/blender/makesrna/intern/rna_userdef.c
Modified: branches/merwin-spacenav/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- branches/merwin-spacenav/source/blender/makesdna/DNA_userdef_types.h 2011-07-14 01:25:05 UTC (rev 38379)
+++ branches/merwin-spacenav/source/blender/makesdna/DNA_userdef_types.h 2011-07-14 03:27:33 UTC (rev 38380)
@@ -365,7 +365,7 @@
short recent_files; /* maximum number of recently used files to remember */
short smooth_viewtx; /* miliseconds to spend spinning the view */
short glreslimit;
- short ndof_pan, ndof_rotate;
+/* short ndof_pan, ndof_rotate; */
short curssize;
short color_picker_type;
short ipo_new; /* interpolation mode for newly added F-Curves */
@@ -375,8 +375,11 @@
short scrcastwait; /* milliseconds between screencast snapshots */
short widget_unit; /* defaults to 20 for 72 DPI setting */
- short pad[3];
+ short pad[1];
+ float ndof_sensitivity; /* overall sensitivity of 3D mouse */
+ int ndof_flag; /* flags for 3D mouse */
+
char versemaster[160];
char verseuser[160];
float glalphaclip;
@@ -578,6 +581,17 @@
#define TH_OLDSKOOL 3
#define TH_SHADED 4
+/* ndof_flag (3D mouse options) */
+#define NDOF_SHOW_GUIDE (1 << 0)
+#define NDOF_FLY_HELICOPTER (1 << 1)
+#define NDOF_LOCK_HORIZON (1 << 2)
+/* the following might not need to be saved between sessions,
+ but they do need to live somewhere accessible...
+#define NDOF_SHOULD_PAN (1 << 3)
+#define NDOF_SHOULD_ZOOM (1 << 4)
+#define NDOF_SHOULD_ROTATE (1 << 5)
+*/
+
#ifdef __cplusplus
}
#endif
Modified: branches/merwin-spacenav/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- branches/merwin-spacenav/source/blender/makesrna/intern/rna_userdef.c 2011-07-14 01:25:05 UTC (rev 38379)
+++ branches/merwin-spacenav/source/blender/makesrna/intern/rna_userdef.c 2011-07-14 03:27:33 UTC (rev 38380)
@@ -2705,7 +2705,9 @@
RNA_def_property_int_sdna(prop, NULL, "dragthreshold");
RNA_def_property_range(prop, 3, 40);
RNA_def_property_ui_text(prop, "Drag Threshold", "Amount of pixels you have to drag before dragging UI items happens");
-
+
+ /* 3D mouse settings */
+/*
prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
RNA_def_property_range(prop, 0, 200);
@@ -2715,7 +2717,24 @@
RNA_def_property_int_sdna(prop, NULL, "ndof_rotate");
RNA_def_property_range(prop, 0, 200);
RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard");
-
+*/
+ prop= RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.25f, 4.0f);
+ RNA_def_property_ui_text(prop, "3D Mouse Sensitivity", "Baseline sensitivity of the 3D Mouse");
+
+ prop= RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_SHOW_GUIDE);
+ RNA_def_property_ui_text(prop, "Show 3D Mouse Guide", "Visualize the center and axis of rotation (or projected position in fly mode)");
+
+ prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON);
+ RNA_def_property_ui_text(prop, "Lock Horizon", "Keep horizon level while flying with 3D Mouse");
+
+ prop= RNA_def_property(srna, "ndof_fly_helicopter", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_FLY_HELICOPTER);
+ RNA_def_property_ui_text(prop, "Helicopter Fly Mode", "");
+
+
prop= RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
RNA_def_property_range(prop, 1, 1000);
More information about the Bf-blender-cvs
mailing list