RenderingVR: Add support for validating ActionManifest and BindingFile
This issue was created to track additional improvements discussed in the context of !9892 (merged)
Originally posted by @jcfr in !9892 (comment 1326117)
@LucasGandelKitware To follow up on our discussion, I generalized the definition of the action and bindings introducing
complexgestureaction
to be used in place of bothleftgripaction
andrightgripaction
.I also looking into performing some error checking and warning reported to help developer transition but this would be a more involved changed to be consistently done for both
OpenVR
andOpenXR
.Indeed, while the
OpenXR
implementation explicitly handle the parsing of both action and bindings*.json
, theOpenVR
implementation relies onvr::VRInput()->SetActionManifestPath()
that is internally loading the action as well as thedefault_bindings
.This means that to support our own json check in both
OpenVR
andOpenXR
, we would need to add method likeParseActionManifest
andParseDefaultBindingFile
to both, and report warnings in the following cases:
- if either
leftgripaction
orrightgripaction
are found in the manifest, report a warning- if at least one
complexgestureaction
output is specified in the bindings, report an error indicating that two are required.
Originally posted by @LucasGandelKitware in !9892 (comment 1326117)
Thanks @jcfr, the new approach looks much better as it allows for binding any button in order to handle complex gestures. Thank you very much for doing this change.
Going a bit further with the checks you listed, we should also check that the 2
complexgestureaction
output, are using a different path, one is for left and the other is for right. Otherwise we can have 2 buttons of the same controller performing gesture recognition, which makes no sense.
In addition, in your last point I think you meant "if only one" instead of "if at least one".