Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2011-07-14 07:27:33 +0400
committerMike Erwin <significant.bit@gmail.com>2011-07-14 07:27:33 +0400
commitb2eb2a00f104ae4d201ab58f83623e36ba45aef8 (patch)
treea90fb1a9a1474d4eb0306d105199f67c6c1076f6 /source
parent50ef78cdb8d9d746785bb03a296666dd15123e90 (diff)
introduce variables for ndof settings
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h18
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c23
2 files changed, 37 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 50e66f91028..78bc1c73ec9 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -365,7 +365,7 @@ typedef struct UserDef {
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,7 +375,10 @@ typedef struct UserDef {
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];
@@ -578,6 +581,17 @@ extern UserDef U; /* from blenkernel blender.c */
#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
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index b67805c97b9..86b88718ba8 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2705,7 +2705,9 @@ static void rna_def_userdef_input(BlenderRNA *brna)
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 @@ static void rna_def_userdef_input(BlenderRNA *brna)
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);