43 BLI_assert(
ELEM(ptr->type, RNA_XrSessionSettings, RNA_XrSessionState, RNA_XrViewfinderState));
60 STRNCPY(component_path->path, path_str);
62 return component_path;
73 int idx =
BLI_findindex(&amb->component_paths, component_path);
77 component_path_ptr->invalidate();
96 bool replace_existing)
109# ifdef WITH_XR_OPENXR
121# ifdef WITH_XR_OPENXR
126 "ActionMapBinding '%s' cannot be removed from '%s'",
131 amb_ptr->invalidate();
139# ifdef WITH_XR_OPENXR
150# ifdef WITH_XR_OPENXR
158static int rna_XrActionMapBinding_component_paths_length(
PointerRNA *ptr)
160# ifdef WITH_XR_OPENXR
162 return amb->component_paths.count();
169static int rna_XrActionMapBinding_axis0_region_get(
PointerRNA *ptr)
171# ifdef WITH_XR_OPENXR
185static void rna_XrActionMapBinding_axis0_region_set(
PointerRNA *ptr,
int value)
187# ifdef WITH_XR_OPENXR
196static int rna_XrActionMapBinding_axis1_region_get(
PointerRNA *ptr)
198# ifdef WITH_XR_OPENXR
212static void rna_XrActionMapBinding_axis1_region_set(
PointerRNA *ptr,
int value)
214# ifdef WITH_XR_OPENXR
225# ifdef WITH_XR_OPENXR
227 if (
wm &&
wm->xr.runtime) {
247# ifdef WITH_XR_OPENXR
248 XrUserPath *user_path = MEM_new<XrUserPath>(__func__);
249 STRNCPY(user_path->path, path_str);
260# ifdef WITH_XR_OPENXR
266 user_path_ptr->invalidate();
274# ifdef WITH_XR_OPENXR
285 bool replace_existing)
287# ifdef WITH_XR_OPENXR
298# ifdef WITH_XR_OPENXR
308# ifdef WITH_XR_OPENXR
312 reports,
RPT_ERROR,
"ActionMapItem '%s' cannot be removed from '%s'", ami->name, am->name);
315 ami_ptr->invalidate();
323# ifdef WITH_XR_OPENXR
333# ifdef WITH_XR_OPENXR
341static int rna_XrActionMapItem_user_paths_length(
PointerRNA *ptr)
343# ifdef WITH_XR_OPENXR
345 return ami->user_paths.count();
352static void rna_XrActionMapItem_op_name_get(
PointerRNA *ptr,
char *value)
354# ifdef WITH_XR_OPENXR
357 if (ami->op_properties_ptr) {
364 strcpy(value, ami->op);
373static int rna_XrActionMapItem_op_name_length(
PointerRNA *ptr)
375# ifdef WITH_XR_OPENXR
378 if (ami->op_properties_ptr) {
384 return strlen(ami->op);
394# ifdef WITH_XR_OPENXR
396 if (ami->op_properties_ptr) {
397 return *(ami->op_properties_ptr);
405static bool rna_XrActionMapItem_bimanual_get(
PointerRNA *ptr)
407# ifdef WITH_XR_OPENXR
418static void rna_XrActionMapItem_bimanual_set(
PointerRNA *ptr,
bool value)
420# ifdef WITH_XR_OPENXR
428static bool rna_XrActionMapItem_haptic_match_user_paths_get(
PointerRNA *ptr)
430# ifdef WITH_XR_OPENXR
441static void rna_XrActionMapItem_haptic_match_user_paths_set(
PointerRNA *ptr,
bool value)
443# ifdef WITH_XR_OPENXR
451static int rna_XrActionMapItem_haptic_mode_get(
PointerRNA *ptr)
453# ifdef WITH_XR_OPENXR
468static void rna_XrActionMapItem_haptic_mode_set(
PointerRNA *ptr,
int value)
470# ifdef WITH_XR_OPENXR
479static bool rna_XrActionMapItem_pose_is_controller_grip_get(
PointerRNA *ptr)
481# ifdef WITH_XR_OPENXR
492static void rna_XrActionMapItem_pose_is_controller_grip_set(
PointerRNA *ptr,
bool value)
494# ifdef WITH_XR_OPENXR
502static bool rna_XrActionMapItem_pose_is_controller_aim_get(
PointerRNA *ptr)
504# ifdef WITH_XR_OPENXR
515static void rna_XrActionMapItem_pose_is_controller_aim_set(
PointerRNA *ptr,
bool value)
517# ifdef WITH_XR_OPENXR
527# ifdef WITH_XR_OPENXR
535static int rna_XrActionMapItem_bindings_length(
PointerRNA *ptr)
537# ifdef WITH_XR_OPENXR
539 return ami->bindings.count();
548# ifdef WITH_XR_OPENXR
550 if (
wm &&
wm->xr.runtime) {
566# ifdef WITH_XR_OPENXR
576# ifdef WITH_XR_OPENXR
577 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
587# ifdef WITH_XR_OPENXR
588 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
598# ifdef WITH_XR_OPENXR
599 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
605 actionmap_ptr->invalidate();
613# ifdef WITH_XR_OPENXR
614 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
624# ifdef WITH_XR_OPENXR
632static int rna_XrActionMap_items_length(
PointerRNA *ptr)
634# ifdef WITH_XR_OPENXR
636 return actionmap->items.count();
645# ifdef WITH_XR_OPENXR
647 if (
wm &&
wm->xr.runtime) {
662static bool rna_XrSessionSettings_use_positional_tracking_get(
PointerRNA *ptr)
664# ifdef WITH_XR_OPENXR
665 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
673static void rna_XrSessionSettings_use_positional_tracking_set(
PointerRNA *ptr,
bool value)
675# ifdef WITH_XR_OPENXR
676 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
683static bool rna_XrSessionSettings_use_absolute_tracking_get(
PointerRNA *ptr)
685# ifdef WITH_XR_OPENXR
686 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
694static void rna_XrSessionSettings_use_absolute_tracking_set(
PointerRNA *ptr,
bool value)
696# ifdef WITH_XR_OPENXR
697 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
704static int rna_XrSessionSettings_icon_from_show_object_viewport_get(
PointerRNA *ptr)
706# ifdef WITH_XR_OPENXR
707 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
709 xr->session_settings.object_type_exclude_viewport,
712 &xr->session_settings.object_type_exclude_select
729static bool rna_XrSessionState_is_running(
bContext *
C)
731# ifdef WITH_XR_OPENXR
740static void rna_XrSessionState_reset_to_base_pose(
bContext *
C)
742# ifdef WITH_XR_OPENXR
752# ifdef WITH_XR_OPENXR
761static bool rna_XrSessionState_action_create(
bContext *
C,
765# ifdef WITH_XR_OPENXR
767 if (ami->user_paths.is_empty()) {
772 const bool is_button_action = (is_float_action || ami->type ==
XR_BOOLEAN_INPUT);
777 if (is_button_action) {
783 op_properties = ami->op_properties;
787 haptic_duration_msec =
int64_t(ami->haptic_duration * 1000.0f);
797 is_button_action ? ami->haptic_name :
nullptr,
798 is_button_action ? &haptic_duration_msec :
nullptr,
799 is_button_action ? &ami->haptic_frequency :
nullptr,
800 is_button_action ? &ami->haptic_amplitude :
nullptr,
810static bool rna_XrSessionState_action_binding_create(
bContext *
C,
815# ifdef WITH_XR_OPENXR
817 const int count_user_paths = ami->user_paths.count();
818 const int count_component_paths = amb->component_paths.count();
819 if (count_user_paths < 1 || (count_user_paths != count_component_paths)) {
824 const bool is_button_action = (is_float_action || ami->type ==
XR_BOOLEAN_INPUT);
826 float float_thresholds[2];
830 if (is_float_action) {
831 float_thresholds[0] = float_thresholds[1] = amb->float_threshold;
833 if (is_button_action) {
834 axis_flags[0] = axis_flags[1] =
eXrAxisFlag(amb->axis_flag);
836 if (is_pose_action) {
838 eul_to_quat(poses[0].orientation_quat, amb->pose_rotation);
840 memcpy(&poses[1], &poses[0],
sizeof(poses[1]));
848 &amb->component_paths,
849 is_float_action ? float_thresholds :
nullptr,
850 is_button_action ? axis_flags :
nullptr,
851 is_pose_action ? poses :
nullptr);
858bool rna_XrSessionState_active_action_set_set(
bContext *
C,
const char *action_set_name)
860# ifdef WITH_XR_OPENXR
869bool rna_XrSessionState_controller_pose_actions_set(
bContext *
C,
870 const char *action_set_name,
871 const char *grip_action_name,
872 const char *aim_action_name)
874# ifdef WITH_XR_OPENXR
877 &
wm->xr, action_set_name, grip_action_name, aim_action_name);
879 UNUSED_VARS(
C, action_set_name, grip_action_name, aim_action_name);
884void rna_XrSessionState_action_state_get(
bContext *
C,
885 const char *action_set_name,
886 const char *action_name,
887 const char *user_path,
890# ifdef WITH_XR_OPENXR
892 wmXrActionState
state;
894 switch (
state.type) {
900 r_state[0] =
state.state_float;
913 UNUSED_VARS(
C, action_set_name, action_name, user_path);
918bool rna_XrSessionState_haptic_action_apply(
bContext *
C,
919 const char *action_set_name,
920 const char *action_name,
921 const char *user_path,
926# ifdef WITH_XR_OPENXR
932 user_path[0] ? user_path :
nullptr,
942void rna_XrSessionState_haptic_action_stop(
bContext *
C,
943 const char *action_set_name,
944 const char *action_name,
945 const char *user_path)
947# ifdef WITH_XR_OPENXR
950 &
wm->xr, action_set_name, action_name, user_path[0] ? user_path :
nullptr);
952 UNUSED_VARS(
C, action_set_name, action_name, user_path);
956static void rna_XrSessionState_controller_grip_location_get(
bContext *
C,
960# ifdef WITH_XR_OPENXR
969static void rna_XrSessionState_controller_grip_rotation_get(
bContext *
C,
973# ifdef WITH_XR_OPENXR
982static void rna_XrSessionState_controller_aim_location_get(
bContext *
C,
986# ifdef WITH_XR_OPENXR
995static void rna_XrSessionState_controller_aim_rotation_get(
bContext *
C,
999# ifdef WITH_XR_OPENXR
1008static void rna_XrSessionState_viewer_pose_location_get(
PointerRNA *ptr,
float *r_values)
1010# ifdef WITH_XR_OPENXR
1011 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1019static void rna_XrSessionState_viewer_pose_rotation_get(
PointerRNA *ptr,
float *r_values)
1021# ifdef WITH_XR_OPENXR
1022 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1032# ifdef WITH_XR_OPENXR
1033 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1042static void rna_XrSessionState_viewfinder_location_get(
PointerRNA *ptr,
float *r_values)
1044# ifdef WITH_XR_OPENXR
1045 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1053static void rna_XrSessionState_viewfinder_orientation_get(
PointerRNA *ptr,
float *r_values)
1055# ifdef WITH_XR_OPENXR
1056 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1064static void rna_XrSessionState_viewfinder_trigger_flash(
PointerRNA ptr)
1066# ifdef WITH_XR_OPENXR
1067 wmXrData *xr = rna_XrSession_wm_xr_data_get(&ptr);
1074static void rna_XrSessionState_viewfinder_trigger_focus_indicator(
PointerRNA ptr,
bool hit_success)
1076# ifdef WITH_XR_OPENXR
1077 wmXrData *xr = rna_XrSession_wm_xr_data_get(&ptr);
1084static void rna_XrSessionState_viewfinder_reset_view_smoothing(
PointerRNA ptr)
1086# ifdef WITH_XR_OPENXR
1087 wmXrData *xr = rna_XrSession_wm_xr_data_get(&ptr);
1094static bool rna_XrSessionState_viewfinder_capture_dof_enabled_get(
PointerRNA *ptr)
1097# ifdef WITH_XR_OPENXR
1098 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1107static void rna_XrSessionState_viewfinder_capture_dof_enabled_set(
PointerRNA *ptr,
bool value)
1109# ifdef WITH_XR_OPENXR
1110 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1117static float rna_XrSessionState_viewfinder_capture_lens_focal_get(
PointerRNA *ptr)
1120# ifdef WITH_XR_OPENXR
1121 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1130static void rna_XrSessionState_viewfinder_capture_lens_focal_set(
PointerRNA *ptr,
float value)
1132# ifdef WITH_XR_OPENXR
1133 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1140static float rna_XrSessionState_viewfinder_capture_dof_fstop_get(
PointerRNA *ptr)
1143# ifdef WITH_XR_OPENXR
1144 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1153static void rna_XrSessionState_viewfinder_capture_dof_fstop_set(
PointerRNA *ptr,
float value)
1155# ifdef WITH_XR_OPENXR
1156 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1163static float rna_XrSessionState_viewfinder_capture_dof_distance_get(
PointerRNA *ptr)
1166# ifdef WITH_XR_OPENXR
1167 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1176static void rna_XrSessionState_viewfinder_capture_dof_distance_set(
PointerRNA *ptr,
float value)
1178# ifdef WITH_XR_OPENXR
1179 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1186static bool rna_XrSessionState_viewfinder_playback_show_active_capture_in_space_enabled_get(
1190# ifdef WITH_XR_OPENXR
1191 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1200static void rna_XrSessionState_viewfinder_playback_show_active_capture_in_space_enabled_set(
1203# ifdef WITH_XR_OPENXR
1204 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1211static int rna_XrSessionState_viewfinder_active_mode_get(
PointerRNA *ptr)
1214# ifdef WITH_XR_OPENXR
1215 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1218 value =
static_cast<int>(enum_value);
1226static void rna_XrSessionState_viewfinder_active_mode_set(
PointerRNA *ptr,
int value)
1228# ifdef WITH_XR_OPENXR
1229 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1237static int rna_XrSessionState_viewfinder_active_action_live_get(
PointerRNA *ptr)
1240# ifdef WITH_XR_OPENXR
1241 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1244 value =
static_cast<int>(enum_value);
1252static void rna_XrSessionState_viewfinder_active_action_live_set(
PointerRNA *ptr,
int value)
1254# ifdef WITH_XR_OPENXR
1255 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1263static int rna_XrSessionState_viewfinder_active_action_playback_get(
PointerRNA *ptr)
1266# ifdef WITH_XR_OPENXR
1267 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1270 value =
static_cast<int>(enum_value);
1278static void rna_XrSessionState_viewfinder_active_action_playback_set(
PointerRNA *ptr,
int value)
1280# ifdef WITH_XR_OPENXR
1281 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1289static int rna_XrSessionState_viewfinder_active_action_confirm_get(
PointerRNA *ptr)
1292# ifdef WITH_XR_OPENXR
1293 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1296 value =
static_cast<int>(enum_value);
1304static void rna_XrSessionState_viewfinder_active_action_confirm_set(
PointerRNA *ptr,
int value)
1306# ifdef WITH_XR_OPENXR
1307 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1315static void rna_XrSessionState_nav_location_get(
PointerRNA *ptr,
float *r_values)
1317# ifdef WITH_XR_OPENXR
1318 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1326static void rna_XrSessionState_nav_location_set(
PointerRNA *ptr,
const float *values)
1328# ifdef WITH_XR_OPENXR
1329 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1336static void rna_XrSessionState_nav_rotation_get(
PointerRNA *ptr,
float *r_values)
1338# ifdef WITH_XR_OPENXR
1339 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1347static void rna_XrSessionState_nav_rotation_set(
PointerRNA *ptr,
const float *values)
1349# ifdef WITH_XR_OPENXR
1350 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1357static float rna_XrSessionState_nav_scale_get(
PointerRNA *ptr)
1360# ifdef WITH_XR_OPENXR
1361 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1370static void rna_XrSessionState_nav_scale_set(
PointerRNA *ptr,
float value)
1372# ifdef WITH_XR_OPENXR
1373 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1380static float rna_XrSessionState_viewer_scale_get(
PointerRNA *ptr)
1383# ifdef WITH_XR_OPENXR
1384 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1395# ifdef WITH_XR_OPENXR
1396 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1404static int rna_XrSessionState_actionmaps_length(
PointerRNA *ptr)
1406# ifdef WITH_XR_OPENXR
1407 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1416static int rna_XrSessionState_active_actionmap_get(
PointerRNA *ptr)
1418# ifdef WITH_XR_OPENXR
1419 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1427static void rna_XrSessionState_active_actionmap_set(
PointerRNA *ptr,
int value)
1429# ifdef WITH_XR_OPENXR
1430 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1437static int rna_XrSessionState_selected_actionmap_get(
PointerRNA *ptr)
1439# ifdef WITH_XR_OPENXR
1440 const wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1448static void rna_XrSessionState_selected_actionmap_set(
PointerRNA *ptr,
int value)
1450# ifdef WITH_XR_OPENXR
1451 wmXrData *xr = rna_XrSession_wm_xr_data_get(ptr);
1464static void rna_XrEventData_action_set_get(
PointerRNA *ptr,
char *r_value)
1466# ifdef WITH_XR_OPENXR
1467 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1468 strcpy(r_value,
data->action_set);
1475static int rna_XrEventData_action_set_length(
PointerRNA *ptr)
1477# ifdef WITH_XR_OPENXR
1478 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1479 return strlen(
data->action_set);
1486static void rna_XrEventData_action_get(
PointerRNA *ptr,
char *r_value)
1488# ifdef WITH_XR_OPENXR
1489 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1490 strcpy(r_value,
data->action);
1497static int rna_XrEventData_action_length(
PointerRNA *ptr)
1499# ifdef WITH_XR_OPENXR
1500 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1501 return strlen(
data->action);
1508static void rna_XrEventData_user_path_get(
PointerRNA *ptr,
char *r_value)
1510# ifdef WITH_XR_OPENXR
1511 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1512 strcpy(r_value,
data->user_path);
1519static int rna_XrEventData_user_path_length(
PointerRNA *ptr)
1521# ifdef WITH_XR_OPENXR
1522 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1523 return strlen(
data->user_path);
1530static void rna_XrEventData_user_path_other_get(
PointerRNA *ptr,
char *r_value)
1532# ifdef WITH_XR_OPENXR
1533 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1534 strcpy(r_value,
data->user_path_other);
1541static int rna_XrEventData_user_path_other_length(
PointerRNA *ptr)
1543# ifdef WITH_XR_OPENXR
1544 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1545 return strlen(
data->user_path_other);
1552static int rna_XrEventData_type_get(
PointerRNA *ptr)
1554# ifdef WITH_XR_OPENXR
1555 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1563static void rna_XrEventData_state_get(
PointerRNA *ptr,
float r_values[2])
1565# ifdef WITH_XR_OPENXR
1566 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1574static void rna_XrEventData_state_other_get(
PointerRNA *ptr,
float r_values[2])
1576# ifdef WITH_XR_OPENXR
1577 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1585static float rna_XrEventData_float_threshold_get(
PointerRNA *ptr)
1587# ifdef WITH_XR_OPENXR
1588 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1589 return data->float_threshold;
1596static void rna_XrEventData_controller_location_get(
PointerRNA *ptr,
float r_values[3])
1598# ifdef WITH_XR_OPENXR
1599 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1607static void rna_XrEventData_controller_rotation_get(
PointerRNA *ptr,
float r_values[4])
1609# ifdef WITH_XR_OPENXR
1610 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1618static void rna_XrEventData_controller_location_other_get(
PointerRNA *ptr,
float r_values[3])
1620# ifdef WITH_XR_OPENXR
1621 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1629static void rna_XrEventData_controller_rotation_other_get(
PointerRNA *ptr,
float r_values[4])
1631# ifdef WITH_XR_OPENXR
1632 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1640static bool rna_XrEventData_bimanual_get(
PointerRNA *ptr)
1642# ifdef WITH_XR_OPENXR
1643 const wmXrActionData *
data =
static_cast<const wmXrActionData *
>(ptr->data);
1644 return data->bimanual;
1666 "Float action, representing either a digital or analog button"},
1671 "2D float vector action, representing a thumbstick or trackpad"},
1676 "3D pose action, representing a controller's location and rotation"},
1681 "Haptic vibration output action, to be applied with a duration, frequency, and amplitude"},
1682 {0,
nullptr, 0,
nullptr,
nullptr},
1690 "Execute operator on button press (non-modal operators only)"},
1695 "Execute operator on button release (non-modal operators only)"},
1696 {
XR_OP_MODAL,
"MODAL", 0,
"Modal",
"Use modal execution (modal operators only)"},
1697 {0,
nullptr, 0,
nullptr,
nullptr},
1701 {
XR_HAPTIC_PRESS,
"PRESS", 0,
"Press",
"Apply haptics on button press"},
1702 {
XR_HAPTIC_RELEASE,
"RELEASE", 0,
"Release",
"Apply haptics on button release"},
1707 "Apply haptics on button press and release"},
1712 "Apply haptics repeatedly for the duration of the button press"},
1713 {0,
nullptr, 0,
nullptr,
nullptr},
1717 {0,
"ANY", 0,
"Any",
"Use any axis region for operator execution"},
1722 "Use positive axis region only for operator execution"},
1727 "Use negative axis region only for operator execution"},
1728 {0,
nullptr, 0,
nullptr,
nullptr},
1732 {0,
"ANY", 0,
"Any",
"Use any axis region for operator execution"},
1737 "Use positive axis region only for operator execution"},
1742 "Use negative axis region only for operator execution"},
1743 {0,
nullptr, 0,
nullptr,
nullptr},
1766 func,
"component_path",
"XrComponentPath",
"Component Path",
"Added component path");
1771 parm =
RNA_def_pointer(func,
"component_path",
"XrComponentPath",
"Component Path",
"");
1783 "The component path with the given path");
1805 "Replace any existing binding with the same name");
1808 func,
"binding",
"XrActionMapBinding",
"Binding",
"Added action map binding");
1812 func =
RNA_def_function(srna,
"new_from_binding",
"rna_XrActionMapBinding_new_from_binding");
1814 func,
"binding",
"XrActionMapBinding",
"Binding",
"Binding to use as a reference");
1817 func,
"result",
"XrActionMapBinding",
"Binding",
"Added action map binding");
1823 parm =
RNA_def_pointer(func,
"binding",
"XrActionMapBinding",
"Binding",
"");
1832 "XrActionMapBinding",
1834 "The action map binding with the given name");
1853 parm =
RNA_def_pointer(func,
"user_path",
"XrUserPath",
"User Path",
"Added user path");
1858 parm =
RNA_def_pointer(func,
"user_path",
"XrUserPath",
"User Path",
"");
1867 func,
"user_path",
"XrUserPath",
"User Path",
"The user path with the given path");
1889 "Replace any existing item with the same name");
1891 parm =
RNA_def_pointer(func,
"item",
"XrActionMapItem",
"Item",
"Added action map item");
1895 func =
RNA_def_function(srna,
"new_from_item",
"rna_XrActionMapItem_new_from_item");
1896 parm =
RNA_def_pointer(func,
"item",
"XrActionMapItem",
"Item",
"Item to use as a reference");
1898 parm =
RNA_def_pointer(func,
"result",
"XrActionMapItem",
"Item",
"Added action map item");
1912 func,
"item",
"XrActionMapItem",
"Item",
"The action map item with the given name");
1928 parm =
RNA_def_pointer(func,
"xr_session_state",
"XrSessionState",
"XR Session State",
"");
1936 "Replace any existing actionmap with the same name");
1938 parm =
RNA_def_pointer(func,
"actionmap",
"XrActionMap",
"Action Map",
"Added action map");
1942 func =
RNA_def_function(srna,
"new_from_actionmap",
"rna_XrActionMap_new_from_actionmap");
1944 parm =
RNA_def_pointer(func,
"xr_session_state",
"XrSessionState",
"XR Session State",
"");
1947 func,
"actionmap",
"XrActionMap",
"Action Map",
"Action map to use as a reference");
1949 parm =
RNA_def_pointer(func,
"result",
"XrActionMap",
"Action Map",
"Added action map");
1955 parm =
RNA_def_pointer(func,
"xr_session_state",
"XrSessionState",
"XR Session State",
"");
1957 parm =
RNA_def_pointer(func,
"actionmap",
"XrActionMap",
"Action Map",
"Removed action map");
1963 parm =
RNA_def_pointer(func,
"xr_session_state",
"XrSessionState",
"XR Session State",
"");
1968 func,
"actionmap",
"XrActionMap",
"Action Map",
"The action map with the given name");
1991 "rna_XrActionMap_items_begin",
1992 "rna_iterator_listbase_next",
1993 "rna_iterator_listbase_end",
1994 "rna_iterator_listbase_get",
1995 "rna_XrActionMap_items_length",
2002 "Items in the action map, mapping an XR event to an operator, pose, or haptic output");
2036 "rna_XrActionMapItem_user_paths_begin",
2037 "rna_iterator_listbase_next",
2038 "rna_iterator_listbase_end",
2039 "rna_iterator_listbase_get",
2040 "rna_XrActionMapItem_user_paths_length",
2055 prop,
"Operator Name",
"Name of operator (translated) to call on action event");
2057 prop,
"rna_XrActionMapItem_op_name_get",
"rna_XrActionMapItem_op_name_length",
nullptr);
2062 prop,
"rna_XrActionMapItem_op_properties_get",
nullptr,
nullptr,
nullptr);
2064 prop,
"Operator Properties",
"Properties to set when the operator is called");
2074 prop,
"rna_XrActionMapItem_bimanual_get",
"rna_XrActionMapItem_bimanual_set");
2076 prop,
"Bimanual",
"The action depends on the states/poses of both user paths");
2080 "rna_XrActionMapItem_pose_is_controller_grip_get",
2081 "rna_XrActionMapItem_pose_is_controller_grip_set");
2083 prop,
"Is Controller Grip",
"The action poses will be used for the VR controller grips");
2087 "rna_XrActionMapItem_pose_is_controller_aim_get",
2088 "rna_XrActionMapItem_pose_is_controller_aim_set");
2090 prop,
"Is Controller Aim",
"The action poses will be used for the VR controller aims");
2094 prop,
"Haptic Name",
"Name of the haptic action to apply when executing this action");
2098 "rna_XrActionMapItem_haptic_match_user_paths_get",
2099 "rna_XrActionMapItem_haptic_match_user_paths_set");
2102 "Haptic Match User Paths",
2103 "Apply haptics to the same user paths for the haptic action and this action");
2109 "Haptic duration in seconds. 0.0 is the minimum supported duration.");
2115 "Frequency of the haptic vibration in hertz. 0.0 specifies the OpenXR "
2116 "runtime's default frequency.");
2121 prop,
"Haptic Amplitude",
"Intensity of the haptic vibration, ranging from 0.0 to 1.0");
2126 prop,
"rna_XrActionMapItem_haptic_mode_get",
"rna_XrActionMapItem_haptic_mode_set",
nullptr);
2132 "rna_XrActionMapItem_bindings_begin",
2133 "rna_iterator_listbase_next",
2134 "rna_iterator_listbase_end",
2135 "rna_iterator_listbase_get",
2136 "rna_XrActionMapItem_bindings_length",
2141 prop,
"Bindings",
"Bindings for the action map item, mapping the action to an XR input");
2174 "rna_XrActionMapBinding_component_paths_begin",
2175 "rna_iterator_listbase_next",
2176 "rna_iterator_listbase_end",
2177 "rna_iterator_listbase_get",
2178 "rna_XrActionMapBinding_component_paths_length",
2193 "rna_XrActionMapBinding_axis0_region_get",
2194 "rna_XrActionMapBinding_axis0_region_set",
2197 prop,
"Axis 0 Region",
"Action execution region for the first input axis");
2202 "rna_XrActionMapBinding_axis1_region_get",
2203 "rna_XrActionMapBinding_axis1_region_set",
2206 prop,
"Axis 1 Region",
"Action execution region for the second input axis");
2231 "Follow the active scene camera to define the VR view's base pose"},
2236 "Follow the transformation of an object to define the VR view's base pose"},
2241 "Follow a custom transformation to define the VR view's base pose"},
2242 {0,
nullptr, 0,
nullptr,
nullptr},
2252 "Draw dark controller with aiming axis ray"},
2257 "Draw light controller with aiming axis ray"},
2258 {0,
nullptr, 0,
nullptr,
nullptr},
2266 "Place the viewfinder on the left hand controller"},
2271 "Place the viewfinder on the right hand controller"},
2272 {0,
nullptr, 0,
nullptr,
nullptr},
2289 "Define where the location and rotation for the VR view come from, to which "
2290 "translation and rotation deltas from the VR headset will be applied to");
2297 "Object to take the location and rotation to which translation and "
2298 "rotation deltas from the VR headset will be applied to");
2303 "Base Pose Location",
2304 "Coordinates to apply translation deltas from the VR headset to");
2312 "Rotation angle around the Z-Axis to apply the rotation deltas from the VR headset to");
2345 prop,
"Show Controllers",
"Show VR controllers (requires VR actions for controller poses)");
2356 prop,
"Show Object Extras",
"Show object extras, including empties, lights, and cameras");
2363 prop,
"Controller Draw Style",
"Style to use when drawing VR controllers");
2378 prop,
"Viewfinder Hand",
"Hand on which to place the Location Scouting Viewfinder");
2392 prop,
"Viewfinder Crosshair Enabled",
"Enable the Viewfinder Crosshair");
2398 "Viewfinder Passepartout Overscan",
2399 "Border size of the Viewfinder Passepartout overlay");
2405 "Viewfinder Passepartout Opacity",
2406 "Opacity of the darkened Viewfinder Passepartout overlay");
2431 "Scaling factor applied to the VR view for fine adjustments. "
2432 "Modifying this value will keep the viewer at the same world relative position");
2439 "rna_XrSessionSettings_use_positional_tracking_get",
2440 "rna_XrSessionSettings_use_positional_tracking_set");
2443 "Positional Tracking",
2444 "Allow VR headsets to affect the location in virtual space, in addition to the rotation");
2449 "rna_XrSessionSettings_use_absolute_tracking_get",
2450 "rna_XrSessionSettings_use_absolute_tracking_set");
2453 "Absolute Tracking",
2454 "Allow the VR tracking origin to be defined independently of the headset location");
2462 prop,
"rna_XrSessionSettings_icon_from_show_object_viewport_get",
nullptr,
nullptr);
2484 srna,
"viewfinder",
"XrViewfinderState",
"Viewfinder",
"Viewfinder State");
2486 prop,
"rna_XrSessionState_viewfinder_get",
nullptr,
nullptr,
nullptr);
2488 func =
RNA_def_function(srna,
"is_running",
"rna_XrSessionState_is_running");
2496 func =
RNA_def_function(srna,
"reset_to_base_pose",
"rna_XrSessionState_reset_to_base_pose");
2502 func =
RNA_def_function(srna,
"action_set_create",
"rna_XrSessionState_action_set_create");
2512 func =
RNA_def_function(srna,
"action_create",
"rna_XrSessionState_action_create");
2519 parm =
RNA_def_pointer(func,
"actionmap_item",
"XrActionMapItem",
"",
"");
2525 srna,
"action_binding_create",
"rna_XrSessionState_action_binding_create");
2532 parm =
RNA_def_pointer(func,
"actionmap_item",
"XrActionMapItem",
"",
"");
2534 parm =
RNA_def_pointer(func,
"actionmap_binding",
"XrActionMapBinding",
"",
"");
2540 srna,
"active_action_set_set",
"rna_XrSessionState_active_action_set_set");
2551 srna,
"controller_pose_actions_set",
"rna_XrSessionState_controller_pose_actions_set");
2563 "Name of the action representing the controller grips");
2570 "Name of the action representing the controller aims");
2575 func =
RNA_def_function(srna,
"action_state_get",
"rna_XrSessionState_action_state_get");
2581 func,
"action_set_name",
nullptr,
MAX_NAME,
"Action Set",
"Action set name");
2596 "Current state of the VR action. Second float value is only set for 2D vector type actions.",
2601 func =
RNA_def_function(srna,
"haptic_action_apply",
"rna_XrSessionState_haptic_action_apply");
2607 func,
"action_set_name",
nullptr,
MAX_NAME,
"Action Set",
"Action set name");
2617 "Optional OpenXR user path. If not set, the action will be applied to all paths.");
2625 "Haptic duration in seconds. 0.0 is the minimum supported duration.",
2635 "Frequency of the haptic vibration in hertz. 0.0 specifies the OpenXR "
2636 "runtime's default frequency.",
2646 "Haptic amplitude, ranging from 0.0 to 1.0",
2653 func =
RNA_def_function(srna,
"haptic_action_stop",
"rna_XrSessionState_haptic_action_stop");
2659 func,
"action_set_name",
nullptr,
MAX_NAME,
"Action Set",
"Action set name");
2669 "Optional OpenXR user path. If not set, the action will be stopped for all paths.");
2673 srna,
"controller_grip_location_get",
"rna_XrSessionState_controller_grip_location_get");
2675 "Get the last known controller grip location in world space");
2679 parm =
RNA_def_int(func,
"index", 0, 0, 255,
"Index",
"Controller index", 0, 255);
2688 "Controller grip location",
2694 srna,
"controller_grip_rotation_get",
"rna_XrSessionState_controller_grip_rotation_get");
2696 func,
"Get the last known controller grip rotation (quaternion) in world space");
2700 parm =
RNA_def_int(func,
"index", 0, 0, 255,
"Index",
"Controller index", 0, 255);
2709 "Controller grip quaternion rotation",
2717 srna,
"controller_aim_location_get",
"rna_XrSessionState_controller_aim_location_get");
2719 "Get the last known controller aim location in world space");
2723 parm =
RNA_def_int(func,
"index", 0, 0, 255,
"Index",
"Controller index", 0, 255);
2732 "Controller aim location",
2738 srna,
"controller_aim_rotation_get",
"rna_XrSessionState_controller_aim_rotation_get");
2740 func,
"Get the last known controller aim rotation (quaternion) in world space");
2744 parm =
RNA_def_int(func,
"index", 0, 0, 255,
"Index",
"Controller index", 0, 255);
2753 "Controller aim quaternion rotation",
2763 prop,
"rna_XrSessionState_viewer_pose_location_get",
nullptr,
nullptr);
2767 "Viewer Pose Location",
2768 "Last known location of the viewer pose (center between the eyes) in world space");
2773 prop,
"rna_XrSessionState_viewer_pose_rotation_get",
nullptr,
nullptr);
2777 "Viewer Pose Rotation",
2778 "Last known rotation of the viewer pose (center between the eyes) in world space");
2783 prop,
"rna_XrSessionState_nav_location_get",
"rna_XrSessionState_nav_location_set",
nullptr);
2786 "Navigation Location",
2787 "Location offset to apply to base pose when determining viewer location");
2792 prop,
"rna_XrSessionState_nav_rotation_get",
"rna_XrSessionState_nav_rotation_set",
nullptr);
2795 "Navigation Rotation",
2796 "Rotation offset to apply to base pose when determining viewer rotation");
2800 prop,
"rna_XrSessionState_nav_scale_get",
"rna_XrSessionState_nav_scale_set",
nullptr);
2803 "Navigation scale multiplier applied when determining viewer scale");
2810 "Viewer XR scale factor, computed from the navigation scale, "
2811 "view scale session setting, and active scene unit scale");
2816 "rna_XrSessionState_actionmaps_begin",
2817 "rna_iterator_listbase_next",
2818 "rna_iterator_listbase_end",
2819 "rna_iterator_listbase_get",
2820 "rna_XrSessionState_actionmaps_length",
2829 "rna_XrSessionState_active_actionmap_get",
2830 "rna_XrSessionState_active_actionmap_set",
2836 "rna_XrSessionState_selected_actionmap_get",
2837 "rna_XrSessionState_selected_actionmap_set",
2857 ICON_RESTRICT_RENDER_OFF,
2859 "Capture a shot using the viewfinder"},
2864 "Preview and playback captured shots in the viewfinder"},
2868 "Confirmation Mode",
2869 "Confirm user action"},
2870 {0,
nullptr, 0,
nullptr,
nullptr},
2878 {0,
nullptr, 0,
nullptr,
nullptr},
2885 "Browse Captured Shots",
2889 ICON_OUTLINER_OB_CAMERA,
2890 "Preview Active Shot in Space"},
2892 {0,
nullptr, 0,
nullptr,
nullptr}};
2897 {0,
nullptr, 0,
nullptr,
nullptr}};
2902 "Runtime state information about the VR Location Scouting Viewfinder");
2907 prop,
"rna_XrSessionState_viewfinder_location_get",
nullptr,
nullptr);
2910 prop,
"Viewfinder Location",
"Last known location of the viewfinder in world space");
2915 prop,
"rna_XrSessionState_viewfinder_orientation_get",
nullptr,
nullptr);
2918 prop,
"Viewfinder Rotation",
"Last known orientation of the viewfinder in world space");
2920 func =
RNA_def_function(srna,
"trigger_flash",
"rna_XrSessionState_viewfinder_trigger_flash");
2922 "Trigger the Viewfinder flash to indicate a shot was captured");
2926 srna,
"trigger_focus_indicator",
"rna_XrSessionState_viewfinder_trigger_focus_indicator");
2928 func,
"Blink the Viewfinder crosshair to indicate whether a focus action hit a target");
2934 "True to blink the success color, False to blink the miss color");
2938 srna,
"reset_view_smoothing",
"rna_XrSessionState_viewfinder_reset_view_smoothing");
2945 "rna_XrSessionState_viewfinder_capture_dof_enabled_get",
2946 "rna_XrSessionState_viewfinder_capture_dof_enabled_set");
2948 "Viewfinder Capture Depth of Field Enabled",
2949 "Enable viewfinder capture depth of field");
2955 "rna_XrSessionState_viewfinder_capture_lens_focal_get",
2956 "rna_XrSessionState_viewfinder_capture_lens_focal_set",
2959 "Viewfinder Capture Focal Length",
2960 "Viewfinder capture focal length value in millimeters");
2966 "rna_XrSessionState_viewfinder_capture_dof_distance_get",
2967 "rna_XrSessionState_viewfinder_capture_dof_distance_set",
2970 "Viewfinder Capture Focus Distance",
2971 "Viewfinder capture distance to the focus point for depth of field");
2977 "rna_XrSessionState_viewfinder_capture_dof_fstop_get",
2978 "rna_XrSessionState_viewfinder_capture_dof_fstop_set",
2988 "rna_XrSessionState_viewfinder_playback_show_active_capture_in_space_enabled_get",
2989 "rna_XrSessionState_viewfinder_playback_show_active_capture_in_space_enabled_set");
2991 "Viewfinder Playback Show Active Capture in Space Enabled",
2992 "Display active capture in space when in Viewfinder Playback mode");
2998 "rna_XrSessionState_viewfinder_active_mode_get",
2999 "rna_XrSessionState_viewfinder_active_mode_set",
3008 "rna_XrSessionState_viewfinder_active_action_live_get",
3009 "rna_XrSessionState_viewfinder_active_action_live_set",
3018 "rna_XrSessionState_viewfinder_active_action_playback_get",
3019 "rna_XrSessionState_viewfinder_active_action_playback_set",
3023 prop,
"Viewfinder Playback Action",
"Active viewfinder playback action");
3029 "rna_XrSessionState_viewfinder_active_action_confirm_get",
3030 "rna_XrSessionState_viewfinder_active_action_confirm_set",
3054 prop,
"rna_XrEventData_action_set_get",
"rna_XrEventData_action_set_length",
nullptr);
3060 prop,
"rna_XrEventData_action_get",
"rna_XrEventData_action_length",
nullptr);
3066 prop,
"rna_XrEventData_user_path_get",
"rna_XrEventData_user_path_length",
nullptr);
3072 "rna_XrEventData_user_path_other_get",
3073 "rna_XrEventData_user_path_other_length",
3076 prop,
"User Path Other",
"Other user path, for bimanual actions. E.g. \"/user/hand/right\"");
3095 prop,
"State Other",
"State of the other user path for bimanual actions");
3107 "Controller Location",
3108 "Location of the action's corresponding controller aim in world space");
3115 "Controller Rotation",
3116 "Rotation of the action's corresponding controller aim in world space");
3122 prop,
"rna_XrEventData_controller_location_other_get",
nullptr,
nullptr);
3124 "Controller Location Other",
3125 "Controller aim location of the other user path for bimanual actions");
3131 prop,
"rna_XrEventData_controller_rotation_other_get",
nullptr,
nullptr);
3133 "Controller Rotation Other",
3134 "Controller aim rotation of the other user path for bimanual actions");
#define BLT_I18NCONTEXT_COLOR
#define XR_MAX_USER_PATH_LENGTH
#define XR_MAX_COMPONENT_PATH_LENGTH
#define RNA_TRANSLATION_PREC_DEFAULT
#define ND_XR_DATA_CHANGED
#define BLI_assert_unreachable()
#define SET_FLAG_FROM_TEST(value, test, flag)
XrActionMapBinding * WM_xr_actionmap_binding_new(XrActionMapItem *ami, const char *name, bool replace_existing)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
XrActionMapItem * WM_xr_actionmap_item_find(XrActionMap *actionmap, const char *name)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
char * STRNCPY(char(&dst)[N], const char *src)
ListBaseT< XrActionMap > * WM_xr_actionmaps_get(wmXrRuntimeData *runtime)
short WM_xr_actionmap_active_index_get(const wmXrRuntimeData *runtime)
@ XR_BASE_POSE_SCENE_CAMERA
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
XrActionMap * WM_xr_actionmap_new(wmXrRuntimeData *runtime, const char *name, bool replace_existing)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void WM_xr_actionmap_ensure_unique(wmXrRuntimeData *runtime, XrActionMap *actionmap)
@ XR_CONTROLLER_DRAW_LIGHT
@ XR_CONTROLLER_DRAW_LIGHT_RAY
@ XR_CONTROLLER_DRAW_DARK
@ XR_CONTROLLER_DRAW_DARK_RAY
bool WM_xr_session_state_controller_aim_rotation_get(const wmXrData *xr, uint subaction_idx, float r_rotation[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
void WM_xr_actionmap_item_ensure_unique(XrActionMap *actionmap, XrActionMapItem *ami)
void WM_xr_session_state_nav_location_set(wmXrData *xr, const float location[3])
static const EnumPropertyItem rna_enum_xr_op_flags[]
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
bool WM_xr_session_state_viewfinder_active_action_confirm_get(const wmXrData *xr, eXrViewfinderConfirmAction *r_action)
void WM_xr_session_state_viewfinder_trigger_flash(wmXrData *xr)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
static const EnumPropertyItem rna_enum_xr_action_types[]
void WM_xr_session_state_viewfinder_active_action_live_set(wmXrData *xr, eXrViewfinderLiveAction action)
bool WM_xr_session_exists(const wmXrData *xr)
static void rna_def_xr_session_settings(BlenderRNA *brna)
bool WM_xr_session_state_viewfinder_capture_dof_enabled_get(const wmXrData *xr, bool *r_dof_enabled)
MINLINE void copy_v2_v2(float r[2], const float a[2])
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
@ XR_VIEWFINDER_MODE_CONFIRM
@ XR_VIEWFINDER_MODE_PLAYBACK
@ XR_VIEWFINDER_MODE_LIVE
bool WM_xr_session_state_viewfinder_location_get(const wmXrData *xr, float r_location[3])
void WM_xr_session_state_viewfinder_playback_show_active_capture_in_space_enabled_set(wmXrData *xr, bool enabled)
bool WM_xr_session_state_nav_rotation_get(const wmXrData *xr, float r_rotation[4])
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void WM_xr_session_state_viewfinder_capture_dof_fstop_set(wmXrData *xr, float dof_fstop)
eXrViewfinderPlaybackAction
@ XR_VIEWFINDER_ACTION_PB_BROWSE
@ XR_VIEWFINDER_ACTION_PB_PREVIEW
@ XR_VIEWFINDER_ACTION_PB_DELETE
float normalize_qt(float q[4])
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
@ V3D_OFSDRAW_SHOW_OBJECT_EXTRAS
@ V3D_OFSDRAW_XR_SHOW_PASSTHROUGH
@ V3D_OFSDRAW_SHOW_SELECTION
@ V3D_OFSDRAW_XR_SHOW_CONTROLLERS
@ V3D_OFSDRAW_XR_SHOW_CUSTOM_OVERLAYS
@ V3D_OFSDRAW_SHOW_ANNOTATION
@ V3D_OFSDRAW_SHOW_GRIDFLOOR
void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag, const char *update_func)
static void rna_def_xr_component_paths(BlenderRNA *brna, PropertyRNA *cprop)
size_t WM_operator_bl_idname(char *dst, const char *src)
void WM_xr_actionmap_active_index_set(wmXrRuntimeData *runtime, short idx)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void WM_xr_session_state_viewfinder_capture_dof_enabled_set(wmXrData *xr, bool dof_enabled)
bool WM_xr_session_state_viewer_scale_get(const wmXrData *xr, float *r_scale)
static void rna_def_xr_actionmaps(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA * RNA_def_float_translation(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
bool WM_xr_controller_pose_actions_set(wmXrData *xr, const char *action_set_name, const char *grip_action_name, const char *aim_action_name)
bool WM_xr_session_state_viewfinder_orientation_get(const wmXrData *xr, float r_rotation[4])
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_define_animate_sdna(bool animate)
bool WM_xr_session_state_nav_location_get(const wmXrData *xr, float r_location[3])
XrActionMap * WM_xr_actionmap_find(wmXrRuntimeData *runtime, const char *name)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
bool WM_xr_session_state_viewfinder_capture_dof_fstop_get(const wmXrData *xr, float *r_dof_fstop)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void WM_xr_session_state_viewfinder_capture_dof_distance_set(wmXrData *xr, float dof_distance)
bool WM_xr_session_state_viewfinder_playback_show_active_capture_in_space_enabled_get(const wmXrData *xr, bool *r_enabled)
@ XR_VIEWFINDER_HAND_LEFT
@ XR_VIEWFINDER_HAND_RIGHT
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
bool WM_xr_session_state_viewfinder_capture_dof_distance_get(const wmXrData *xr, float *r_dof_distance)
short WM_xr_actionmap_selected_index_get(const wmXrRuntimeData *runtime)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void WM_xr_actionmap_binding_ensure_unique(XrActionMapItem *ami, XrActionMapBinding *amb)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
bool WM_xr_session_state_controller_grip_location_get(const wmXrData *xr, uint subaction_idx, float r_location[3])
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
static const EnumPropertyItem rna_enum_xr_axis1_flags[]
XrActionMapItem * WM_xr_actionmap_item_new(XrActionMap *actionmap, const char *name, bool replace_existing)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void WM_xr_session_state_viewfinder_active_action_confirm_set(wmXrData *xr, eXrViewfinderConfirmAction action)
int rna_object_type_visibility_icon_get_common(int object_type_exclude_viewport, const int *object_type_exclude_select)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void copy_qt_qt(float q[4], const float a[4])
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
XrActionMap * WM_xr_actionmap_add_copy(wmXrRuntimeData *runtime, XrActionMap *am_src)
BMesh const char void * data
XrActionMapBinding * WM_xr_actionmap_binding_add_copy(XrActionMapItem *ami, XrActionMapBinding *amb_src)
wmWindowManager * CTX_wm_manager(const bContext *C)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void eul_to_quat(float quat[4], const float eul[3])
void WM_xr_haptic_action_stop(wmXrData *xr, const char *action_set_name, const char *action_name, const char *subaction_path)
@ XR_VIEWFINDER_ACTION_LIVE_APERTURE
@ XR_VIEWFINDER_ACTION_LIVE_DOF
@ XR_VIEWFINDER_ACTION_LIVE_LENS
@ XR_VIEWFINDER_ACTION_LIVE_FOCUS
bool WM_xr_session_state_viewfinder_active_action_playback_get(const wmXrData *xr, eXrViewfinderPlaybackAction *r_action)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
bool WM_xr_session_state_viewfinder_active_action_live_get(const wmXrData *xr, eXrViewfinderLiveAction *r_action)
bool WM_xr_action_create(wmXrData *xr, const char *action_set_name, const char *action_name, eXrActionType type, const ListBaseT< XrUserPath > *user_paths, wmOperatorType *ot, IDProperty *op_properties, const char *haptic_name, const int64_t *haptic_duration, const float *haptic_frequency, const float *haptic_amplitude, eXrOpFlag op_flag, eXrActionFlag action_flag, eXrHapticFlag haptic_flag)
static void rna_def_xr_session_state_viewfinder(BlenderRNA *brna)
bool WM_xr_session_state_viewer_pose_location_get(const wmXrData *xr, float r_location[3])
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
bool WM_xr_active_action_set_set(wmXrData *xr, const char *action_set_name, bool delayed)
void WM_xr_session_state_nav_scale_set(wmXrData *xr, float scale)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
static const EnumPropertyItem rna_enum_xr_axis0_flags[]
MINLINE void zero_v3(float r[3])
bool WM_xr_action_state_get(const wmXrData *xr, const char *action_set_name, const char *action_name, const char *subaction_path, wmXrActionState *r_state)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
XrActionMapBinding * WM_xr_actionmap_binding_find(XrActionMapItem *ami, const char *name)
static void rna_def_xr_session_state(BlenderRNA *brna)
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
bool WM_xr_session_state_viewfinder_active_mode_get(const wmXrData *xr, eXrViewfinderMode *r_mode)
static void rna_def_xr_user_paths(BlenderRNA *brna, PropertyRNA *cprop)
bool WM_xr_session_state_controller_aim_location_get(const wmXrData *xr, uint subaction_idx, float r_location[3])
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
bool WM_xr_haptic_action_apply(wmXrData *xr, const char *action_set_name, const char *action_name, const char *subaction_path, const int64_t *duration, const float *frequency, const float *amplitude)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void WM_xr_session_state_viewfinder_active_action_playback_set(wmXrData *xr, eXrViewfinderPlaybackAction action)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
static void rna_def_xr_actionmap_items(BlenderRNA *brna, PropertyRNA *cprop)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void WM_xr_session_state_viewfinder_active_mode_set(wmXrData *xr, eXrViewfinderMode mode)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void WM_xr_actionmap_item_properties_update_ot(XrActionMapItem *ami)
ID_Type GS(const char *name)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
static void rna_def_xr_actionmap(BlenderRNA *brna)
void WM_xr_session_state_nav_rotation_set(wmXrData *xr, const float rotation[4])
wmXrViewfinderState * WM_xr_session_state_viewfinder_handle_get(const wmXrData *xr)
static void rna_def_xr_eventdata(BlenderRNA *brna)
bool WM_xr_session_state_viewer_pose_rotation_get(const wmXrData *xr, float r_rotation[4])
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void WM_xr_actionmap_selected_index_set(wmXrRuntimeData *runtime, short idx)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
bool WM_xr_session_state_viewfinder_capture_lens_focal_get(const wmXrData *xr, float *r_lens_focal)
XrActionMapItem * WM_xr_actionmap_item_add_copy(XrActionMap *actionmap, XrActionMapItem *ami_src)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void WM_xr_session_state_viewfinder_capture_lens_focal_set(wmXrData *xr, float lens_focal)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop, const bool allow_replace)
bool WM_xr_actionmap_remove(wmXrRuntimeData *runtime, XrActionMap *actionmap)
bool WM_xr_action_binding_create(wmXrData *xr, const char *action_set_name, const char *action_name, const char *profile_path, const ListBaseT< XrUserPath > *user_paths, const ListBaseT< XrComponentPath > *component_paths, const float *float_thresholds, const eXrAxisFlag *axis_flags, const wmXrPose *poses)
bool WM_xr_session_state_controller_grip_rotation_get(const wmXrData *xr, uint subaction_idx, float r_rotation[4])
static const EnumPropertyItem rna_enum_xr_haptic_flags[]
bool WM_xr_actionmap_item_remove(XrActionMap *actionmap, XrActionMapItem *ami)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
@ XR_HAPTIC_MATCHUSERPATHS
void WM_xr_session_state_viewfinder_trigger_focus_indicator(wmXrData *xr, bool hit_success)
void RNA_def_property_array(PropertyRNA *prop, int length)
MINLINE void zero_v2(float r[2])
bool WM_xr_actionmap_binding_remove(XrActionMapItem *ami, XrActionMapBinding *amb)
void WM_xr_session_state_viewfinder_reset_view_smoothing(wmXrData *xr)
void RNA_def_xr(BlenderRNA *brna)
void WM_xr_session_base_pose_reset(wmXrData *xr)
static void rna_def_xr_actionmap_bindings(BlenderRNA *brna, PropertyRNA *cprop)
eXrViewfinderConfirmAction
@ XR_VIEWFINDER_ACTION_CF_CANCEL
@ XR_VIEWFINDER_ACTION_CF_CONFIRM
@ XR_SESSION_USE_POSITION_TRACKING
@ XR_SESSION_USE_ABSOLUTE_TRACKING
bool WM_xr_action_set_create(wmXrData *xr, const char *action_set_name)
bool WM_xr_session_state_nav_scale_get(const wmXrData *xr, float *r_scale)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eXrHapticFlag haptic_flag