Merge branch 'blender-v3.4-release'

This commit is contained in:
Thomas Dinges 2022-12-06 18:27:44 +01:00
commit de9f32a666
3 changed files with 42 additions and 30 deletions

View File

@ -27,7 +27,13 @@ typedef enum {
} NDOF_DeviceT;
/* NDOF device button event types */
/**
* NDOF device button event types.
*
* \note Button values are stored in DNA as part of key-map items.
* Existing values should not be changed. Otherwise, a mapping must be used,
* see #NDOF_BUTTON_INDEX_AS_EVENT.
*/
typedef enum {
/* Used internally, never sent or used as an index. */
NDOF_BUTTON_NONE = -1,
@ -58,6 +64,11 @@ typedef enum {
NDOF_BUTTON_DOMINANT,
NDOF_BUTTON_PLUS,
NDOF_BUTTON_MINUS,
/* Store Views. */
NDOF_BUTTON_V1,
NDOF_BUTTON_V2,
NDOF_BUTTON_V3,
_NDOF_UNUSED_0,
/* General-purpose buttons.
* Users can assign functions via keymap editor. */
NDOF_BUTTON_1,
@ -74,11 +85,8 @@ typedef enum {
NDOF_BUTTON_A,
NDOF_BUTTON_B,
NDOF_BUTTON_C,
/* Store Views. */
NDOF_BUTTON_V1,
NDOF_BUTTON_V2,
NDOF_BUTTON_V3,
/* Keyboard emulation. */
/* Keyboard emulation (keep last as they are mapped to regular keyboard events). */
NDOF_BUTTON_ESC,
NDOF_BUTTON_ENTER,
NDOF_BUTTON_DELETE,

View File

@ -99,6 +99,10 @@ static const EnumPropertyItem event_ndof_type_items[] = {
{NDOF_BUTTON_DOMINANT, "NDOF_BUTTON_DOMINANT", 0, "Dominant", ""},
{NDOF_BUTTON_PLUS, "NDOF_BUTTON_PLUS", 0, "Plus", ""},
{NDOF_BUTTON_MINUS, "NDOF_BUTTON_MINUS", 0, "Minus", ""},
/* View buttons. */
{NDOF_BUTTON_V1, "NDOF_BUTTON_V1", 0, "View 1", ""},
{NDOF_BUTTON_V2, "NDOF_BUTTON_V2", 0, "View 2", ""},
{NDOF_BUTTON_V3, "NDOF_BUTTON_V3", 0, "View 3", ""},
/* general-purpose buttons */
{NDOF_BUTTON_1, "NDOF_BUTTON_1", 0, "Button 1", ""},
{NDOF_BUTTON_2, "NDOF_BUTTON_2", 0, "Button 2", ""},
@ -113,10 +117,6 @@ static const EnumPropertyItem event_ndof_type_items[] = {
{NDOF_BUTTON_A, "NDOF_BUTTON_A", 0, "Button A", ""},
{NDOF_BUTTON_B, "NDOF_BUTTON_B", 0, "Button B", ""},
{NDOF_BUTTON_C, "NDOF_BUTTON_C", 0, "Button C", ""},
/* View buttons. */
{NDOF_BUTTON_V1, "NDOF_BUTTON_V1", 0, "View 1", ""},
{NDOF_BUTTON_V2, "NDOF_BUTTON_V2", 0, "View 2", ""},
{NDOF_BUTTON_V3, "NDOF_BUTTON_V3", 0, "View 3", ""},
# if 0 /* Never used (converted to keyboard events by GHOST). */
/* keyboard emulation */
{NDOF_BUTTON_ESC, "NDOF_BUTTON_ESC", 0, "Esc"},
@ -347,6 +347,10 @@ const EnumPropertyItem rna_enum_event_type_items[] = {
{NDOF_BUTTON_SHIFT, "NDOF_BUTTON_SHIFT", 0, "NDOF Shift", "NdofShift"},
{NDOF_BUTTON_CTRL, "NDOF_BUTTON_CTRL", 0, "NDOF Ctrl", "NdofCtrl"},
#endif
/* View buttons. */
{NDOF_BUTTON_V1, "NDOF_BUTTON_V1", 0, "NDOF View 1", ""},
{NDOF_BUTTON_V2, "NDOF_BUTTON_V2", 0, "NDOF View 2", ""},
{NDOF_BUTTON_V3, "NDOF_BUTTON_V3", 0, "NDOF View 3", ""},
/* general-purpose buttons */
{NDOF_BUTTON_1, "NDOF_BUTTON_1", 0, "NDOF Button 1", "NdofB1"},
{NDOF_BUTTON_2, "NDOF_BUTTON_2", 0, "NDOF Button 2", "NdofB2"},

View File

@ -279,25 +279,25 @@ enum {
NDOF_BUTTON_DOMINANT = 0x01a3, /* 419 */
NDOF_BUTTON_PLUS = 0x01a4, /* 420 */
NDOF_BUTTON_MINUS = 0x01a5, /* 421 */
/* General-purpose buttons. */
NDOF_BUTTON_1 = 0x01a6, /* 422 */
NDOF_BUTTON_2 = 0x01a7, /* 423 */
NDOF_BUTTON_3 = 0x01a8, /* 424 */
NDOF_BUTTON_4 = 0x01a9, /* 425 */
NDOF_BUTTON_5 = 0x01aa, /* 426 */
NDOF_BUTTON_6 = 0x01ab, /* 427 */
NDOF_BUTTON_7 = 0x01ac, /* 428 */
NDOF_BUTTON_8 = 0x01ad, /* 429 */
NDOF_BUTTON_9 = 0x01ae, /* 430 */
NDOF_BUTTON_10 = 0x01af, /* 431 */
/* more general-purpose buttons */
NDOF_BUTTON_A = 0x01b0, /* 432 */
NDOF_BUTTON_B = 0x01b1, /* 433 */
NDOF_BUTTON_C = 0x01b2, /* 434 */
/* Store/restore views. */
NDOF_BUTTON_V1 = 0x01b3, /* 435 */
NDOF_BUTTON_V2 = 0x01b4, /* 436 */
NDOF_BUTTON_V3 = 0x01b5, /* 437 */
NDOF_BUTTON_V1 = 0x01a6, /* 422 */
NDOF_BUTTON_V2 = 0x01a7, /* 423 */
NDOF_BUTTON_V3 = 0x01a8, /* 424 */
/* General-purpose buttons. */
NDOF_BUTTON_1 = 0x01aa, /* 426 */
NDOF_BUTTON_2 = 0x01ab, /* 427 */
NDOF_BUTTON_3 = 0x01ac, /* 428 */
NDOF_BUTTON_4 = 0x01ad, /* 429 */
NDOF_BUTTON_5 = 0x01ae, /* 430 */
NDOF_BUTTON_6 = 0x01af, /* 431 */
NDOF_BUTTON_7 = 0x01b0, /* 432 */
NDOF_BUTTON_8 = 0x01b1, /* 433 */
NDOF_BUTTON_9 = 0x01b2, /* 434 */
NDOF_BUTTON_10 = 0x01b3, /* 435 */
/* more general-purpose buttons */
NDOF_BUTTON_A = 0x01b4, /* 436 */
NDOF_BUTTON_B = 0x01b5, /* 437 */
NDOF_BUTTON_C = 0x01b6, /* 438 */
/* Disabled as GHOST converts these to keyboard events
* which use regular keyboard event handling logic. */
@ -313,8 +313,8 @@ enum {
NDOF_BUTTON_CTRL = 0x01bd, /* 445 */
#endif
#define _NDOF_MAX NDOF_BUTTON_V3
#define _NDOF_BUTTON_MAX NDOF_BUTTON_V3
#define _NDOF_MAX NDOF_BUTTON_C
#define _NDOF_BUTTON_MAX NDOF_BUTTON_C
/* ********** End of Input devices. ********** */