forked from bartvdbraak/blender
introduce variables for ndof settings
This commit is contained in:
parent
50ef78cdb8
commit
b2eb2a00f1
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user