|
Blender V4.3
|
#include <cmath>#include <cstring>#include "BKE_idprop.hh"#include "BLI_listbase.h"#include "BLI_string.h"#include "MEM_guardedalloc.h"#include "WM_api.hh"#include "WM_types.hh"#include "wm_xr_intern.hh"Go to the source code of this file.
Macros | |
Window-Manager XR Action Maps | |
XR actionmap API, similar to WM keymap API. | |
| #define | WM_XR_ACTIONMAP_STR_DEFAULT "actionmap" |
| #define | WM_XR_ACTIONMAP_ITEM_STR_DEFAULT "action" |
| #define | WM_XR_ACTIONMAP_BINDING_STR_DEFAULT "binding" |
| #define WM_XR_ACTIONMAP_BINDING_STR_DEFAULT "binding" |
Definition at line 30 of file wm_xr_actionmap.cc.
Referenced by WM_xr_actionmap_binding_ensure_unique().
| #define WM_XR_ACTIONMAP_ITEM_STR_DEFAULT "action" |
Definition at line 29 of file wm_xr_actionmap.cc.
Referenced by WM_xr_actionmap_item_ensure_unique().
| #define WM_XR_ACTIONMAP_STR_DEFAULT "actionmap" |
Definition at line 28 of file wm_xr_actionmap.cc.
Referenced by WM_xr_actionmap_ensure_unique().
| short WM_xr_actionmap_active_index_get | ( | const wmXrRuntimeData * | runtime | ) |
Definition at line 529 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actactionmap.
| void WM_xr_actionmap_active_index_set | ( | wmXrRuntimeData * | runtime, |
| short | idx ) |
Definition at line 534 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actactionmap.
| XrActionMap * WM_xr_actionmap_add_copy | ( | wmXrRuntimeData * | runtime, |
| XrActionMap * | am_src ) |
Definition at line 460 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, BLI_addtail(), wm_xr_actionmap_copy(), and WM_xr_actionmap_ensure_unique().
| XrActionMapBinding * WM_xr_actionmap_binding_add_copy | ( | XrActionMapItem * | ami, |
| XrActionMapBinding * | amb_src ) |
Definition at line 115 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, BLI_addtail(), wm_xr_actionmap_binding_copy(), and WM_xr_actionmap_binding_ensure_unique().
|
static |
Definition at line 127 of file wm_xr_actionmap.cc.
References BLI_freelistN(), and XrActionMapBinding::component_paths.
Referenced by WM_xr_actionmap_binding_remove(), and wm_xr_actionmap_item_clear().
|
static |
Definition at line 101 of file wm_xr_actionmap.cc.
References BLI_addtail(), BLI_listbase_clear(), XrActionMapBinding::component_paths, LISTBASE_FOREACH, MEM_dupallocN, XrActionMapBinding::next, and XrActionMapBinding::prev.
Referenced by WM_xr_actionmap_binding_add_copy(), and wm_xr_actionmap_item_copy().
| void WM_xr_actionmap_binding_ensure_unique | ( | XrActionMapItem * | ami, |
| XrActionMapBinding * | amb ) |
Definition at line 74 of file wm_xr_actionmap.cc.
References BLI_snprintf(), BLI_strnlen(), MAX_NAME, XrActionMapBinding::name, STRNCPY, wm_xr_actionmap_binding_find_except(), and WM_XR_ACTIONMAP_BINDING_STR_DEFAULT.
Referenced by WM_xr_actionmap_binding_add_copy(), and WM_xr_actionmap_binding_new().
| XrActionMapBinding * WM_xr_actionmap_binding_find | ( | XrActionMapItem * | ami, |
| const char * | name ) |
Definition at line 152 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, LISTBASE_FOREACH, MAX_NAME, and STREQLEN.
Referenced by WM_xr_actionmap_binding_new().
|
static |
Definition at line 62 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, LISTBASE_FOREACH, MAX_NAME, and STREQLEN.
Referenced by WM_xr_actionmap_binding_ensure_unique().
| XrActionMapBinding * WM_xr_actionmap_binding_new | ( | XrActionMapItem * | ami, |
| const char * | name, | ||
| bool | replace_existing ) |
Definition at line 38 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, BLI_addtail(), XrActionMapBinding::float_threshold, MEM_callocN, XrActionMapBinding::name, STRNCPY, WM_xr_actionmap_binding_ensure_unique(), and WM_xr_actionmap_binding_find().
| bool WM_xr_actionmap_binding_remove | ( | XrActionMapItem * | ami, |
| XrActionMapBinding * | amb ) |
Definition at line 132 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, BLI_findindex(), BLI_freelinkN(), XrActionMapItem::selbinding, and wm_xr_actionmap_binding_clear().
| void WM_xr_actionmap_clear | ( | XrActionMap * | actionmap | ) |
Definition at line 506 of file wm_xr_actionmap.cc.
References BLI_freelistN(), XrActionMap::items, LISTBASE_FOREACH, XrActionMap::selitem, and wm_xr_actionmap_item_clear().
Referenced by WM_xr_actionmap_new(), WM_xr_actionmap_remove(), and WM_xr_actionmaps_clear().
|
static |
Definition at line 446 of file wm_xr_actionmap.cc.
References BLI_addtail(), BLI_listbase_clear(), XrActionMap::items, LISTBASE_FOREACH, MEM_dupallocN, XrActionMap::next, XrActionMap::prev, and wm_xr_actionmap_item_copy().
Referenced by WM_xr_actionmap_add_copy().
| void WM_xr_actionmap_ensure_unique | ( | wmXrRuntimeData * | runtime, |
| XrActionMap * | actionmap ) |
Definition at line 419 of file wm_xr_actionmap.cc.
References BLI_snprintf(), BLI_strnlen(), MAX_NAME, XrActionMap::name, STRNCPY, wm_xr_actionmap_find_except(), and WM_XR_ACTIONMAP_STR_DEFAULT.
Referenced by WM_xr_actionmap_add_copy(), and WM_xr_actionmap_new().
| XrActionMap * WM_xr_actionmap_find | ( | wmXrRuntimeData * | runtime, |
| const char * | name ) |
Definition at line 496 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, LISTBASE_FOREACH, MAX_NAME, and STREQLEN.
Referenced by WM_xr_actionmap_new().
|
static |
Definition at line 406 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, LISTBASE_FOREACH, MAX_NAME, and STREQLEN.
Referenced by WM_xr_actionmap_ensure_unique().
| XrActionMapItem * WM_xr_actionmap_item_add_copy | ( | XrActionMap * | actionmap, |
| XrActionMapItem * | ami_src ) |
Definition at line 338 of file wm_xr_actionmap.cc.
References BLI_addtail(), XrActionMap::items, wm_xr_actionmap_item_copy(), and WM_xr_actionmap_item_ensure_unique().
|
static |
Definition at line 189 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, BLI_freelistN(), LISTBASE_FOREACH, XrActionMapItem::selbinding, XrActionMapItem::user_paths, wm_xr_actionmap_binding_clear(), and wm_xr_actionmap_item_properties_free().
Referenced by WM_xr_actionmap_clear(), and WM_xr_actionmap_item_remove().
|
static |
Definition at line 306 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, BLI_addtail(), BLI_listbase_clear(), PointerRNA::data, IDP_CopyProperty(), LISTBASE_FOREACH, MEM_callocN, MEM_dupallocN, XrActionMapItem::next, XrActionMapItem::op, XrActionMapItem::op_properties, XrActionMapItem::op_properties_ptr, XrActionMapItem::prev, XrActionMapItem::user_paths, WM_operator_properties_create(), and wm_xr_actionmap_binding_copy().
Referenced by wm_xr_actionmap_copy(), and WM_xr_actionmap_item_add_copy().
| void WM_xr_actionmap_item_ensure_unique | ( | XrActionMap * | actionmap, |
| XrActionMapItem * | ami ) |
Definition at line 279 of file wm_xr_actionmap.cc.
References BLI_snprintf(), BLI_strnlen(), MAX_NAME, XrActionMapItem::name, STRNCPY, wm_xr_actionmap_item_find_except(), and WM_XR_ACTIONMAP_ITEM_STR_DEFAULT.
Referenced by WM_xr_actionmap_item_add_copy(), and WM_xr_actionmap_item_new().
| XrActionMapItem * WM_xr_actionmap_item_find | ( | XrActionMap * | actionmap, |
| const char * | name ) |
Definition at line 369 of file wm_xr_actionmap.cc.
References XrActionMap::items, LISTBASE_FOREACH, MAX_NAME, and STREQLEN.
Referenced by WM_xr_actionmap_item_new().
|
static |
Definition at line 267 of file wm_xr_actionmap.cc.
References XrActionMap::items, LISTBASE_FOREACH, MAX_NAME, and STREQLEN.
Referenced by WM_xr_actionmap_item_ensure_unique().
| XrActionMapItem * WM_xr_actionmap_item_new | ( | XrActionMap * | actionmap, |
| const char * | name, | ||
| bool | replace_existing ) |
Definition at line 242 of file wm_xr_actionmap.cc.
References BLI_addtail(), XrActionMap::items, MEM_callocN, XrActionMapItem::name, STRNCPY, XrActionMapItem::type, WM_xr_actionmap_item_ensure_unique(), WM_xr_actionmap_item_find(), wm_xr_actionmap_item_properties_free(), and XR_FLOAT_INPUT.
|
static |
Definition at line 176 of file wm_xr_actionmap.cc.
References BLI_assert, MEM_freeN(), XrActionMapItem::op_properties, XrActionMapItem::op_properties_ptr, and WM_operator_properties_free().
Referenced by wm_xr_actionmap_item_clear(), WM_xr_actionmap_item_new(), and WM_xr_actionmap_item_properties_update_ot().
|
static |
Definition at line 170 of file wm_xr_actionmap.cc.
References XrActionMapItem::op, XrActionMapItem::op_properties, XrActionMapItem::op_properties_ptr, WM_operator_properties_alloc(), and WM_operator_properties_sanitize().
Referenced by WM_xr_actionmap_item_properties_update_ot().
| void WM_xr_actionmap_item_properties_update_ot | ( | XrActionMapItem * | ami | ) |
Definition at line 202 of file wm_xr_actionmap.cc.
References PointerRNA::data, XrActionMapItem::op, XrActionMapItem::op_properties, XrActionMapItem::op_properties_ptr, ot, wmOperatorType::srna, PointerRNA::type, XrActionMapItem::type, WM_operator_properties_create_ptr(), WM_operator_properties_sanitize(), WM_operatortype_find(), wm_xr_actionmap_item_properties_free(), wm_xr_actionmap_item_properties_set(), XR_BOOLEAN_INPUT, XR_FLOAT_INPUT, XR_POSE_INPUT, XR_VECTOR2F_INPUT, and XR_VIBRATION_OUTPUT.
| bool WM_xr_actionmap_item_remove | ( | XrActionMap * | actionmap, |
| XrActionMapItem * | ami ) |
Definition at line 349 of file wm_xr_actionmap.cc.
References BLI_findindex(), BLI_freelinkN(), XrActionMap::items, XrActionMap::selitem, and wm_xr_actionmap_item_clear().
| XrActionMap * WM_xr_actionmap_new | ( | wmXrRuntimeData * | runtime, |
| const char * | name, | ||
| bool | replace_existing ) |
Definition at line 387 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, BLI_addtail(), MEM_callocN, XrActionMap::name, STRNCPY, WM_xr_actionmap_clear(), WM_xr_actionmap_ensure_unique(), and WM_xr_actionmap_find().
| bool WM_xr_actionmap_remove | ( | wmXrRuntimeData * | runtime, |
| XrActionMap * | actionmap ) |
Definition at line 471 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actactionmap, wmXrRuntimeData::actionmaps, BLI_findindex(), BLI_freelinkN(), wmXrRuntimeData::selactionmap, and WM_xr_actionmap_clear().
| short WM_xr_actionmap_selected_index_get | ( | const wmXrRuntimeData * | runtime | ) |
Definition at line 539 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::selactionmap.
| void WM_xr_actionmap_selected_index_set | ( | wmXrRuntimeData * | runtime, |
| short | idx ) |
Definition at line 544 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::selactionmap.
| void WM_xr_actionmaps_clear | ( | wmXrRuntimeData * | runtime | ) |
Definition at line 515 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actactionmap, wmXrRuntimeData::actionmaps, BLI_freelistN(), LISTBASE_FOREACH, wmXrRuntimeData::selactionmap, and WM_xr_actionmap_clear().
Referenced by wm_xr_runtime_data_free().
| ListBase * WM_xr_actionmaps_get | ( | wmXrRuntimeData * | runtime | ) |
Definition at line 524 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps.