[Bf-blender-cvs] [aa92c23430f] xr-controller-support: Merge branch 'master' into xr-controller-support
Peter Kim
noreply at git.blender.org
Wed Jul 7 13:04:36 CEST 2021
Commit: aa92c23430fa41e69887384d808e801a755a71a9
Author: Peter Kim
Date: Wed Jul 7 20:04:13 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rBaa92c23430fa41e69887384d808e801a755a71a9
Merge branch 'master' into xr-controller-support
===================================================================
===================================================================
diff --cc intern/ghost/GHOST_C-api.h
index 0895879d7ff,db3f9bd561e..2fb44901409
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@@ -1138,8 -1117,7 +1117,8 @@@ int GHOST_XrSyncActions(GHOST_XrContext
int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_context,
const char *action_set_name,
const char *action_name,
+ const char **subaction_path,
- const GHOST_TInt64 *duration,
+ const int64_t *duration,
const float *frequency,
const float *amplitude);
diff --cc intern/ghost/intern/GHOST_C-api.cpp
index c50bd96f19e,cb409595e50..daac40fdcd7
--- a/intern/ghost/intern/GHOST_C-api.cpp
+++ b/intern/ghost/intern/GHOST_C-api.cpp
@@@ -1054,8 -1024,7 +1024,8 @@@ int GHOST_XrSyncActions(GHOST_XrContext
int GHOST_XrApplyHapticAction(GHOST_XrContextHandle xr_contexthandle,
const char *action_set_name,
const char *action_name,
+ const char **subaction_path,
- const GHOST_TInt64 *duration,
+ const int64_t *duration,
const float *frequency,
const float *amplitude)
{
diff --cc intern/ghost/intern/GHOST_SystemWayland.cpp
index f54a022f249,72c7c525114..7dbae1ff0ea
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@@ -53,6 -52,10 +52,10 @@@
#include <cstring>
-#define BTN_LEFT 0x110
-#define BTN_RIGHT 0x111
-#define BTN_MIDDLE 0x112
++#define BTN_LEFT 0x110
++#define BTN_RIGHT 0x111
++#define BTN_MIDDLE 0x112
+
struct buffer_t {
void *data;
size_t size;
diff --cc intern/ghost/intern/GHOST_XrAction.cpp
index e364ef98c06,9c4f7fbc7d8..e5e40629fac
--- a/intern/ghost/intern/GHOST_XrAction.cpp
+++ b/intern/ghost/intern/GHOST_XrAction.cpp
@@@ -331,8 -329,7 +331,8 @@@ void GHOST_XrAction::updateState(XrSess
void GHOST_XrAction::applyHapticFeedback(XrSession session,
const char *action_name,
+ const char **subaction_path_str,
- const GHOST_TInt64 &duration,
+ const int64_t &duration,
const float &frequency,
const float &litude)
{
diff --cc intern/ghost/intern/GHOST_XrAction.h
index 0e96b32d67b,32445c616bd..acef984e2cb
--- a/intern/ghost/intern/GHOST_XrAction.h
+++ b/intern/ghost/intern/GHOST_XrAction.h
@@@ -91,11 -91,10 +91,11 @@@ class GHOST_XrAction
const XrTime &predicted_display_time);
void applyHapticFeedback(XrSession session,
const char *action_name,
+ const char **subaction_path,
- const GHOST_TInt64 &duration,
+ const int64_t &duration,
const float &frequency,
const float &litude);
- void stopHapticFeedback(XrSession session, const char *action_name);
+ void stopHapticFeedback(XrSession session, const char *action_name, const char **subaction_path);
void *getCustomdata();
void getBindings(std::map<XrPath, std::vector<XrActionSuggestedBinding>> &r_bindings) const;
diff --cc intern/ghost/intern/GHOST_XrSession.cpp
index 43c8bd428b4,35280e77e22..40b91eea51b
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@@ -815,8 -772,7 +815,8 @@@ bool GHOST_XrSession::syncActions(cons
bool GHOST_XrSession::applyHapticAction(const char *action_set_name,
const char *action_name,
+ const char **subaction_path,
- const GHOST_TInt64 &duration,
+ const int64_t &duration,
const float &frequency,
const float &litude)
{
diff --cc intern/ghost/intern/GHOST_XrSession.h
index 921c8ed3ec8,c871b98da46..d2f4f9fa663
--- a/intern/ghost/intern/GHOST_XrSession.h
+++ b/intern/ghost/intern/GHOST_XrSession.h
@@@ -81,19 -81,14 +81,19 @@@ class GHOST_XrSession
bool syncActions(const char *action_set_name = nullptr);
bool applyHapticAction(const char *action_set_name,
const char *action_name,
+ const char **subaction_path,
- const GHOST_TInt64 &duration,
+ const int64_t &duration,
const float &frequency,
const float &litude);
- void stopHapticAction(const char *action_set_name, const char *action_name);
+ void stopHapticAction(const char *action_set_name,
+ const char *action_name,
+ const char **subaction_path);
- /* Custom data (owned by Blender, not GHOST) accessors. */
+ /** Custom data (owned by Blender, not GHOST) accessors. */
void *getActionSetCustomdata(const char *action_set_name);
void *getActionCustomdata(const char *action_set_name, const char *action_name);
+ uint32_t getActionCount(const char *action_set_name);
+ void getActionCustomdatas(const char *action_set_name, void **r_customdatas);
private:
/** Pointer back to context managing this session. Would be nice to avoid, but needed to access
diff --cc source/blender/blenloader/intern/versioning_300.c
index cfbf119409a,f16b73f3c7b..8760e0d55b5
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@@ -468,14 -470,16 +470,24 @@@ void blo_do_versions_300(FileData *fd,
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 7)) {
+ LISTBASE_FOREACH (wmWindowManager *, wm, &bmain->wm) {
+ wm->xr.session_settings.draw_flags |= (V3D_OFSDRAW_SHOW_SELECTION |
+ V3D_OFSDRAW_XR_SHOW_CONTROLLERS |
+ V3D_OFSDRAW_XR_SHOW_CUSTOM_OVERLAYS);
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 8)) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ if (scene->master_collection != NULL) {
+ BLI_strncpy(scene->master_collection->id.name + 2,
+ BKE_SCENE_COLLECTION_NAME,
+ sizeof(scene->master_collection->id.name) - 2);
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
diff --cc source/blender/windowmanager/WM_api.h
index cf9430e1dd8,1f4598d33fe..663b13d6208
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@@ -1061,53 -1016,12 +1062,53 @@@ bool WM_xr_action_state_get(const wmXrD
bool WM_xr_haptic_action_apply(wmXrData *xr,
const char *action_set_name,
const char *action_name,
+ const char **subaction_path,
- const long long *duration,
+ const int64_t *duration,
const float *frequency,
const float *amplitude);
-void WM_xr_haptic_action_stop(wmXrData *xr, const char *action_set_name, const char *action_name);
+void WM_xr_haptic_action_stop(wmXrData *xr,
+ const char *action_set_name,
+ const char *action_name,
+ const char **subaction_path);
+
+/* wm_xr_actionmap.c */
+void WM_xr_actionconfig_init(struct bContext *C);
+void WM_xr_actionconfig_update_tag(XrActionMap *actionmap, XrActionMapItem *ami);
+void WM_xr_actionconfig_update(XrSessionSettings *settings);
+
+XrActionConfig *WM_xr_actionconfig_new(XrSessionSettings *settings,
+ const char *idname,
+ bool user_defined);
+bool WM_xr_actionconfig_remove(XrSessionSettings *settings, XrActionConfig *actionconf);
+XrActionConfig *WM_xr_actionconfig_active_get(XrSessionSettings *settings);
+void WM_xr_actionconfig_active_set(XrSessionSettings *settings, const char *idname);
+
+XrActionMap *WM_xr_actionmap_new(XrActionConfig *actionconf,
+ const char *idname,
+ bool replace_existing);
+void WM_xr_actionmap_ensure_unique(XrActionConfig *actionconf, XrActionMap *actionmap);
+XrActionMap *WM_xr_actionmap_add_copy(XrActionConfig *actionconf, XrActionMap *am_src);
+bool WM_xr_actionmap_remove(XrActionConfig *actionconf, XrActionMap *actionmap);
+XrActionMap *WM_xr_actionmap_list_find(ListBase *lb, const char *idname);
+
+XrActionMapItem *WM_xr_actionmap_item_new(XrActionMap *actionmap,
+ const char *idname,
+ bool replace_existing);
+void WM_xr_actionmap_item_ensure_unique(XrActionMap *actionmap, XrActionMapItem *ami);
+XrActionMapItem *WM_xr_actionmap_item_add_copy(XrActionMap *actionmap, XrActionMapItem *ami_src);
+bool WM_xr_actionmap_item_remove(XrActionMap *actionmap, XrActionMapItem *ami);
+XrActionMapItem *WM_xr_actionmap_item_list_find(ListBase *lb, const char *idname);
+void WM_xr_actionmap_item_properties_update_ot(XrActionMapItem *ami);
#endif /* WITH_XR_OPENXR */
+/* wm.c */
+/* These need to be accessible even when WITH_XR_OPENXR is not defined since actionmaps can be
+ * stored in files. */
+void WM_xr_actionconfig_free(XrActionConfig *actionconf);
+void WM_xr_actionconfig_clear(XrActionConfig *actionconf);
+void WM_xr_actionmap_clear(XrActionMap *actionmap);
+void WM_xr_actionmap_item_properties_free(XrActionMapItem *ami);
+
#ifdef __cplusplus
}
#endif
diff --cc source/blen
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list