|
Blender V5.0
|
#include <cmath>#include <cstring>#include "BKE_idprop.hh"#include "BLI_listbase.h"#include "BLI_string_utf8.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 520 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actactionmap.
| void WM_xr_actionmap_active_index_set | ( | wmXrRuntimeData * | runtime, |
| short | idx ) |
Definition at line 525 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actactionmap.
| XrActionMap * WM_xr_actionmap_add_copy | ( | wmXrRuntimeData * | runtime, |
| XrActionMap * | am_src ) |
Definition at line 451 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 112 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 124 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 98 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 73 of file wm_xr_actionmap.cc.
References BLI_snprintf_utf8(), MAX_NAME, name, XrActionMapBinding::name, STRNCPY_UTF8, STRNCPY_UTF8_RLEN, 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 149 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, LISTBASE_FOREACH, MAX_NAME, name, and STREQLEN.
Referenced by WM_xr_actionmap_binding_new().
|
static |
Definition at line 61 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, LISTBASE_FOREACH, MAX_NAME, 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(), name, XrActionMapBinding::name, STRNCPY_UTF8, 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 129 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 497 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 437 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 412 of file wm_xr_actionmap.cc.
References BLI_snprintf_utf8(), MAX_NAME, name, XrActionMap::name, STRNCPY_UTF8, STRNCPY_UTF8_RLEN, 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 487 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, LISTBASE_FOREACH, MAX_NAME, name, and STREQLEN.
Referenced by WM_xr_actionmap_new().
|
static |
Definition at line 399 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, LISTBASE_FOREACH, MAX_NAME, 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 331 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 186 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 300 of file wm_xr_actionmap.cc.
References XrActionMapItem::bindings, BLI_addtail(), BLI_listbase_clear(), PointerRNA::data, IDP_CopyProperty(), LISTBASE_FOREACH, 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 275 of file wm_xr_actionmap.cc.
References BLI_snprintf_utf8(), MAX_NAME, name, XrActionMapItem::name, STRNCPY_UTF8, STRNCPY_UTF8_RLEN, 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 362 of file wm_xr_actionmap.cc.
References XrActionMap::items, LISTBASE_FOREACH, MAX_NAME, name, and STREQLEN.
Referenced by WM_xr_actionmap_item_new().
|
static |
Definition at line 263 of file wm_xr_actionmap.cc.
References XrActionMap::items, LISTBASE_FOREACH, MAX_NAME, 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 239 of file wm_xr_actionmap.cc.
References BLI_addtail(), XrActionMap::items, MEM_callocN(), name, XrActionMapItem::name, STRNCPY_UTF8, 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 173 of file wm_xr_actionmap.cc.
References BLI_assert, 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 167 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 199 of file wm_xr_actionmap.cc.
References PointerRNA::data, XrActionMapItem::op, XrActionMapItem::op_properties, XrActionMapItem::op_properties_ptr, ot, 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 342 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 380 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps, BLI_addtail(), MEM_callocN(), name, XrActionMap::name, STRNCPY_UTF8, 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 462 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 530 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::selactionmap.
| void WM_xr_actionmap_selected_index_set | ( | wmXrRuntimeData * | runtime, |
| short | idx ) |
Definition at line 535 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::selactionmap.
| void WM_xr_actionmaps_clear | ( | wmXrRuntimeData * | runtime | ) |
Definition at line 506 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 515 of file wm_xr_actionmap.cc.
References wmXrRuntimeData::actionmaps.