Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_userdef.c
| Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | if (value == AUTOKEY_MODE_NORMAL) { | ||||
| userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); | userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); | ||||
| } | } | ||||
| else if (value == AUTOKEY_MODE_EDITKEYS) { | else if (value == AUTOKEY_MODE_EDITKEYS) { | ||||
| userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); | userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); | ||||
| userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON); | userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON); | ||||
| } | } | ||||
| } | } | ||||
| static void rna_userdef_tablet_api_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| WM_init_tablet_api(); | |||||
| } | |||||
| #ifdef WITH_INPUT_NDOF | #ifdef WITH_INPUT_NDOF | ||||
| static void rna_userdef_ndof_deadzone_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_userdef_ndof_deadzone_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| UserDef *userdef = ptr->data; | UserDef *userdef = ptr->data; | ||||
| WM_ndof_deadzone_set(userdef->ndof_deadzone); | WM_ndof_deadzone_set(userdef->ndof_deadzone); | ||||
| } | } | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 4,356 Lines • ▼ Show 20 Lines | #ifdef WITH_INPUT_NDOF | ||||
| static const EnumPropertyItem ndof_view_rotation_items[] = { | static const EnumPropertyItem ndof_view_rotation_items[] = { | ||||
| {NDOF_TURNTABLE, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"}, | {NDOF_TURNTABLE, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"}, | ||||
| {0, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"}, | {0, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| #endif /* WITH_INPUT_NDOF */ | #endif /* WITH_INPUT_NDOF */ | ||||
| static const EnumPropertyItem tablet_api[] = { | |||||
| {USER_TABLET_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically choose Wintab or Windows Ink depending on the device"}, | |||||
| {USER_TABLET_NATIVE, "WINDOWS_INK", 0, "Windows Ink", "Use native Windows Ink API, for modern tablet and pen devices. Requires Windows 8 or newer"}, | |||||
| {USER_TABLET_WINTAB, "WINTAB", 0, "Wintab", "Use Wintab driver for older tablets and Windows versions"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| static const EnumPropertyItem view_zoom_styles[] = { | static const EnumPropertyItem view_zoom_styles[] = { | ||||
| {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"}, | {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"}, | ||||
| {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zoom in and out based on vertical mouse movement"}, | {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zoom in and out based on vertical mouse movement"}, | ||||
| {USER_ZOOM_SCALE, "SCALE", 0, "Scale", | {USER_ZOOM_SCALE, "SCALE", 0, "Scale", | ||||
| "Zoom in and out like scaling the view, mouse movements relative to center"}, | "Zoom in and out like scaling the view, mouse movements relative to center"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | RNA_def_property_ui_text(prop, "Max Threshold", | ||||
| "Raw input pressure value that is interpreted as 100% by Blender"); | "Raw input pressure value that is interpreted as 100% by Blender"); | ||||
| prop = RNA_def_property(srna, "pressure_softness", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "pressure_softness", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); | RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1f, 2); | RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1f, 2); | ||||
| RNA_def_property_ui_text(prop, "Softness", | RNA_def_property_ui_text(prop, "Softness", | ||||
| "Adjusts softness of the low pressure response onset using a gamma curve"); | "Adjusts softness of the low pressure response onset using a gamma curve"); | ||||
| prop = RNA_def_property(srna, "tablet_api", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, tablet_api); | |||||
| RNA_def_property_ui_text(prop, "Tablet API", "Select the tablet API to use for pressure sensitivity"); | |||||
| RNA_def_property_update(prop, 0, "rna_userdef_tablet_api_update"); | |||||
| #ifdef WITH_INPUT_NDOF | #ifdef WITH_INPUT_NDOF | ||||
| /* 3D mouse settings */ | /* 3D mouse settings */ | ||||
| /* global options */ | /* global options */ | ||||
| prop = RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_range(prop, 0.01f, 40.0f); | RNA_def_property_range(prop, 0.01f, 40.0f); | ||||
| RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse for panning"); | RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse for panning"); | ||||
| prop = RNA_def_property(srna, "ndof_orbit_sensitivity", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "ndof_orbit_sensitivity", PROP_FLOAT, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 482 Lines • Show Last 20 Lines | |||||