diff --git a/README.md b/README.md index 33e23cd..7c3e508 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,3 @@ A cross-platform SteamVR overlay application that aims to have many useful tools * Click `add` and then `add selected programs` * You should now be able to start it from steam (favourite it for easier access) -## Usage -At the moment all interacions are done with the trigger buttons, this will use steamvr actions and be configurable in the future. - diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 470d3a7..0000000 --- a/docs/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# WIP documentation - -## Hierarchy - -``` -OverlayManager -- MyOverlayInstance - - [...] - - OverlayViewport - - Container - - MyOverlay - - [...] - - OverlayInteraction - - VR - - [colliders for vr trackers etc] - - Grabbable - - Clickable - - Touchable - -``` - - -## overlay interaction types -Each overlay instance has a OverlayInteraction node, which spawns the different interaction modules depending on what is defined in the OVERLAY_PROPERTIES. - -The modules/interaction types are: -- Grabbable -- Touchable -- Clickable - -These modules connect signals from different places to the interaction manager (`OverlayInteraction`) -Touchable connects collision signals to mouse inputs (potentially logic between to help prevent double presses) -Clickable connects vr button signals to mouse inputs -Grabbable connects vr button signals to grab logic, while telling the interaction manager to pause normal interaction - diff --git a/ovr-utils/Main.tscn b/ovr-utils/Main.tscn new file mode 100644 index 0000000..0f1756c --- /dev/null +++ b/ovr-utils/Main.tscn @@ -0,0 +1,3 @@ +[gd_scene format=2] + +[node name="Main" type="Node"] diff --git a/src/OverlayManager.tscn b/ovr-utils/OverlayManager.tscn similarity index 67% rename from src/OverlayManager.tscn rename to ovr-utils/OverlayManager.tscn index dddbb22..41ddbb3 100644 --- a/src/OverlayManager.tscn +++ b/ovr-utils/OverlayManager.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=4 format=2] +[ext_resource path="res://ui/MainOverlay.tscn" type="PackedScene" id=1] [ext_resource path="res://addons/openvr_overlay/OverlayInstance.tscn" type="PackedScene" id=2] -[ext_resource path="res://OverlaySettingsSync.tscn" type="PackedScene" id=3] [ext_resource path="res://overlay_manager.gd" type="Script" id=4] [node name="OverlayManager" type="Node"] script = ExtResource( 4 ) [node name="MainOverlay" parent="." instance=ExtResource( 2 )] - -[node name="OverlaySettingsSync" parent="MainOverlay" instance=ExtResource( 3 )] +overlay_scene = ExtResource( 1 ) +add_cursor = true diff --git a/src/addons/godot-openvr/CHANGES.md b/ovr-utils/addons/godot-openvr/CHANGES.md similarity index 100% rename from src/addons/godot-openvr/CHANGES.md rename to ovr-utils/addons/godot-openvr/CHANGES.md diff --git a/src/addons/godot-openvr/EditorPlugin.gd b/ovr-utils/addons/godot-openvr/EditorPlugin.gd similarity index 100% rename from src/addons/godot-openvr/EditorPlugin.gd rename to ovr-utils/addons/godot-openvr/EditorPlugin.gd diff --git a/src/addons/godot-openvr/LICENSE b/ovr-utils/addons/godot-openvr/LICENSE similarity index 100% rename from src/addons/godot-openvr/LICENSE rename to ovr-utils/addons/godot-openvr/LICENSE diff --git a/src/addons/godot-openvr/OpenVRAction.gdns b/ovr-utils/addons/godot-openvr/OpenVRAction.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRAction.gdns rename to ovr-utils/addons/godot-openvr/OpenVRAction.gdns diff --git a/src/addons/godot-openvr/OpenVRConfig.gdns b/ovr-utils/addons/godot-openvr/OpenVRConfig.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRConfig.gdns rename to ovr-utils/addons/godot-openvr/OpenVRConfig.gdns diff --git a/src/addons/godot-openvr/OpenVRController.gdns b/ovr-utils/addons/godot-openvr/OpenVRController.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRController.gdns rename to ovr-utils/addons/godot-openvr/OpenVRController.gdns diff --git a/src/addons/godot-openvr/OpenVRExportPlugin.gd b/ovr-utils/addons/godot-openvr/OpenVRExportPlugin.gd similarity index 100% rename from src/addons/godot-openvr/OpenVRExportPlugin.gd rename to ovr-utils/addons/godot-openvr/OpenVRExportPlugin.gd diff --git a/src/addons/godot-openvr/OpenVRHaptics.gdns b/ovr-utils/addons/godot-openvr/OpenVRHaptics.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRHaptics.gdns rename to ovr-utils/addons/godot-openvr/OpenVRHaptics.gdns diff --git a/src/addons/godot-openvr/OpenVROverlay.gdns b/ovr-utils/addons/godot-openvr/OpenVROverlay.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVROverlay.gdns rename to ovr-utils/addons/godot-openvr/OpenVROverlay.gdns diff --git a/src/addons/godot-openvr/OpenVRPose.gdns b/ovr-utils/addons/godot-openvr/OpenVRPose.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRPose.gdns rename to ovr-utils/addons/godot-openvr/OpenVRPose.gdns diff --git a/src/addons/godot-openvr/OpenVRRenderModel.gdns b/ovr-utils/addons/godot-openvr/OpenVRRenderModel.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRRenderModel.gdns rename to ovr-utils/addons/godot-openvr/OpenVRRenderModel.gdns diff --git a/src/addons/godot-openvr/OpenVRSkeleton.gdns b/ovr-utils/addons/godot-openvr/OpenVRSkeleton.gdns similarity index 100% rename from src/addons/godot-openvr/OpenVRSkeleton.gdns rename to ovr-utils/addons/godot-openvr/OpenVRSkeleton.gdns diff --git a/src/addons/godot-openvr/actions/actions.json b/ovr-utils/addons/godot-openvr/actions/actions.json similarity index 100% rename from src/addons/godot-openvr/actions/actions.json rename to ovr-utils/addons/godot-openvr/actions/actions.json diff --git a/src/addons/godot-openvr/actions/bindings_gamepad.json b/ovr-utils/addons/godot-openvr/actions/bindings_gamepad.json similarity index 100% rename from src/addons/godot-openvr/actions/bindings_gamepad.json rename to ovr-utils/addons/godot-openvr/actions/bindings_gamepad.json diff --git a/src/addons/godot-openvr/actions/bindings_generic.json b/ovr-utils/addons/godot-openvr/actions/bindings_generic.json similarity index 100% rename from src/addons/godot-openvr/actions/bindings_generic.json rename to ovr-utils/addons/godot-openvr/actions/bindings_generic.json diff --git a/src/addons/godot-openvr/actions/bindings_holographic_controller.json b/ovr-utils/addons/godot-openvr/actions/bindings_holographic_controller.json similarity index 100% rename from src/addons/godot-openvr/actions/bindings_holographic_controller.json rename to ovr-utils/addons/godot-openvr/actions/bindings_holographic_controller.json diff --git a/src/addons/godot-openvr/actions/bindings_index_controller.json b/ovr-utils/addons/godot-openvr/actions/bindings_index_controller.json similarity index 100% rename from src/addons/godot-openvr/actions/bindings_index_controller.json rename to ovr-utils/addons/godot-openvr/actions/bindings_index_controller.json diff --git a/src/addons/godot-openvr/actions/bindings_oculus_touch.json b/ovr-utils/addons/godot-openvr/actions/bindings_oculus_touch.json similarity index 100% rename from src/addons/godot-openvr/actions/bindings_oculus_touch.json rename to ovr-utils/addons/godot-openvr/actions/bindings_oculus_touch.json diff --git a/src/addons/godot-openvr/actions/bindings_vive_controller.json b/ovr-utils/addons/godot-openvr/actions/bindings_vive_controller.json similarity index 100% rename from src/addons/godot-openvr/actions/bindings_vive_controller.json rename to ovr-utils/addons/godot-openvr/actions/bindings_vive_controller.json diff --git a/src/addons/godot-openvr/bin/LICENSE b/ovr-utils/addons/godot-openvr/bin/LICENSE similarity index 100% rename from src/addons/godot-openvr/bin/LICENSE rename to ovr-utils/addons/godot-openvr/bin/LICENSE diff --git a/ovr-utils/addons/godot-openvr/bin/win64/libgodot_openvr.dll b/ovr-utils/addons/godot-openvr/bin/win64/libgodot_openvr.dll new file mode 100644 index 0000000..fd9562f Binary files /dev/null and b/ovr-utils/addons/godot-openvr/bin/win64/libgodot_openvr.dll differ diff --git a/src/addons/godot-openvr/bin/win64/openvr_api.dll b/ovr-utils/addons/godot-openvr/bin/win64/openvr_api.dll similarity index 100% rename from src/addons/godot-openvr/bin/win64/openvr_api.dll rename to ovr-utils/addons/godot-openvr/bin/win64/openvr_api.dll diff --git a/ovr-utils/addons/godot-openvr/bin/x11/libgodot_openvr.so b/ovr-utils/addons/godot-openvr/bin/x11/libgodot_openvr.so new file mode 100755 index 0000000..5e5ad31 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/bin/x11/libgodot_openvr.so differ diff --git a/ovr-utils/addons/godot-openvr/bin/x11/libopenvr_api.so b/ovr-utils/addons/godot-openvr/bin/x11/libopenvr_api.so new file mode 100644 index 0000000..378fff3 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/bin/x11/libopenvr_api.so differ diff --git a/src/addons/godot-openvr/godot_openvr.gdnlib b/ovr-utils/addons/godot-openvr/godot_openvr.gdnlib similarity index 100% rename from src/addons/godot-openvr/godot_openvr.gdnlib rename to ovr-utils/addons/godot-openvr/godot_openvr.gdnlib diff --git a/src/addons/godot-openvr/icon.png b/ovr-utils/addons/godot-openvr/icon.png similarity index 100% rename from src/addons/godot-openvr/icon.png rename to ovr-utils/addons/godot-openvr/icon.png diff --git a/src/addons/godot-openvr/icon.png.import b/ovr-utils/addons/godot-openvr/icon.png.import similarity index 100% rename from src/addons/godot-openvr/icon.png.import rename to ovr-utils/addons/godot-openvr/icon.png.import diff --git a/ovr-utils/addons/godot-openvr/meshes/README.md b/ovr-utils/addons/godot-openvr/meshes/README.md new file mode 100644 index 0000000..a609eb7 --- /dev/null +++ b/ovr-utils/addons/godot-openvr/meshes/README.md @@ -0,0 +1,5 @@ +The resources here are taken from: `Steam\steamapps\common\SteamVR\resources\rendermodels\vr_glove\` + +To save space in the repository only the slim models are included while the texture maps have been taken from the full versions. + +See `../scenes/ovr_left_hand.tscn` and `../scenes/ovr_right_hand.tscn` for implementation details diff --git a/ovr-utils/addons/godot-openvr/meshes/blinn1.material b/ovr-utils/addons/godot-openvr/meshes/blinn1.material new file mode 100644 index 0000000..6f0a5b0 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/meshes/blinn1.material differ diff --git a/ovr-utils/addons/godot-openvr/meshes/blinn2.material b/ovr-utils/addons/godot-openvr/meshes/blinn2.material new file mode 100644 index 0000000..e82f4ce Binary files /dev/null and b/ovr-utils/addons/godot-openvr/meshes/blinn2.material differ diff --git a/src/addons/gdvk/bin/win64/libgdvk.dll b/ovr-utils/addons/godot-openvr/meshes/hands_albedo.png old mode 100755 new mode 100644 similarity index 64% rename from src/addons/gdvk/bin/win64/libgdvk.dll rename to ovr-utils/addons/godot-openvr/meshes/hands_albedo.png index 9aaa02d..395b83b Binary files a/src/addons/gdvk/bin/win64/libgdvk.dll and b/ovr-utils/addons/godot-openvr/meshes/hands_albedo.png differ diff --git a/ovr-utils/addons/godot-openvr/meshes/hands_albedo.png.import b/ovr-utils/addons/godot-openvr/meshes/hands_albedo.png.import new file mode 100644 index 0000000..ed71632 --- /dev/null +++ b/ovr-utils/addons/godot-openvr/meshes/hands_albedo.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="StreamTexture" +path.s3tc="res://.import/hands_albedo.png-149a10baba7906560a9f9eab8fadf1d8.s3tc.stex" +path.etc2="res://.import/hands_albedo.png-149a10baba7906560a9f9eab8fadf1d8.etc2.stex" +metadata={ +"imported_formats": [ "s3tc", "etc2" ], +"vram_texture": true +} + +[deps] + +source_file="res://addons/godot-openvr/meshes/hands_albedo.png" +dest_files=[ "res://.import/hands_albedo.png-149a10baba7906560a9f9eab8fadf1d8.s3tc.stex", "res://.import/hands_albedo.png-149a10baba7906560a9f9eab8fadf1d8.etc2.stex" ] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=true +flags/filter=true +flags/mipmaps=true +flags/anisotropic=false +flags/srgb=1 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/ovr-utils/addons/godot-openvr/meshes/hands_normal.png b/ovr-utils/addons/godot-openvr/meshes/hands_normal.png new file mode 100644 index 0000000..d708102 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/meshes/hands_normal.png differ diff --git a/ovr-utils/addons/godot-openvr/meshes/hands_normal.png.import b/ovr-utils/addons/godot-openvr/meshes/hands_normal.png.import new file mode 100644 index 0000000..d34f073 --- /dev/null +++ b/ovr-utils/addons/godot-openvr/meshes/hands_normal.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="StreamTexture" +path.s3tc="res://.import/hands_normal.png-eab7a86e959f13e1294e8f67904a8873.s3tc.stex" +path.etc2="res://.import/hands_normal.png-eab7a86e959f13e1294e8f67904a8873.etc2.stex" +metadata={ +"imported_formats": [ "s3tc", "etc2" ], +"vram_texture": true +} + +[deps] + +source_file="res://addons/godot-openvr/meshes/hands_normal.png" +dest_files=[ "res://.import/hands_normal.png-eab7a86e959f13e1294e8f67904a8873.s3tc.stex", "res://.import/hands_normal.png-eab7a86e959f13e1294e8f67904a8873.etc2.stex" ] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=1 +flags/repeat=true +flags/filter=true +flags/mipmaps=true +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/ovr-utils/addons/godot-openvr/meshes/models_hands_vr_glove_vmat.material b/ovr-utils/addons/godot-openvr/meshes/models_hands_vr_glove_vmat.material new file mode 100644 index 0000000..3a870d4 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/meshes/models_hands_vr_glove_vmat.material differ diff --git a/ovr-utils/addons/godot-openvr/meshes/vr_glove_left_model_slim.glb b/ovr-utils/addons/godot-openvr/meshes/vr_glove_left_model_slim.glb new file mode 100644 index 0000000..7214a90 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/meshes/vr_glove_left_model_slim.glb differ diff --git a/ovr-utils/addons/godot-openvr/meshes/vr_glove_left_model_slim.glb.import b/ovr-utils/addons/godot-openvr/meshes/vr_glove_left_model_slim.glb.import new file mode 100644 index 0000000..506e9dd --- /dev/null +++ b/ovr-utils/addons/godot-openvr/meshes/vr_glove_left_model_slim.glb.import @@ -0,0 +1,1063 @@ +[remap] + +importer="scene" +type="PackedScene" +path="res://.import/vr_glove_left_model_slim.glb-8eb4d606fd297e3eb0e89b81fe711f50.scn" + +[deps] + +source_file="res://addons/godot-openvr/meshes/vr_glove_left_model_slim.glb" +dest_files=[ "res://.import/vr_glove_left_model_slim.glb-8eb4d606fd297e3eb0e89b81fe711f50.scn" ] + +[params] + +nodes/root_type="Spatial" +nodes/root_name="Scene Root" +nodes/root_scale=1.0 +nodes/custom_script="" +nodes/storage=0 +materials/location=1 +materials/storage=1 +materials/keep_on_reimport=true +meshes/compress=true +meshes/ensure_tangents=true +meshes/storage=0 +meshes/light_baking=0 +meshes/lightmap_texel_size=0.1 +skins/use_named_skins=true +external_files/store_in_subdir=false +animation/import=true +animation/fps=15 +animation/filter_script="" +animation/storage=false +animation/keep_custom_tracks=false +animation/optimizer/enabled=true +animation/optimizer/max_linear_error=0.05 +animation/optimizer/max_angular_error=0.01 +animation/optimizer/max_angle=22 +animation/optimizer/remove_unused_tracks=true +animation/clips/amount=0 +animation/clip_1/name="" +animation/clip_1/start_frame=0 +animation/clip_1/end_frame=0 +animation/clip_1/loops=false +animation/clip_2/name="" +animation/clip_2/start_frame=0 +animation/clip_2/end_frame=0 +animation/clip_2/loops=false +animation/clip_3/name="" +animation/clip_3/start_frame=0 +animation/clip_3/end_frame=0 +animation/clip_3/loops=false +animation/clip_4/name="" +animation/clip_4/start_frame=0 +animation/clip_4/end_frame=0 +animation/clip_4/loops=false +animation/clip_5/name="" +animation/clip_5/start_frame=0 +animation/clip_5/end_frame=0 +animation/clip_5/loops=false +animation/clip_6/name="" +animation/clip_6/start_frame=0 +animation/clip_6/end_frame=0 +animation/clip_6/loops=false +animation/clip_7/name="" +animation/clip_7/start_frame=0 +animation/clip_7/end_frame=0 +animation/clip_7/loops=false +animation/clip_8/name="" +animation/clip_8/start_frame=0 +animation/clip_8/end_frame=0 +animation/clip_8/loops=false +animation/clip_9/name="" +animation/clip_9/start_frame=0 +animation/clip_9/end_frame=0 +animation/clip_9/loops=false +animation/clip_10/name="" +animation/clip_10/start_frame=0 +animation/clip_10/end_frame=0 +animation/clip_10/loops=false +animation/clip_11/name="" +animation/clip_11/start_frame=0 +animation/clip_11/end_frame=0 +animation/clip_11/loops=false +animation/clip_12/name="" +animation/clip_12/start_frame=0 +animation/clip_12/end_frame=0 +animation/clip_12/loops=false +animation/clip_13/name="" +animation/clip_13/start_frame=0 +animation/clip_13/end_frame=0 +animation/clip_13/loops=false +animation/clip_14/name="" +animation/clip_14/start_frame=0 +animation/clip_14/end_frame=0 +animation/clip_14/loops=false +animation/clip_15/name="" +animation/clip_15/start_frame=0 +animation/clip_15/end_frame=0 +animation/clip_15/loops=false +animation/clip_16/name="" +animation/clip_16/start_frame=0 +animation/clip_16/end_frame=0 +animation/clip_16/loops=false +animation/clip_17/name="" +animation/clip_17/start_frame=0 +animation/clip_17/end_frame=0 +animation/clip_17/loops=false +animation/clip_18/name="" +animation/clip_18/start_frame=0 +animation/clip_18/end_frame=0 +animation/clip_18/loops=false +animation/clip_19/name="" +animation/clip_19/start_frame=0 +animation/clip_19/end_frame=0 +animation/clip_19/loops=false +animation/clip_20/name="" +animation/clip_20/start_frame=0 +animation/clip_20/end_frame=0 +animation/clip_20/loops=false +animation/clip_21/name="" +animation/clip_21/start_frame=0 +animation/clip_21/end_frame=0 +animation/clip_21/loops=false +animation/clip_22/name="" +animation/clip_22/start_frame=0 +animation/clip_22/end_frame=0 +animation/clip_22/loops=false +animation/clip_23/name="" +animation/clip_23/start_frame=0 +animation/clip_23/end_frame=0 +animation/clip_23/loops=false +animation/clip_24/name="" +animation/clip_24/start_frame=0 +animation/clip_24/end_frame=0 +animation/clip_24/loops=false +animation/clip_25/name="" +animation/clip_25/start_frame=0 +animation/clip_25/end_frame=0 +animation/clip_25/loops=false +animation/clip_26/name="" +animation/clip_26/start_frame=0 +animation/clip_26/end_frame=0 +animation/clip_26/loops=false +animation/clip_27/name="" +animation/clip_27/start_frame=0 +animation/clip_27/end_frame=0 +animation/clip_27/loops=false +animation/clip_28/name="" +animation/clip_28/start_frame=0 +animation/clip_28/end_frame=0 +animation/clip_28/loops=false +animation/clip_29/name="" +animation/clip_29/start_frame=0 +animation/clip_29/end_frame=0 +animation/clip_29/loops=false +animation/clip_30/name="" +animation/clip_30/start_frame=0 +animation/clip_30/end_frame=0 +animation/clip_30/loops=false +animation/clip_31/name="" +animation/clip_31/start_frame=0 +animation/clip_31/end_frame=0 +animation/clip_31/loops=false +animation/clip_32/name="" +animation/clip_32/start_frame=0 +animation/clip_32/end_frame=0 +animation/clip_32/loops=false +animation/clip_33/name="" +animation/clip_33/start_frame=0 +animation/clip_33/end_frame=0 +animation/clip_33/loops=false +animation/clip_34/name="" +animation/clip_34/start_frame=0 +animation/clip_34/end_frame=0 +animation/clip_34/loops=false +animation/clip_35/name="" +animation/clip_35/start_frame=0 +animation/clip_35/end_frame=0 +animation/clip_35/loops=false +animation/clip_36/name="" +animation/clip_36/start_frame=0 +animation/clip_36/end_frame=0 +animation/clip_36/loops=false +animation/clip_37/name="" +animation/clip_37/start_frame=0 +animation/clip_37/end_frame=0 +animation/clip_37/loops=false +animation/clip_38/name="" +animation/clip_38/start_frame=0 +animation/clip_38/end_frame=0 +animation/clip_38/loops=false +animation/clip_39/name="" +animation/clip_39/start_frame=0 +animation/clip_39/end_frame=0 +animation/clip_39/loops=false +animation/clip_40/name="" +animation/clip_40/start_frame=0 +animation/clip_40/end_frame=0 +animation/clip_40/loops=false +animation/clip_41/name="" +animation/clip_41/start_frame=0 +animation/clip_41/end_frame=0 +animation/clip_41/loops=false +animation/clip_42/name="" +animation/clip_42/start_frame=0 +animation/clip_42/end_frame=0 +animation/clip_42/loops=false +animation/clip_43/name="" +animation/clip_43/start_frame=0 +animation/clip_43/end_frame=0 +animation/clip_43/loops=false +animation/clip_44/name="" +animation/clip_44/start_frame=0 +animation/clip_44/end_frame=0 +animation/clip_44/loops=false +animation/clip_45/name="" +animation/clip_45/start_frame=0 +animation/clip_45/end_frame=0 +animation/clip_45/loops=false +animation/clip_46/name="" +animation/clip_46/start_frame=0 +animation/clip_46/end_frame=0 +animation/clip_46/loops=false +animation/clip_47/name="" +animation/clip_47/start_frame=0 +animation/clip_47/end_frame=0 +animation/clip_47/loops=false +animation/clip_48/name="" +animation/clip_48/start_frame=0 +animation/clip_48/end_frame=0 +animation/clip_48/loops=false +animation/clip_49/name="" +animation/clip_49/start_frame=0 +animation/clip_49/end_frame=0 +animation/clip_49/loops=false +animation/clip_50/name="" +animation/clip_50/start_frame=0 +animation/clip_50/end_frame=0 +animation/clip_50/loops=false +animation/clip_51/name="" +animation/clip_51/start_frame=0 +animation/clip_51/end_frame=0 +animation/clip_51/loops=false +animation/clip_52/name="" +animation/clip_52/start_frame=0 +animation/clip_52/end_frame=0 +animation/clip_52/loops=false +animation/clip_53/name="" +animation/clip_53/start_frame=0 +animation/clip_53/end_frame=0 +animation/clip_53/loops=false +animation/clip_54/name="" +animation/clip_54/start_frame=0 +animation/clip_54/end_frame=0 +animation/clip_54/loops=false +animation/clip_55/name="" +animation/clip_55/start_frame=0 +animation/clip_55/end_frame=0 +animation/clip_55/loops=false +animation/clip_56/name="" +animation/clip_56/start_frame=0 +animation/clip_56/end_frame=0 +animation/clip_56/loops=false +animation/clip_57/name="" +animation/clip_57/start_frame=0 +animation/clip_57/end_frame=0 +animation/clip_57/loops=false +animation/clip_58/name="" +animation/clip_58/start_frame=0 +animation/clip_58/end_frame=0 +animation/clip_58/loops=false +animation/clip_59/name="" +animation/clip_59/start_frame=0 +animation/clip_59/end_frame=0 +animation/clip_59/loops=false +animation/clip_60/name="" +animation/clip_60/start_frame=0 +animation/clip_60/end_frame=0 +animation/clip_60/loops=false +animation/clip_61/name="" +animation/clip_61/start_frame=0 +animation/clip_61/end_frame=0 +animation/clip_61/loops=false +animation/clip_62/name="" +animation/clip_62/start_frame=0 +animation/clip_62/end_frame=0 +animation/clip_62/loops=false +animation/clip_63/name="" +animation/clip_63/start_frame=0 +animation/clip_63/end_frame=0 +animation/clip_63/loops=false +animation/clip_64/name="" +animation/clip_64/start_frame=0 +animation/clip_64/end_frame=0 +animation/clip_64/loops=false +animation/clip_65/name="" +animation/clip_65/start_frame=0 +animation/clip_65/end_frame=0 +animation/clip_65/loops=false +animation/clip_66/name="" +animation/clip_66/start_frame=0 +animation/clip_66/end_frame=0 +animation/clip_66/loops=false +animation/clip_67/name="" +animation/clip_67/start_frame=0 +animation/clip_67/end_frame=0 +animation/clip_67/loops=false +animation/clip_68/name="" +animation/clip_68/start_frame=0 +animation/clip_68/end_frame=0 +animation/clip_68/loops=false +animation/clip_69/name="" +animation/clip_69/start_frame=0 +animation/clip_69/end_frame=0 +animation/clip_69/loops=false +animation/clip_70/name="" +animation/clip_70/start_frame=0 +animation/clip_70/end_frame=0 +animation/clip_70/loops=false +animation/clip_71/name="" +animation/clip_71/start_frame=0 +animation/clip_71/end_frame=0 +animation/clip_71/loops=false +animation/clip_72/name="" +animation/clip_72/start_frame=0 +animation/clip_72/end_frame=0 +animation/clip_72/loops=false +animation/clip_73/name="" +animation/clip_73/start_frame=0 +animation/clip_73/end_frame=0 +animation/clip_73/loops=false +animation/clip_74/name="" +animation/clip_74/start_frame=0 +animation/clip_74/end_frame=0 +animation/clip_74/loops=false +animation/clip_75/name="" +animation/clip_75/start_frame=0 +animation/clip_75/end_frame=0 +animation/clip_75/loops=false +animation/clip_76/name="" +animation/clip_76/start_frame=0 +animation/clip_76/end_frame=0 +animation/clip_76/loops=false +animation/clip_77/name="" +animation/clip_77/start_frame=0 +animation/clip_77/end_frame=0 +animation/clip_77/loops=false +animation/clip_78/name="" +animation/clip_78/start_frame=0 +animation/clip_78/end_frame=0 +animation/clip_78/loops=false +animation/clip_79/name="" +animation/clip_79/start_frame=0 +animation/clip_79/end_frame=0 +animation/clip_79/loops=false +animation/clip_80/name="" +animation/clip_80/start_frame=0 +animation/clip_80/end_frame=0 +animation/clip_80/loops=false +animation/clip_81/name="" +animation/clip_81/start_frame=0 +animation/clip_81/end_frame=0 +animation/clip_81/loops=false +animation/clip_82/name="" +animation/clip_82/start_frame=0 +animation/clip_82/end_frame=0 +animation/clip_82/loops=false +animation/clip_83/name="" +animation/clip_83/start_frame=0 +animation/clip_83/end_frame=0 +animation/clip_83/loops=false +animation/clip_84/name="" +animation/clip_84/start_frame=0 +animation/clip_84/end_frame=0 +animation/clip_84/loops=false +animation/clip_85/name="" +animation/clip_85/start_frame=0 +animation/clip_85/end_frame=0 +animation/clip_85/loops=false +animation/clip_86/name="" +animation/clip_86/start_frame=0 +animation/clip_86/end_frame=0 +animation/clip_86/loops=false +animation/clip_87/name="" +animation/clip_87/start_frame=0 +animation/clip_87/end_frame=0 +animation/clip_87/loops=false +animation/clip_88/name="" +animation/clip_88/start_frame=0 +animation/clip_88/end_frame=0 +animation/clip_88/loops=false +animation/clip_89/name="" +animation/clip_89/start_frame=0 +animation/clip_89/end_frame=0 +animation/clip_89/loops=false +animation/clip_90/name="" +animation/clip_90/start_frame=0 +animation/clip_90/end_frame=0 +animation/clip_90/loops=false +animation/clip_91/name="" +animation/clip_91/start_frame=0 +animation/clip_91/end_frame=0 +animation/clip_91/loops=false +animation/clip_92/name="" +animation/clip_92/start_frame=0 +animation/clip_92/end_frame=0 +animation/clip_92/loops=false +animation/clip_93/name="" +animation/clip_93/start_frame=0 +animation/clip_93/end_frame=0 +animation/clip_93/loops=false +animation/clip_94/name="" +animation/clip_94/start_frame=0 +animation/clip_94/end_frame=0 +animation/clip_94/loops=false +animation/clip_95/name="" +animation/clip_95/start_frame=0 +animation/clip_95/end_frame=0 +animation/clip_95/loops=false +animation/clip_96/name="" +animation/clip_96/start_frame=0 +animation/clip_96/end_frame=0 +animation/clip_96/loops=false +animation/clip_97/name="" +animation/clip_97/start_frame=0 +animation/clip_97/end_frame=0 +animation/clip_97/loops=false +animation/clip_98/name="" +animation/clip_98/start_frame=0 +animation/clip_98/end_frame=0 +animation/clip_98/loops=false +animation/clip_99/name="" +animation/clip_99/start_frame=0 +animation/clip_99/end_frame=0 +animation/clip_99/loops=false +animation/clip_100/name="" +animation/clip_100/start_frame=0 +animation/clip_100/end_frame=0 +animation/clip_100/loops=false +animation/clip_101/name="" +animation/clip_101/start_frame=0 +animation/clip_101/end_frame=0 +animation/clip_101/loops=false +animation/clip_102/name="" +animation/clip_102/start_frame=0 +animation/clip_102/end_frame=0 +animation/clip_102/loops=false +animation/clip_103/name="" +animation/clip_103/start_frame=0 +animation/clip_103/end_frame=0 +animation/clip_103/loops=false +animation/clip_104/name="" +animation/clip_104/start_frame=0 +animation/clip_104/end_frame=0 +animation/clip_104/loops=false +animation/clip_105/name="" +animation/clip_105/start_frame=0 +animation/clip_105/end_frame=0 +animation/clip_105/loops=false +animation/clip_106/name="" +animation/clip_106/start_frame=0 +animation/clip_106/end_frame=0 +animation/clip_106/loops=false +animation/clip_107/name="" +animation/clip_107/start_frame=0 +animation/clip_107/end_frame=0 +animation/clip_107/loops=false +animation/clip_108/name="" +animation/clip_108/start_frame=0 +animation/clip_108/end_frame=0 +animation/clip_108/loops=false +animation/clip_109/name="" +animation/clip_109/start_frame=0 +animation/clip_109/end_frame=0 +animation/clip_109/loops=false +animation/clip_110/name="" +animation/clip_110/start_frame=0 +animation/clip_110/end_frame=0 +animation/clip_110/loops=false +animation/clip_111/name="" +animation/clip_111/start_frame=0 +animation/clip_111/end_frame=0 +animation/clip_111/loops=false +animation/clip_112/name="" +animation/clip_112/start_frame=0 +animation/clip_112/end_frame=0 +animation/clip_112/loops=false +animation/clip_113/name="" +animation/clip_113/start_frame=0 +animation/clip_113/end_frame=0 +animation/clip_113/loops=false +animation/clip_114/name="" +animation/clip_114/start_frame=0 +animation/clip_114/end_frame=0 +animation/clip_114/loops=false +animation/clip_115/name="" +animation/clip_115/start_frame=0 +animation/clip_115/end_frame=0 +animation/clip_115/loops=false +animation/clip_116/name="" +animation/clip_116/start_frame=0 +animation/clip_116/end_frame=0 +animation/clip_116/loops=false +animation/clip_117/name="" +animation/clip_117/start_frame=0 +animation/clip_117/end_frame=0 +animation/clip_117/loops=false +animation/clip_118/name="" +animation/clip_118/start_frame=0 +animation/clip_118/end_frame=0 +animation/clip_118/loops=false +animation/clip_119/name="" +animation/clip_119/start_frame=0 +animation/clip_119/end_frame=0 +animation/clip_119/loops=false +animation/clip_120/name="" +animation/clip_120/start_frame=0 +animation/clip_120/end_frame=0 +animation/clip_120/loops=false +animation/clip_121/name="" +animation/clip_121/start_frame=0 +animation/clip_121/end_frame=0 +animation/clip_121/loops=false +animation/clip_122/name="" +animation/clip_122/start_frame=0 +animation/clip_122/end_frame=0 +animation/clip_122/loops=false +animation/clip_123/name="" +animation/clip_123/start_frame=0 +animation/clip_123/end_frame=0 +animation/clip_123/loops=false +animation/clip_124/name="" +animation/clip_124/start_frame=0 +animation/clip_124/end_frame=0 +animation/clip_124/loops=false +animation/clip_125/name="" +animation/clip_125/start_frame=0 +animation/clip_125/end_frame=0 +animation/clip_125/loops=false +animation/clip_126/name="" +animation/clip_126/start_frame=0 +animation/clip_126/end_frame=0 +animation/clip_126/loops=false +animation/clip_127/name="" +animation/clip_127/start_frame=0 +animation/clip_127/end_frame=0 +animation/clip_127/loops=false +animation/clip_128/name="" +animation/clip_128/start_frame=0 +animation/clip_128/end_frame=0 +animation/clip_128/loops=false +animation/clip_129/name="" +animation/clip_129/start_frame=0 +animation/clip_129/end_frame=0 +animation/clip_129/loops=false +animation/clip_130/name="" +animation/clip_130/start_frame=0 +animation/clip_130/end_frame=0 +animation/clip_130/loops=false +animation/clip_131/name="" +animation/clip_131/start_frame=0 +animation/clip_131/end_frame=0 +animation/clip_131/loops=false +animation/clip_132/name="" +animation/clip_132/start_frame=0 +animation/clip_132/end_frame=0 +animation/clip_132/loops=false +animation/clip_133/name="" +animation/clip_133/start_frame=0 +animation/clip_133/end_frame=0 +animation/clip_133/loops=false +animation/clip_134/name="" +animation/clip_134/start_frame=0 +animation/clip_134/end_frame=0 +animation/clip_134/loops=false +animation/clip_135/name="" +animation/clip_135/start_frame=0 +animation/clip_135/end_frame=0 +animation/clip_135/loops=false +animation/clip_136/name="" +animation/clip_136/start_frame=0 +animation/clip_136/end_frame=0 +animation/clip_136/loops=false +animation/clip_137/name="" +animation/clip_137/start_frame=0 +animation/clip_137/end_frame=0 +animation/clip_137/loops=false +animation/clip_138/name="" +animation/clip_138/start_frame=0 +animation/clip_138/end_frame=0 +animation/clip_138/loops=false +animation/clip_139/name="" +animation/clip_139/start_frame=0 +animation/clip_139/end_frame=0 +animation/clip_139/loops=false +animation/clip_140/name="" +animation/clip_140/start_frame=0 +animation/clip_140/end_frame=0 +animation/clip_140/loops=false +animation/clip_141/name="" +animation/clip_141/start_frame=0 +animation/clip_141/end_frame=0 +animation/clip_141/loops=false +animation/clip_142/name="" +animation/clip_142/start_frame=0 +animation/clip_142/end_frame=0 +animation/clip_142/loops=false +animation/clip_143/name="" +animation/clip_143/start_frame=0 +animation/clip_143/end_frame=0 +animation/clip_143/loops=false +animation/clip_144/name="" +animation/clip_144/start_frame=0 +animation/clip_144/end_frame=0 +animation/clip_144/loops=false +animation/clip_145/name="" +animation/clip_145/start_frame=0 +animation/clip_145/end_frame=0 +animation/clip_145/loops=false +animation/clip_146/name="" +animation/clip_146/start_frame=0 +animation/clip_146/end_frame=0 +animation/clip_146/loops=false +animation/clip_147/name="" +animation/clip_147/start_frame=0 +animation/clip_147/end_frame=0 +animation/clip_147/loops=false +animation/clip_148/name="" +animation/clip_148/start_frame=0 +animation/clip_148/end_frame=0 +animation/clip_148/loops=false +animation/clip_149/name="" +animation/clip_149/start_frame=0 +animation/clip_149/end_frame=0 +animation/clip_149/loops=false +animation/clip_150/name="" +animation/clip_150/start_frame=0 +animation/clip_150/end_frame=0 +animation/clip_150/loops=false +animation/clip_151/name="" +animation/clip_151/start_frame=0 +animation/clip_151/end_frame=0 +animation/clip_151/loops=false +animation/clip_152/name="" +animation/clip_152/start_frame=0 +animation/clip_152/end_frame=0 +animation/clip_152/loops=false +animation/clip_153/name="" +animation/clip_153/start_frame=0 +animation/clip_153/end_frame=0 +animation/clip_153/loops=false +animation/clip_154/name="" +animation/clip_154/start_frame=0 +animation/clip_154/end_frame=0 +animation/clip_154/loops=false +animation/clip_155/name="" +animation/clip_155/start_frame=0 +animation/clip_155/end_frame=0 +animation/clip_155/loops=false +animation/clip_156/name="" +animation/clip_156/start_frame=0 +animation/clip_156/end_frame=0 +animation/clip_156/loops=false +animation/clip_157/name="" +animation/clip_157/start_frame=0 +animation/clip_157/end_frame=0 +animation/clip_157/loops=false +animation/clip_158/name="" +animation/clip_158/start_frame=0 +animation/clip_158/end_frame=0 +animation/clip_158/loops=false +animation/clip_159/name="" +animation/clip_159/start_frame=0 +animation/clip_159/end_frame=0 +animation/clip_159/loops=false +animation/clip_160/name="" +animation/clip_160/start_frame=0 +animation/clip_160/end_frame=0 +animation/clip_160/loops=false +animation/clip_161/name="" +animation/clip_161/start_frame=0 +animation/clip_161/end_frame=0 +animation/clip_161/loops=false +animation/clip_162/name="" +animation/clip_162/start_frame=0 +animation/clip_162/end_frame=0 +animation/clip_162/loops=false +animation/clip_163/name="" +animation/clip_163/start_frame=0 +animation/clip_163/end_frame=0 +animation/clip_163/loops=false +animation/clip_164/name="" +animation/clip_164/start_frame=0 +animation/clip_164/end_frame=0 +animation/clip_164/loops=false +animation/clip_165/name="" +animation/clip_165/start_frame=0 +animation/clip_165/end_frame=0 +animation/clip_165/loops=false +animation/clip_166/name="" +animation/clip_166/start_frame=0 +animation/clip_166/end_frame=0 +animation/clip_166/loops=false +animation/clip_167/name="" +animation/clip_167/start_frame=0 +animation/clip_167/end_frame=0 +animation/clip_167/loops=false +animation/clip_168/name="" +animation/clip_168/start_frame=0 +animation/clip_168/end_frame=0 +animation/clip_168/loops=false +animation/clip_169/name="" +animation/clip_169/start_frame=0 +animation/clip_169/end_frame=0 +animation/clip_169/loops=false +animation/clip_170/name="" +animation/clip_170/start_frame=0 +animation/clip_170/end_frame=0 +animation/clip_170/loops=false +animation/clip_171/name="" +animation/clip_171/start_frame=0 +animation/clip_171/end_frame=0 +animation/clip_171/loops=false +animation/clip_172/name="" +animation/clip_172/start_frame=0 +animation/clip_172/end_frame=0 +animation/clip_172/loops=false +animation/clip_173/name="" +animation/clip_173/start_frame=0 +animation/clip_173/end_frame=0 +animation/clip_173/loops=false +animation/clip_174/name="" +animation/clip_174/start_frame=0 +animation/clip_174/end_frame=0 +animation/clip_174/loops=false +animation/clip_175/name="" +animation/clip_175/start_frame=0 +animation/clip_175/end_frame=0 +animation/clip_175/loops=false +animation/clip_176/name="" +animation/clip_176/start_frame=0 +animation/clip_176/end_frame=0 +animation/clip_176/loops=false +animation/clip_177/name="" +animation/clip_177/start_frame=0 +animation/clip_177/end_frame=0 +animation/clip_177/loops=false +animation/clip_178/name="" +animation/clip_178/start_frame=0 +animation/clip_178/end_frame=0 +animation/clip_178/loops=false +animation/clip_179/name="" +animation/clip_179/start_frame=0 +animation/clip_179/end_frame=0 +animation/clip_179/loops=false +animation/clip_180/name="" +animation/clip_180/start_frame=0 +animation/clip_180/end_frame=0 +animation/clip_180/loops=false +animation/clip_181/name="" +animation/clip_181/start_frame=0 +animation/clip_181/end_frame=0 +animation/clip_181/loops=false +animation/clip_182/name="" +animation/clip_182/start_frame=0 +animation/clip_182/end_frame=0 +animation/clip_182/loops=false +animation/clip_183/name="" +animation/clip_183/start_frame=0 +animation/clip_183/end_frame=0 +animation/clip_183/loops=false +animation/clip_184/name="" +animation/clip_184/start_frame=0 +animation/clip_184/end_frame=0 +animation/clip_184/loops=false +animation/clip_185/name="" +animation/clip_185/start_frame=0 +animation/clip_185/end_frame=0 +animation/clip_185/loops=false +animation/clip_186/name="" +animation/clip_186/start_frame=0 +animation/clip_186/end_frame=0 +animation/clip_186/loops=false +animation/clip_187/name="" +animation/clip_187/start_frame=0 +animation/clip_187/end_frame=0 +animation/clip_187/loops=false +animation/clip_188/name="" +animation/clip_188/start_frame=0 +animation/clip_188/end_frame=0 +animation/clip_188/loops=false +animation/clip_189/name="" +animation/clip_189/start_frame=0 +animation/clip_189/end_frame=0 +animation/clip_189/loops=false +animation/clip_190/name="" +animation/clip_190/start_frame=0 +animation/clip_190/end_frame=0 +animation/clip_190/loops=false +animation/clip_191/name="" +animation/clip_191/start_frame=0 +animation/clip_191/end_frame=0 +animation/clip_191/loops=false +animation/clip_192/name="" +animation/clip_192/start_frame=0 +animation/clip_192/end_frame=0 +animation/clip_192/loops=false +animation/clip_193/name="" +animation/clip_193/start_frame=0 +animation/clip_193/end_frame=0 +animation/clip_193/loops=false +animation/clip_194/name="" +animation/clip_194/start_frame=0 +animation/clip_194/end_frame=0 +animation/clip_194/loops=false +animation/clip_195/name="" +animation/clip_195/start_frame=0 +animation/clip_195/end_frame=0 +animation/clip_195/loops=false +animation/clip_196/name="" +animation/clip_196/start_frame=0 +animation/clip_196/end_frame=0 +animation/clip_196/loops=false +animation/clip_197/name="" +animation/clip_197/start_frame=0 +animation/clip_197/end_frame=0 +animation/clip_197/loops=false +animation/clip_198/name="" +animation/clip_198/start_frame=0 +animation/clip_198/end_frame=0 +animation/clip_198/loops=false +animation/clip_199/name="" +animation/clip_199/start_frame=0 +animation/clip_199/end_frame=0 +animation/clip_199/loops=false +animation/clip_200/name="" +animation/clip_200/start_frame=0 +animation/clip_200/end_frame=0 +animation/clip_200/loops=false +animation/clip_201/name="" +animation/clip_201/start_frame=0 +animation/clip_201/end_frame=0 +animation/clip_201/loops=false +animation/clip_202/name="" +animation/clip_202/start_frame=0 +animation/clip_202/end_frame=0 +animation/clip_202/loops=false +animation/clip_203/name="" +animation/clip_203/start_frame=0 +animation/clip_203/end_frame=0 +animation/clip_203/loops=false +animation/clip_204/name="" +animation/clip_204/start_frame=0 +animation/clip_204/end_frame=0 +animation/clip_204/loops=false +animation/clip_205/name="" +animation/clip_205/start_frame=0 +animation/clip_205/end_frame=0 +animation/clip_205/loops=false +animation/clip_206/name="" +animation/clip_206/start_frame=0 +animation/clip_206/end_frame=0 +animation/clip_206/loops=false +animation/clip_207/name="" +animation/clip_207/start_frame=0 +animation/clip_207/end_frame=0 +animation/clip_207/loops=false +animation/clip_208/name="" +animation/clip_208/start_frame=0 +animation/clip_208/end_frame=0 +animation/clip_208/loops=false +animation/clip_209/name="" +animation/clip_209/start_frame=0 +animation/clip_209/end_frame=0 +animation/clip_209/loops=false +animation/clip_210/name="" +animation/clip_210/start_frame=0 +animation/clip_210/end_frame=0 +animation/clip_210/loops=false +animation/clip_211/name="" +animation/clip_211/start_frame=0 +animation/clip_211/end_frame=0 +animation/clip_211/loops=false +animation/clip_212/name="" +animation/clip_212/start_frame=0 +animation/clip_212/end_frame=0 +animation/clip_212/loops=false +animation/clip_213/name="" +animation/clip_213/start_frame=0 +animation/clip_213/end_frame=0 +animation/clip_213/loops=false +animation/clip_214/name="" +animation/clip_214/start_frame=0 +animation/clip_214/end_frame=0 +animation/clip_214/loops=false +animation/clip_215/name="" +animation/clip_215/start_frame=0 +animation/clip_215/end_frame=0 +animation/clip_215/loops=false +animation/clip_216/name="" +animation/clip_216/start_frame=0 +animation/clip_216/end_frame=0 +animation/clip_216/loops=false +animation/clip_217/name="" +animation/clip_217/start_frame=0 +animation/clip_217/end_frame=0 +animation/clip_217/loops=false +animation/clip_218/name="" +animation/clip_218/start_frame=0 +animation/clip_218/end_frame=0 +animation/clip_218/loops=false +animation/clip_219/name="" +animation/clip_219/start_frame=0 +animation/clip_219/end_frame=0 +animation/clip_219/loops=false +animation/clip_220/name="" +animation/clip_220/start_frame=0 +animation/clip_220/end_frame=0 +animation/clip_220/loops=false +animation/clip_221/name="" +animation/clip_221/start_frame=0 +animation/clip_221/end_frame=0 +animation/clip_221/loops=false +animation/clip_222/name="" +animation/clip_222/start_frame=0 +animation/clip_222/end_frame=0 +animation/clip_222/loops=false +animation/clip_223/name="" +animation/clip_223/start_frame=0 +animation/clip_223/end_frame=0 +animation/clip_223/loops=false +animation/clip_224/name="" +animation/clip_224/start_frame=0 +animation/clip_224/end_frame=0 +animation/clip_224/loops=false +animation/clip_225/name="" +animation/clip_225/start_frame=0 +animation/clip_225/end_frame=0 +animation/clip_225/loops=false +animation/clip_226/name="" +animation/clip_226/start_frame=0 +animation/clip_226/end_frame=0 +animation/clip_226/loops=false +animation/clip_227/name="" +animation/clip_227/start_frame=0 +animation/clip_227/end_frame=0 +animation/clip_227/loops=false +animation/clip_228/name="" +animation/clip_228/start_frame=0 +animation/clip_228/end_frame=0 +animation/clip_228/loops=false +animation/clip_229/name="" +animation/clip_229/start_frame=0 +animation/clip_229/end_frame=0 +animation/clip_229/loops=false +animation/clip_230/name="" +animation/clip_230/start_frame=0 +animation/clip_230/end_frame=0 +animation/clip_230/loops=false +animation/clip_231/name="" +animation/clip_231/start_frame=0 +animation/clip_231/end_frame=0 +animation/clip_231/loops=false +animation/clip_232/name="" +animation/clip_232/start_frame=0 +animation/clip_232/end_frame=0 +animation/clip_232/loops=false +animation/clip_233/name="" +animation/clip_233/start_frame=0 +animation/clip_233/end_frame=0 +animation/clip_233/loops=false +animation/clip_234/name="" +animation/clip_234/start_frame=0 +animation/clip_234/end_frame=0 +animation/clip_234/loops=false +animation/clip_235/name="" +animation/clip_235/start_frame=0 +animation/clip_235/end_frame=0 +animation/clip_235/loops=false +animation/clip_236/name="" +animation/clip_236/start_frame=0 +animation/clip_236/end_frame=0 +animation/clip_236/loops=false +animation/clip_237/name="" +animation/clip_237/start_frame=0 +animation/clip_237/end_frame=0 +animation/clip_237/loops=false +animation/clip_238/name="" +animation/clip_238/start_frame=0 +animation/clip_238/end_frame=0 +animation/clip_238/loops=false +animation/clip_239/name="" +animation/clip_239/start_frame=0 +animation/clip_239/end_frame=0 +animation/clip_239/loops=false +animation/clip_240/name="" +animation/clip_240/start_frame=0 +animation/clip_240/end_frame=0 +animation/clip_240/loops=false +animation/clip_241/name="" +animation/clip_241/start_frame=0 +animation/clip_241/end_frame=0 +animation/clip_241/loops=false +animation/clip_242/name="" +animation/clip_242/start_frame=0 +animation/clip_242/end_frame=0 +animation/clip_242/loops=false +animation/clip_243/name="" +animation/clip_243/start_frame=0 +animation/clip_243/end_frame=0 +animation/clip_243/loops=false +animation/clip_244/name="" +animation/clip_244/start_frame=0 +animation/clip_244/end_frame=0 +animation/clip_244/loops=false +animation/clip_245/name="" +animation/clip_245/start_frame=0 +animation/clip_245/end_frame=0 +animation/clip_245/loops=false +animation/clip_246/name="" +animation/clip_246/start_frame=0 +animation/clip_246/end_frame=0 +animation/clip_246/loops=false +animation/clip_247/name="" +animation/clip_247/start_frame=0 +animation/clip_247/end_frame=0 +animation/clip_247/loops=false +animation/clip_248/name="" +animation/clip_248/start_frame=0 +animation/clip_248/end_frame=0 +animation/clip_248/loops=false +animation/clip_249/name="" +animation/clip_249/start_frame=0 +animation/clip_249/end_frame=0 +animation/clip_249/loops=false +animation/clip_250/name="" +animation/clip_250/start_frame=0 +animation/clip_250/end_frame=0 +animation/clip_250/loops=false +animation/clip_251/name="" +animation/clip_251/start_frame=0 +animation/clip_251/end_frame=0 +animation/clip_251/loops=false +animation/clip_252/name="" +animation/clip_252/start_frame=0 +animation/clip_252/end_frame=0 +animation/clip_252/loops=false +animation/clip_253/name="" +animation/clip_253/start_frame=0 +animation/clip_253/end_frame=0 +animation/clip_253/loops=false +animation/clip_254/name="" +animation/clip_254/start_frame=0 +animation/clip_254/end_frame=0 +animation/clip_254/loops=false +animation/clip_255/name="" +animation/clip_255/start_frame=0 +animation/clip_255/end_frame=0 +animation/clip_255/loops=false +animation/clip_256/name="" +animation/clip_256/start_frame=0 +animation/clip_256/end_frame=0 +animation/clip_256/loops=false diff --git a/ovr-utils/addons/godot-openvr/meshes/vr_glove_right_model_slim.glb b/ovr-utils/addons/godot-openvr/meshes/vr_glove_right_model_slim.glb new file mode 100644 index 0000000..f58ebc3 Binary files /dev/null and b/ovr-utils/addons/godot-openvr/meshes/vr_glove_right_model_slim.glb differ diff --git a/ovr-utils/addons/godot-openvr/meshes/vr_glove_right_model_slim.glb.import b/ovr-utils/addons/godot-openvr/meshes/vr_glove_right_model_slim.glb.import new file mode 100644 index 0000000..41c0172 --- /dev/null +++ b/ovr-utils/addons/godot-openvr/meshes/vr_glove_right_model_slim.glb.import @@ -0,0 +1,1063 @@ +[remap] + +importer="scene" +type="PackedScene" +path="res://.import/vr_glove_right_model_slim.glb-c6782795f1fc3235de97a5f6c8ba1231.scn" + +[deps] + +source_file="res://addons/godot-openvr/meshes/vr_glove_right_model_slim.glb" +dest_files=[ "res://.import/vr_glove_right_model_slim.glb-c6782795f1fc3235de97a5f6c8ba1231.scn" ] + +[params] + +nodes/root_type="Spatial" +nodes/root_name="Scene Root" +nodes/root_scale=1.0 +nodes/custom_script="" +nodes/storage=0 +materials/location=1 +materials/storage=1 +materials/keep_on_reimport=true +meshes/compress=true +meshes/ensure_tangents=true +meshes/storage=0 +meshes/light_baking=0 +meshes/lightmap_texel_size=0.1 +skins/use_named_skins=true +external_files/store_in_subdir=false +animation/import=true +animation/fps=15 +animation/filter_script="" +animation/storage=false +animation/keep_custom_tracks=false +animation/optimizer/enabled=true +animation/optimizer/max_linear_error=0.05 +animation/optimizer/max_angular_error=0.01 +animation/optimizer/max_angle=22 +animation/optimizer/remove_unused_tracks=true +animation/clips/amount=0 +animation/clip_1/name="" +animation/clip_1/start_frame=0 +animation/clip_1/end_frame=0 +animation/clip_1/loops=false +animation/clip_2/name="" +animation/clip_2/start_frame=0 +animation/clip_2/end_frame=0 +animation/clip_2/loops=false +animation/clip_3/name="" +animation/clip_3/start_frame=0 +animation/clip_3/end_frame=0 +animation/clip_3/loops=false +animation/clip_4/name="" +animation/clip_4/start_frame=0 +animation/clip_4/end_frame=0 +animation/clip_4/loops=false +animation/clip_5/name="" +animation/clip_5/start_frame=0 +animation/clip_5/end_frame=0 +animation/clip_5/loops=false +animation/clip_6/name="" +animation/clip_6/start_frame=0 +animation/clip_6/end_frame=0 +animation/clip_6/loops=false +animation/clip_7/name="" +animation/clip_7/start_frame=0 +animation/clip_7/end_frame=0 +animation/clip_7/loops=false +animation/clip_8/name="" +animation/clip_8/start_frame=0 +animation/clip_8/end_frame=0 +animation/clip_8/loops=false +animation/clip_9/name="" +animation/clip_9/start_frame=0 +animation/clip_9/end_frame=0 +animation/clip_9/loops=false +animation/clip_10/name="" +animation/clip_10/start_frame=0 +animation/clip_10/end_frame=0 +animation/clip_10/loops=false +animation/clip_11/name="" +animation/clip_11/start_frame=0 +animation/clip_11/end_frame=0 +animation/clip_11/loops=false +animation/clip_12/name="" +animation/clip_12/start_frame=0 +animation/clip_12/end_frame=0 +animation/clip_12/loops=false +animation/clip_13/name="" +animation/clip_13/start_frame=0 +animation/clip_13/end_frame=0 +animation/clip_13/loops=false +animation/clip_14/name="" +animation/clip_14/start_frame=0 +animation/clip_14/end_frame=0 +animation/clip_14/loops=false +animation/clip_15/name="" +animation/clip_15/start_frame=0 +animation/clip_15/end_frame=0 +animation/clip_15/loops=false +animation/clip_16/name="" +animation/clip_16/start_frame=0 +animation/clip_16/end_frame=0 +animation/clip_16/loops=false +animation/clip_17/name="" +animation/clip_17/start_frame=0 +animation/clip_17/end_frame=0 +animation/clip_17/loops=false +animation/clip_18/name="" +animation/clip_18/start_frame=0 +animation/clip_18/end_frame=0 +animation/clip_18/loops=false +animation/clip_19/name="" +animation/clip_19/start_frame=0 +animation/clip_19/end_frame=0 +animation/clip_19/loops=false +animation/clip_20/name="" +animation/clip_20/start_frame=0 +animation/clip_20/end_frame=0 +animation/clip_20/loops=false +animation/clip_21/name="" +animation/clip_21/start_frame=0 +animation/clip_21/end_frame=0 +animation/clip_21/loops=false +animation/clip_22/name="" +animation/clip_22/start_frame=0 +animation/clip_22/end_frame=0 +animation/clip_22/loops=false +animation/clip_23/name="" +animation/clip_23/start_frame=0 +animation/clip_23/end_frame=0 +animation/clip_23/loops=false +animation/clip_24/name="" +animation/clip_24/start_frame=0 +animation/clip_24/end_frame=0 +animation/clip_24/loops=false +animation/clip_25/name="" +animation/clip_25/start_frame=0 +animation/clip_25/end_frame=0 +animation/clip_25/loops=false +animation/clip_26/name="" +animation/clip_26/start_frame=0 +animation/clip_26/end_frame=0 +animation/clip_26/loops=false +animation/clip_27/name="" +animation/clip_27/start_frame=0 +animation/clip_27/end_frame=0 +animation/clip_27/loops=false +animation/clip_28/name="" +animation/clip_28/start_frame=0 +animation/clip_28/end_frame=0 +animation/clip_28/loops=false +animation/clip_29/name="" +animation/clip_29/start_frame=0 +animation/clip_29/end_frame=0 +animation/clip_29/loops=false +animation/clip_30/name="" +animation/clip_30/start_frame=0 +animation/clip_30/end_frame=0 +animation/clip_30/loops=false +animation/clip_31/name="" +animation/clip_31/start_frame=0 +animation/clip_31/end_frame=0 +animation/clip_31/loops=false +animation/clip_32/name="" +animation/clip_32/start_frame=0 +animation/clip_32/end_frame=0 +animation/clip_32/loops=false +animation/clip_33/name="" +animation/clip_33/start_frame=0 +animation/clip_33/end_frame=0 +animation/clip_33/loops=false +animation/clip_34/name="" +animation/clip_34/start_frame=0 +animation/clip_34/end_frame=0 +animation/clip_34/loops=false +animation/clip_35/name="" +animation/clip_35/start_frame=0 +animation/clip_35/end_frame=0 +animation/clip_35/loops=false +animation/clip_36/name="" +animation/clip_36/start_frame=0 +animation/clip_36/end_frame=0 +animation/clip_36/loops=false +animation/clip_37/name="" +animation/clip_37/start_frame=0 +animation/clip_37/end_frame=0 +animation/clip_37/loops=false +animation/clip_38/name="" +animation/clip_38/start_frame=0 +animation/clip_38/end_frame=0 +animation/clip_38/loops=false +animation/clip_39/name="" +animation/clip_39/start_frame=0 +animation/clip_39/end_frame=0 +animation/clip_39/loops=false +animation/clip_40/name="" +animation/clip_40/start_frame=0 +animation/clip_40/end_frame=0 +animation/clip_40/loops=false +animation/clip_41/name="" +animation/clip_41/start_frame=0 +animation/clip_41/end_frame=0 +animation/clip_41/loops=false +animation/clip_42/name="" +animation/clip_42/start_frame=0 +animation/clip_42/end_frame=0 +animation/clip_42/loops=false +animation/clip_43/name="" +animation/clip_43/start_frame=0 +animation/clip_43/end_frame=0 +animation/clip_43/loops=false +animation/clip_44/name="" +animation/clip_44/start_frame=0 +animation/clip_44/end_frame=0 +animation/clip_44/loops=false +animation/clip_45/name="" +animation/clip_45/start_frame=0 +animation/clip_45/end_frame=0 +animation/clip_45/loops=false +animation/clip_46/name="" +animation/clip_46/start_frame=0 +animation/clip_46/end_frame=0 +animation/clip_46/loops=false +animation/clip_47/name="" +animation/clip_47/start_frame=0 +animation/clip_47/end_frame=0 +animation/clip_47/loops=false +animation/clip_48/name="" +animation/clip_48/start_frame=0 +animation/clip_48/end_frame=0 +animation/clip_48/loops=false +animation/clip_49/name="" +animation/clip_49/start_frame=0 +animation/clip_49/end_frame=0 +animation/clip_49/loops=false +animation/clip_50/name="" +animation/clip_50/start_frame=0 +animation/clip_50/end_frame=0 +animation/clip_50/loops=false +animation/clip_51/name="" +animation/clip_51/start_frame=0 +animation/clip_51/end_frame=0 +animation/clip_51/loops=false +animation/clip_52/name="" +animation/clip_52/start_frame=0 +animation/clip_52/end_frame=0 +animation/clip_52/loops=false +animation/clip_53/name="" +animation/clip_53/start_frame=0 +animation/clip_53/end_frame=0 +animation/clip_53/loops=false +animation/clip_54/name="" +animation/clip_54/start_frame=0 +animation/clip_54/end_frame=0 +animation/clip_54/loops=false +animation/clip_55/name="" +animation/clip_55/start_frame=0 +animation/clip_55/end_frame=0 +animation/clip_55/loops=false +animation/clip_56/name="" +animation/clip_56/start_frame=0 +animation/clip_56/end_frame=0 +animation/clip_56/loops=false +animation/clip_57/name="" +animation/clip_57/start_frame=0 +animation/clip_57/end_frame=0 +animation/clip_57/loops=false +animation/clip_58/name="" +animation/clip_58/start_frame=0 +animation/clip_58/end_frame=0 +animation/clip_58/loops=false +animation/clip_59/name="" +animation/clip_59/start_frame=0 +animation/clip_59/end_frame=0 +animation/clip_59/loops=false +animation/clip_60/name="" +animation/clip_60/start_frame=0 +animation/clip_60/end_frame=0 +animation/clip_60/loops=false +animation/clip_61/name="" +animation/clip_61/start_frame=0 +animation/clip_61/end_frame=0 +animation/clip_61/loops=false +animation/clip_62/name="" +animation/clip_62/start_frame=0 +animation/clip_62/end_frame=0 +animation/clip_62/loops=false +animation/clip_63/name="" +animation/clip_63/start_frame=0 +animation/clip_63/end_frame=0 +animation/clip_63/loops=false +animation/clip_64/name="" +animation/clip_64/start_frame=0 +animation/clip_64/end_frame=0 +animation/clip_64/loops=false +animation/clip_65/name="" +animation/clip_65/start_frame=0 +animation/clip_65/end_frame=0 +animation/clip_65/loops=false +animation/clip_66/name="" +animation/clip_66/start_frame=0 +animation/clip_66/end_frame=0 +animation/clip_66/loops=false +animation/clip_67/name="" +animation/clip_67/start_frame=0 +animation/clip_67/end_frame=0 +animation/clip_67/loops=false +animation/clip_68/name="" +animation/clip_68/start_frame=0 +animation/clip_68/end_frame=0 +animation/clip_68/loops=false +animation/clip_69/name="" +animation/clip_69/start_frame=0 +animation/clip_69/end_frame=0 +animation/clip_69/loops=false +animation/clip_70/name="" +animation/clip_70/start_frame=0 +animation/clip_70/end_frame=0 +animation/clip_70/loops=false +animation/clip_71/name="" +animation/clip_71/start_frame=0 +animation/clip_71/end_frame=0 +animation/clip_71/loops=false +animation/clip_72/name="" +animation/clip_72/start_frame=0 +animation/clip_72/end_frame=0 +animation/clip_72/loops=false +animation/clip_73/name="" +animation/clip_73/start_frame=0 +animation/clip_73/end_frame=0 +animation/clip_73/loops=false +animation/clip_74/name="" +animation/clip_74/start_frame=0 +animation/clip_74/end_frame=0 +animation/clip_74/loops=false +animation/clip_75/name="" +animation/clip_75/start_frame=0 +animation/clip_75/end_frame=0 +animation/clip_75/loops=false +animation/clip_76/name="" +animation/clip_76/start_frame=0 +animation/clip_76/end_frame=0 +animation/clip_76/loops=false +animation/clip_77/name="" +animation/clip_77/start_frame=0 +animation/clip_77/end_frame=0 +animation/clip_77/loops=false +animation/clip_78/name="" +animation/clip_78/start_frame=0 +animation/clip_78/end_frame=0 +animation/clip_78/loops=false +animation/clip_79/name="" +animation/clip_79/start_frame=0 +animation/clip_79/end_frame=0 +animation/clip_79/loops=false +animation/clip_80/name="" +animation/clip_80/start_frame=0 +animation/clip_80/end_frame=0 +animation/clip_80/loops=false +animation/clip_81/name="" +animation/clip_81/start_frame=0 +animation/clip_81/end_frame=0 +animation/clip_81/loops=false +animation/clip_82/name="" +animation/clip_82/start_frame=0 +animation/clip_82/end_frame=0 +animation/clip_82/loops=false +animation/clip_83/name="" +animation/clip_83/start_frame=0 +animation/clip_83/end_frame=0 +animation/clip_83/loops=false +animation/clip_84/name="" +animation/clip_84/start_frame=0 +animation/clip_84/end_frame=0 +animation/clip_84/loops=false +animation/clip_85/name="" +animation/clip_85/start_frame=0 +animation/clip_85/end_frame=0 +animation/clip_85/loops=false +animation/clip_86/name="" +animation/clip_86/start_frame=0 +animation/clip_86/end_frame=0 +animation/clip_86/loops=false +animation/clip_87/name="" +animation/clip_87/start_frame=0 +animation/clip_87/end_frame=0 +animation/clip_87/loops=false +animation/clip_88/name="" +animation/clip_88/start_frame=0 +animation/clip_88/end_frame=0 +animation/clip_88/loops=false +animation/clip_89/name="" +animation/clip_89/start_frame=0 +animation/clip_89/end_frame=0 +animation/clip_89/loops=false +animation/clip_90/name="" +animation/clip_90/start_frame=0 +animation/clip_90/end_frame=0 +animation/clip_90/loops=false +animation/clip_91/name="" +animation/clip_91/start_frame=0 +animation/clip_91/end_frame=0 +animation/clip_91/loops=false +animation/clip_92/name="" +animation/clip_92/start_frame=0 +animation/clip_92/end_frame=0 +animation/clip_92/loops=false +animation/clip_93/name="" +animation/clip_93/start_frame=0 +animation/clip_93/end_frame=0 +animation/clip_93/loops=false +animation/clip_94/name="" +animation/clip_94/start_frame=0 +animation/clip_94/end_frame=0 +animation/clip_94/loops=false +animation/clip_95/name="" +animation/clip_95/start_frame=0 +animation/clip_95/end_frame=0 +animation/clip_95/loops=false +animation/clip_96/name="" +animation/clip_96/start_frame=0 +animation/clip_96/end_frame=0 +animation/clip_96/loops=false +animation/clip_97/name="" +animation/clip_97/start_frame=0 +animation/clip_97/end_frame=0 +animation/clip_97/loops=false +animation/clip_98/name="" +animation/clip_98/start_frame=0 +animation/clip_98/end_frame=0 +animation/clip_98/loops=false +animation/clip_99/name="" +animation/clip_99/start_frame=0 +animation/clip_99/end_frame=0 +animation/clip_99/loops=false +animation/clip_100/name="" +animation/clip_100/start_frame=0 +animation/clip_100/end_frame=0 +animation/clip_100/loops=false +animation/clip_101/name="" +animation/clip_101/start_frame=0 +animation/clip_101/end_frame=0 +animation/clip_101/loops=false +animation/clip_102/name="" +animation/clip_102/start_frame=0 +animation/clip_102/end_frame=0 +animation/clip_102/loops=false +animation/clip_103/name="" +animation/clip_103/start_frame=0 +animation/clip_103/end_frame=0 +animation/clip_103/loops=false +animation/clip_104/name="" +animation/clip_104/start_frame=0 +animation/clip_104/end_frame=0 +animation/clip_104/loops=false +animation/clip_105/name="" +animation/clip_105/start_frame=0 +animation/clip_105/end_frame=0 +animation/clip_105/loops=false +animation/clip_106/name="" +animation/clip_106/start_frame=0 +animation/clip_106/end_frame=0 +animation/clip_106/loops=false +animation/clip_107/name="" +animation/clip_107/start_frame=0 +animation/clip_107/end_frame=0 +animation/clip_107/loops=false +animation/clip_108/name="" +animation/clip_108/start_frame=0 +animation/clip_108/end_frame=0 +animation/clip_108/loops=false +animation/clip_109/name="" +animation/clip_109/start_frame=0 +animation/clip_109/end_frame=0 +animation/clip_109/loops=false +animation/clip_110/name="" +animation/clip_110/start_frame=0 +animation/clip_110/end_frame=0 +animation/clip_110/loops=false +animation/clip_111/name="" +animation/clip_111/start_frame=0 +animation/clip_111/end_frame=0 +animation/clip_111/loops=false +animation/clip_112/name="" +animation/clip_112/start_frame=0 +animation/clip_112/end_frame=0 +animation/clip_112/loops=false +animation/clip_113/name="" +animation/clip_113/start_frame=0 +animation/clip_113/end_frame=0 +animation/clip_113/loops=false +animation/clip_114/name="" +animation/clip_114/start_frame=0 +animation/clip_114/end_frame=0 +animation/clip_114/loops=false +animation/clip_115/name="" +animation/clip_115/start_frame=0 +animation/clip_115/end_frame=0 +animation/clip_115/loops=false +animation/clip_116/name="" +animation/clip_116/start_frame=0 +animation/clip_116/end_frame=0 +animation/clip_116/loops=false +animation/clip_117/name="" +animation/clip_117/start_frame=0 +animation/clip_117/end_frame=0 +animation/clip_117/loops=false +animation/clip_118/name="" +animation/clip_118/start_frame=0 +animation/clip_118/end_frame=0 +animation/clip_118/loops=false +animation/clip_119/name="" +animation/clip_119/start_frame=0 +animation/clip_119/end_frame=0 +animation/clip_119/loops=false +animation/clip_120/name="" +animation/clip_120/start_frame=0 +animation/clip_120/end_frame=0 +animation/clip_120/loops=false +animation/clip_121/name="" +animation/clip_121/start_frame=0 +animation/clip_121/end_frame=0 +animation/clip_121/loops=false +animation/clip_122/name="" +animation/clip_122/start_frame=0 +animation/clip_122/end_frame=0 +animation/clip_122/loops=false +animation/clip_123/name="" +animation/clip_123/start_frame=0 +animation/clip_123/end_frame=0 +animation/clip_123/loops=false +animation/clip_124/name="" +animation/clip_124/start_frame=0 +animation/clip_124/end_frame=0 +animation/clip_124/loops=false +animation/clip_125/name="" +animation/clip_125/start_frame=0 +animation/clip_125/end_frame=0 +animation/clip_125/loops=false +animation/clip_126/name="" +animation/clip_126/start_frame=0 +animation/clip_126/end_frame=0 +animation/clip_126/loops=false +animation/clip_127/name="" +animation/clip_127/start_frame=0 +animation/clip_127/end_frame=0 +animation/clip_127/loops=false +animation/clip_128/name="" +animation/clip_128/start_frame=0 +animation/clip_128/end_frame=0 +animation/clip_128/loops=false +animation/clip_129/name="" +animation/clip_129/start_frame=0 +animation/clip_129/end_frame=0 +animation/clip_129/loops=false +animation/clip_130/name="" +animation/clip_130/start_frame=0 +animation/clip_130/end_frame=0 +animation/clip_130/loops=false +animation/clip_131/name="" +animation/clip_131/start_frame=0 +animation/clip_131/end_frame=0 +animation/clip_131/loops=false +animation/clip_132/name="" +animation/clip_132/start_frame=0 +animation/clip_132/end_frame=0 +animation/clip_132/loops=false +animation/clip_133/name="" +animation/clip_133/start_frame=0 +animation/clip_133/end_frame=0 +animation/clip_133/loops=false +animation/clip_134/name="" +animation/clip_134/start_frame=0 +animation/clip_134/end_frame=0 +animation/clip_134/loops=false +animation/clip_135/name="" +animation/clip_135/start_frame=0 +animation/clip_135/end_frame=0 +animation/clip_135/loops=false +animation/clip_136/name="" +animation/clip_136/start_frame=0 +animation/clip_136/end_frame=0 +animation/clip_136/loops=false +animation/clip_137/name="" +animation/clip_137/start_frame=0 +animation/clip_137/end_frame=0 +animation/clip_137/loops=false +animation/clip_138/name="" +animation/clip_138/start_frame=0 +animation/clip_138/end_frame=0 +animation/clip_138/loops=false +animation/clip_139/name="" +animation/clip_139/start_frame=0 +animation/clip_139/end_frame=0 +animation/clip_139/loops=false +animation/clip_140/name="" +animation/clip_140/start_frame=0 +animation/clip_140/end_frame=0 +animation/clip_140/loops=false +animation/clip_141/name="" +animation/clip_141/start_frame=0 +animation/clip_141/end_frame=0 +animation/clip_141/loops=false +animation/clip_142/name="" +animation/clip_142/start_frame=0 +animation/clip_142/end_frame=0 +animation/clip_142/loops=false +animation/clip_143/name="" +animation/clip_143/start_frame=0 +animation/clip_143/end_frame=0 +animation/clip_143/loops=false +animation/clip_144/name="" +animation/clip_144/start_frame=0 +animation/clip_144/end_frame=0 +animation/clip_144/loops=false +animation/clip_145/name="" +animation/clip_145/start_frame=0 +animation/clip_145/end_frame=0 +animation/clip_145/loops=false +animation/clip_146/name="" +animation/clip_146/start_frame=0 +animation/clip_146/end_frame=0 +animation/clip_146/loops=false +animation/clip_147/name="" +animation/clip_147/start_frame=0 +animation/clip_147/end_frame=0 +animation/clip_147/loops=false +animation/clip_148/name="" +animation/clip_148/start_frame=0 +animation/clip_148/end_frame=0 +animation/clip_148/loops=false +animation/clip_149/name="" +animation/clip_149/start_frame=0 +animation/clip_149/end_frame=0 +animation/clip_149/loops=false +animation/clip_150/name="" +animation/clip_150/start_frame=0 +animation/clip_150/end_frame=0 +animation/clip_150/loops=false +animation/clip_151/name="" +animation/clip_151/start_frame=0 +animation/clip_151/end_frame=0 +animation/clip_151/loops=false +animation/clip_152/name="" +animation/clip_152/start_frame=0 +animation/clip_152/end_frame=0 +animation/clip_152/loops=false +animation/clip_153/name="" +animation/clip_153/start_frame=0 +animation/clip_153/end_frame=0 +animation/clip_153/loops=false +animation/clip_154/name="" +animation/clip_154/start_frame=0 +animation/clip_154/end_frame=0 +animation/clip_154/loops=false +animation/clip_155/name="" +animation/clip_155/start_frame=0 +animation/clip_155/end_frame=0 +animation/clip_155/loops=false +animation/clip_156/name="" +animation/clip_156/start_frame=0 +animation/clip_156/end_frame=0 +animation/clip_156/loops=false +animation/clip_157/name="" +animation/clip_157/start_frame=0 +animation/clip_157/end_frame=0 +animation/clip_157/loops=false +animation/clip_158/name="" +animation/clip_158/start_frame=0 +animation/clip_158/end_frame=0 +animation/clip_158/loops=false +animation/clip_159/name="" +animation/clip_159/start_frame=0 +animation/clip_159/end_frame=0 +animation/clip_159/loops=false +animation/clip_160/name="" +animation/clip_160/start_frame=0 +animation/clip_160/end_frame=0 +animation/clip_160/loops=false +animation/clip_161/name="" +animation/clip_161/start_frame=0 +animation/clip_161/end_frame=0 +animation/clip_161/loops=false +animation/clip_162/name="" +animation/clip_162/start_frame=0 +animation/clip_162/end_frame=0 +animation/clip_162/loops=false +animation/clip_163/name="" +animation/clip_163/start_frame=0 +animation/clip_163/end_frame=0 +animation/clip_163/loops=false +animation/clip_164/name="" +animation/clip_164/start_frame=0 +animation/clip_164/end_frame=0 +animation/clip_164/loops=false +animation/clip_165/name="" +animation/clip_165/start_frame=0 +animation/clip_165/end_frame=0 +animation/clip_165/loops=false +animation/clip_166/name="" +animation/clip_166/start_frame=0 +animation/clip_166/end_frame=0 +animation/clip_166/loops=false +animation/clip_167/name="" +animation/clip_167/start_frame=0 +animation/clip_167/end_frame=0 +animation/clip_167/loops=false +animation/clip_168/name="" +animation/clip_168/start_frame=0 +animation/clip_168/end_frame=0 +animation/clip_168/loops=false +animation/clip_169/name="" +animation/clip_169/start_frame=0 +animation/clip_169/end_frame=0 +animation/clip_169/loops=false +animation/clip_170/name="" +animation/clip_170/start_frame=0 +animation/clip_170/end_frame=0 +animation/clip_170/loops=false +animation/clip_171/name="" +animation/clip_171/start_frame=0 +animation/clip_171/end_frame=0 +animation/clip_171/loops=false +animation/clip_172/name="" +animation/clip_172/start_frame=0 +animation/clip_172/end_frame=0 +animation/clip_172/loops=false +animation/clip_173/name="" +animation/clip_173/start_frame=0 +animation/clip_173/end_frame=0 +animation/clip_173/loops=false +animation/clip_174/name="" +animation/clip_174/start_frame=0 +animation/clip_174/end_frame=0 +animation/clip_174/loops=false +animation/clip_175/name="" +animation/clip_175/start_frame=0 +animation/clip_175/end_frame=0 +animation/clip_175/loops=false +animation/clip_176/name="" +animation/clip_176/start_frame=0 +animation/clip_176/end_frame=0 +animation/clip_176/loops=false +animation/clip_177/name="" +animation/clip_177/start_frame=0 +animation/clip_177/end_frame=0 +animation/clip_177/loops=false +animation/clip_178/name="" +animation/clip_178/start_frame=0 +animation/clip_178/end_frame=0 +animation/clip_178/loops=false +animation/clip_179/name="" +animation/clip_179/start_frame=0 +animation/clip_179/end_frame=0 +animation/clip_179/loops=false +animation/clip_180/name="" +animation/clip_180/start_frame=0 +animation/clip_180/end_frame=0 +animation/clip_180/loops=false +animation/clip_181/name="" +animation/clip_181/start_frame=0 +animation/clip_181/end_frame=0 +animation/clip_181/loops=false +animation/clip_182/name="" +animation/clip_182/start_frame=0 +animation/clip_182/end_frame=0 +animation/clip_182/loops=false +animation/clip_183/name="" +animation/clip_183/start_frame=0 +animation/clip_183/end_frame=0 +animation/clip_183/loops=false +animation/clip_184/name="" +animation/clip_184/start_frame=0 +animation/clip_184/end_frame=0 +animation/clip_184/loops=false +animation/clip_185/name="" +animation/clip_185/start_frame=0 +animation/clip_185/end_frame=0 +animation/clip_185/loops=false +animation/clip_186/name="" +animation/clip_186/start_frame=0 +animation/clip_186/end_frame=0 +animation/clip_186/loops=false +animation/clip_187/name="" +animation/clip_187/start_frame=0 +animation/clip_187/end_frame=0 +animation/clip_187/loops=false +animation/clip_188/name="" +animation/clip_188/start_frame=0 +animation/clip_188/end_frame=0 +animation/clip_188/loops=false +animation/clip_189/name="" +animation/clip_189/start_frame=0 +animation/clip_189/end_frame=0 +animation/clip_189/loops=false +animation/clip_190/name="" +animation/clip_190/start_frame=0 +animation/clip_190/end_frame=0 +animation/clip_190/loops=false +animation/clip_191/name="" +animation/clip_191/start_frame=0 +animation/clip_191/end_frame=0 +animation/clip_191/loops=false +animation/clip_192/name="" +animation/clip_192/start_frame=0 +animation/clip_192/end_frame=0 +animation/clip_192/loops=false +animation/clip_193/name="" +animation/clip_193/start_frame=0 +animation/clip_193/end_frame=0 +animation/clip_193/loops=false +animation/clip_194/name="" +animation/clip_194/start_frame=0 +animation/clip_194/end_frame=0 +animation/clip_194/loops=false +animation/clip_195/name="" +animation/clip_195/start_frame=0 +animation/clip_195/end_frame=0 +animation/clip_195/loops=false +animation/clip_196/name="" +animation/clip_196/start_frame=0 +animation/clip_196/end_frame=0 +animation/clip_196/loops=false +animation/clip_197/name="" +animation/clip_197/start_frame=0 +animation/clip_197/end_frame=0 +animation/clip_197/loops=false +animation/clip_198/name="" +animation/clip_198/start_frame=0 +animation/clip_198/end_frame=0 +animation/clip_198/loops=false +animation/clip_199/name="" +animation/clip_199/start_frame=0 +animation/clip_199/end_frame=0 +animation/clip_199/loops=false +animation/clip_200/name="" +animation/clip_200/start_frame=0 +animation/clip_200/end_frame=0 +animation/clip_200/loops=false +animation/clip_201/name="" +animation/clip_201/start_frame=0 +animation/clip_201/end_frame=0 +animation/clip_201/loops=false +animation/clip_202/name="" +animation/clip_202/start_frame=0 +animation/clip_202/end_frame=0 +animation/clip_202/loops=false +animation/clip_203/name="" +animation/clip_203/start_frame=0 +animation/clip_203/end_frame=0 +animation/clip_203/loops=false +animation/clip_204/name="" +animation/clip_204/start_frame=0 +animation/clip_204/end_frame=0 +animation/clip_204/loops=false +animation/clip_205/name="" +animation/clip_205/start_frame=0 +animation/clip_205/end_frame=0 +animation/clip_205/loops=false +animation/clip_206/name="" +animation/clip_206/start_frame=0 +animation/clip_206/end_frame=0 +animation/clip_206/loops=false +animation/clip_207/name="" +animation/clip_207/start_frame=0 +animation/clip_207/end_frame=0 +animation/clip_207/loops=false +animation/clip_208/name="" +animation/clip_208/start_frame=0 +animation/clip_208/end_frame=0 +animation/clip_208/loops=false +animation/clip_209/name="" +animation/clip_209/start_frame=0 +animation/clip_209/end_frame=0 +animation/clip_209/loops=false +animation/clip_210/name="" +animation/clip_210/start_frame=0 +animation/clip_210/end_frame=0 +animation/clip_210/loops=false +animation/clip_211/name="" +animation/clip_211/start_frame=0 +animation/clip_211/end_frame=0 +animation/clip_211/loops=false +animation/clip_212/name="" +animation/clip_212/start_frame=0 +animation/clip_212/end_frame=0 +animation/clip_212/loops=false +animation/clip_213/name="" +animation/clip_213/start_frame=0 +animation/clip_213/end_frame=0 +animation/clip_213/loops=false +animation/clip_214/name="" +animation/clip_214/start_frame=0 +animation/clip_214/end_frame=0 +animation/clip_214/loops=false +animation/clip_215/name="" +animation/clip_215/start_frame=0 +animation/clip_215/end_frame=0 +animation/clip_215/loops=false +animation/clip_216/name="" +animation/clip_216/start_frame=0 +animation/clip_216/end_frame=0 +animation/clip_216/loops=false +animation/clip_217/name="" +animation/clip_217/start_frame=0 +animation/clip_217/end_frame=0 +animation/clip_217/loops=false +animation/clip_218/name="" +animation/clip_218/start_frame=0 +animation/clip_218/end_frame=0 +animation/clip_218/loops=false +animation/clip_219/name="" +animation/clip_219/start_frame=0 +animation/clip_219/end_frame=0 +animation/clip_219/loops=false +animation/clip_220/name="" +animation/clip_220/start_frame=0 +animation/clip_220/end_frame=0 +animation/clip_220/loops=false +animation/clip_221/name="" +animation/clip_221/start_frame=0 +animation/clip_221/end_frame=0 +animation/clip_221/loops=false +animation/clip_222/name="" +animation/clip_222/start_frame=0 +animation/clip_222/end_frame=0 +animation/clip_222/loops=false +animation/clip_223/name="" +animation/clip_223/start_frame=0 +animation/clip_223/end_frame=0 +animation/clip_223/loops=false +animation/clip_224/name="" +animation/clip_224/start_frame=0 +animation/clip_224/end_frame=0 +animation/clip_224/loops=false +animation/clip_225/name="" +animation/clip_225/start_frame=0 +animation/clip_225/end_frame=0 +animation/clip_225/loops=false +animation/clip_226/name="" +animation/clip_226/start_frame=0 +animation/clip_226/end_frame=0 +animation/clip_226/loops=false +animation/clip_227/name="" +animation/clip_227/start_frame=0 +animation/clip_227/end_frame=0 +animation/clip_227/loops=false +animation/clip_228/name="" +animation/clip_228/start_frame=0 +animation/clip_228/end_frame=0 +animation/clip_228/loops=false +animation/clip_229/name="" +animation/clip_229/start_frame=0 +animation/clip_229/end_frame=0 +animation/clip_229/loops=false +animation/clip_230/name="" +animation/clip_230/start_frame=0 +animation/clip_230/end_frame=0 +animation/clip_230/loops=false +animation/clip_231/name="" +animation/clip_231/start_frame=0 +animation/clip_231/end_frame=0 +animation/clip_231/loops=false +animation/clip_232/name="" +animation/clip_232/start_frame=0 +animation/clip_232/end_frame=0 +animation/clip_232/loops=false +animation/clip_233/name="" +animation/clip_233/start_frame=0 +animation/clip_233/end_frame=0 +animation/clip_233/loops=false +animation/clip_234/name="" +animation/clip_234/start_frame=0 +animation/clip_234/end_frame=0 +animation/clip_234/loops=false +animation/clip_235/name="" +animation/clip_235/start_frame=0 +animation/clip_235/end_frame=0 +animation/clip_235/loops=false +animation/clip_236/name="" +animation/clip_236/start_frame=0 +animation/clip_236/end_frame=0 +animation/clip_236/loops=false +animation/clip_237/name="" +animation/clip_237/start_frame=0 +animation/clip_237/end_frame=0 +animation/clip_237/loops=false +animation/clip_238/name="" +animation/clip_238/start_frame=0 +animation/clip_238/end_frame=0 +animation/clip_238/loops=false +animation/clip_239/name="" +animation/clip_239/start_frame=0 +animation/clip_239/end_frame=0 +animation/clip_239/loops=false +animation/clip_240/name="" +animation/clip_240/start_frame=0 +animation/clip_240/end_frame=0 +animation/clip_240/loops=false +animation/clip_241/name="" +animation/clip_241/start_frame=0 +animation/clip_241/end_frame=0 +animation/clip_241/loops=false +animation/clip_242/name="" +animation/clip_242/start_frame=0 +animation/clip_242/end_frame=0 +animation/clip_242/loops=false +animation/clip_243/name="" +animation/clip_243/start_frame=0 +animation/clip_243/end_frame=0 +animation/clip_243/loops=false +animation/clip_244/name="" +animation/clip_244/start_frame=0 +animation/clip_244/end_frame=0 +animation/clip_244/loops=false +animation/clip_245/name="" +animation/clip_245/start_frame=0 +animation/clip_245/end_frame=0 +animation/clip_245/loops=false +animation/clip_246/name="" +animation/clip_246/start_frame=0 +animation/clip_246/end_frame=0 +animation/clip_246/loops=false +animation/clip_247/name="" +animation/clip_247/start_frame=0 +animation/clip_247/end_frame=0 +animation/clip_247/loops=false +animation/clip_248/name="" +animation/clip_248/start_frame=0 +animation/clip_248/end_frame=0 +animation/clip_248/loops=false +animation/clip_249/name="" +animation/clip_249/start_frame=0 +animation/clip_249/end_frame=0 +animation/clip_249/loops=false +animation/clip_250/name="" +animation/clip_250/start_frame=0 +animation/clip_250/end_frame=0 +animation/clip_250/loops=false +animation/clip_251/name="" +animation/clip_251/start_frame=0 +animation/clip_251/end_frame=0 +animation/clip_251/loops=false +animation/clip_252/name="" +animation/clip_252/start_frame=0 +animation/clip_252/end_frame=0 +animation/clip_252/loops=false +animation/clip_253/name="" +animation/clip_253/start_frame=0 +animation/clip_253/end_frame=0 +animation/clip_253/loops=false +animation/clip_254/name="" +animation/clip_254/start_frame=0 +animation/clip_254/end_frame=0 +animation/clip_254/loops=false +animation/clip_255/name="" +animation/clip_255/start_frame=0 +animation/clip_255/end_frame=0 +animation/clip_255/loops=false +animation/clip_256/name="" +animation/clip_256/start_frame=0 +animation/clip_256/end_frame=0 +animation/clip_256/loops=false diff --git a/src/addons/godot-openvr/plugin.cfg b/ovr-utils/addons/godot-openvr/plugin.cfg similarity index 100% rename from src/addons/godot-openvr/plugin.cfg rename to ovr-utils/addons/godot-openvr/plugin.cfg diff --git a/src/addons/godot-openvr/scenes/framecounter_in_3d.tscn b/ovr-utils/addons/godot-openvr/scenes/framecounter_in_3d.tscn similarity index 100% rename from src/addons/godot-openvr/scenes/framecounter_in_3d.tscn rename to ovr-utils/addons/godot-openvr/scenes/framecounter_in_3d.tscn diff --git a/src/addons/godot-openvr/scenes/ovr_controller.gd b/ovr-utils/addons/godot-openvr/scenes/ovr_controller.gd similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_controller.gd rename to ovr-utils/addons/godot-openvr/scenes/ovr_controller.gd diff --git a/src/addons/godot-openvr/scenes/ovr_controller.tscn b/ovr-utils/addons/godot-openvr/scenes/ovr_controller.tscn similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_controller.tscn rename to ovr-utils/addons/godot-openvr/scenes/ovr_controller.tscn diff --git a/src/addons/godot-openvr/scenes/ovr_first_person.tscn b/ovr-utils/addons/godot-openvr/scenes/ovr_first_person.tscn similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_first_person.tscn rename to ovr-utils/addons/godot-openvr/scenes/ovr_first_person.tscn diff --git a/ovr-utils/addons/godot-openvr/scenes/ovr_left_hand.tscn b/ovr-utils/addons/godot-openvr/scenes/ovr_left_hand.tscn new file mode 100644 index 0000000..7e01821 --- /dev/null +++ b/ovr-utils/addons/godot-openvr/scenes/ovr_left_hand.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://addons/godot-openvr/meshes/vr_glove_left_model_slim.glb" type="PackedScene" id=1] +[ext_resource path="res://addons/godot-openvr/meshes/models_hands_vr_glove_vmat.material" type="Material" id=2] +[ext_resource path="res://addons/godot-openvr/OpenVRPose.gdns" type="Script" id=3] +[ext_resource path="res://addons/godot-openvr/OpenVRSkeleton.gdns" type="Script" id=4] + +[node name="ovr_left_hand" instance=ExtResource( 1 )] +script = ExtResource( 3 ) +action = "/actions/godot/in/left_hand" + +[node name="Skeleton" parent="RootNode" index="0"] +bones/5/bound_children = [ NodePath("Thumb") ] +bones/10/bound_children = [ NodePath("Index") ] +bones/15/bound_children = [ NodePath("Middle") ] +bones/20/bound_children = [ NodePath("Ring") ] +bones/25/bound_children = [ NodePath("Pinky") ] +script = ExtResource( 4 ) +action = "/actions/godot/in/left_hand" + +[node name="vr_glove_left_slim" parent="RootNode/Skeleton" index="0"] +material/0 = ExtResource( 2 ) + +[node name="Thumb" type="BoneAttachment" parent="RootNode/Skeleton" index="1"] +transform = Transform( -0.347509, 0.0284256, 0.937246, -0.13095, -0.991217, -0.0184906, 0.928488, -0.129158, 0.348178, -0.0498674, 0.056092, 0.112777 ) +bone_name = "finger_thumb_l_end" + +[node name="Index" type="BoneAttachment" parent="RootNode/Skeleton" index="2"] +transform = Transform( -0.717079, -0.669965, 0.19221, -0.076153, -0.19881, -0.977075, 0.69282, -0.715277, 0.0915429, -0.0345977, 0.0355404, 0.164767 ) +bone_name = "finger_index_l_end" + +[node name="Middle" type="BoneAttachment" parent="RootNode/Skeleton" index="3"] +transform = Transform( -0.755126, -0.650532, 0.0812012, -0.0513261, -0.064817, -0.996576, 0.653568, -0.756708, 0.0155557, -0.0321126, 0.00654218, 0.171613 ) +bone_name = "finger_middle_l_end" + +[node name="Ring" type="BoneAttachment" parent="RootNode/Skeleton" index="4"] +transform = Transform( -0.749612, -0.661178, -0.0304372, -0.0961052, 0.154228, -0.98335, 0.654864, -0.734206, -0.179154, -0.0346831, -0.0253934, 0.156924 ) +bone_name = "finger_ring_l_end" + +[node name="Pinky" type="BoneAttachment" parent="RootNode/Skeleton" index="5"] +transform = Transform( -0.615435, -0.749373, -0.244295, -0.0354297, 0.335934, -0.941219, 0.787391, -0.570604, -0.233296, -0.0270969, -0.0462902, 0.133467 ) +bone_name = "finger_pinky_l_end" diff --git a/src/addons/godot-openvr/scenes/ovr_main.gd b/ovr-utils/addons/godot-openvr/scenes/ovr_main.gd similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_main.gd rename to ovr-utils/addons/godot-openvr/scenes/ovr_main.gd diff --git a/src/addons/godot-openvr/scenes/ovr_render_model.gd b/ovr-utils/addons/godot-openvr/scenes/ovr_render_model.gd similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_render_model.gd rename to ovr-utils/addons/godot-openvr/scenes/ovr_render_model.gd diff --git a/src/addons/godot-openvr/scenes/ovr_render_model.tscn b/ovr-utils/addons/godot-openvr/scenes/ovr_render_model.tscn similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_render_model.tscn rename to ovr-utils/addons/godot-openvr/scenes/ovr_render_model.tscn diff --git a/ovr-utils/addons/godot-openvr/scenes/ovr_right_hand.tscn b/ovr-utils/addons/godot-openvr/scenes/ovr_right_hand.tscn new file mode 100644 index 0000000..fa8bcfc --- /dev/null +++ b/ovr-utils/addons/godot-openvr/scenes/ovr_right_hand.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://addons/godot-openvr/meshes/vr_glove_right_model_slim.glb" type="PackedScene" id=1] +[ext_resource path="res://addons/godot-openvr/meshes/models_hands_vr_glove_vmat.material" type="Material" id=2] +[ext_resource path="res://addons/godot-openvr/OpenVRPose.gdns" type="Script" id=3] +[ext_resource path="res://addons/godot-openvr/OpenVRSkeleton.gdns" type="Script" id=4] + +[node name="ovr_right_hand" instance=ExtResource( 1 )] +script = ExtResource( 3 ) +action = "/actions/godot/in/right_hand" + +[node name="Skeleton" parent="RootNode" index="0"] +bones/5/bound_children = [ NodePath("Thumb") ] +bones/10/bound_children = [ NodePath("Index") ] +bones/15/bound_children = [ NodePath("Middle") ] +bones/20/bound_children = [ NodePath("Ring") ] +bones/25/bound_children = [ NodePath("Pinky") ] +script = ExtResource( 4 ) +action = "/actions/godot/in/right_hand" + +[node name="vr_glove_right_slim" parent="RootNode/Skeleton" index="0"] +material/0 = ExtResource( 2 ) + +[node name="Thumb" type="BoneAttachment" parent="RootNode/Skeleton" index="1"] +transform = Transform( -0.347509, 0.0284256, 0.937246, 0.130949, 0.991217, 0.0184906, -0.928488, 0.129158, -0.348179, 0.0498674, 0.0560921, 0.112777 ) +bone_name = "finger_thumb_r_end" + +[node name="Index" type="BoneAttachment" parent="RootNode/Skeleton" index="2"] +transform = Transform( -0.717079, -0.669965, 0.19221, 0.0761528, 0.19881, 0.977075, -0.69282, 0.715277, -0.0915429, 0.0345977, 0.0355405, 0.164767 ) +bone_name = "finger_index_r_end" + +[node name="Middle" type="BoneAttachment" parent="RootNode/Skeleton" index="3"] +transform = Transform( -0.755126, -0.650532, 0.0812013, 0.0513261, 0.064817, 0.996577, -0.653568, 0.756708, -0.0155557, 0.0321126, 0.00654219, 0.171613 ) +bone_name = "finger_middle_r_end" + +[node name="Ring" type="BoneAttachment" parent="RootNode/Skeleton" index="4"] +transform = Transform( -0.749612, -0.661178, -0.0304372, 0.0961052, -0.154228, 0.98335, -0.654864, 0.734206, 0.179154, 0.0346831, -0.0253934, 0.156924 ) +bone_name = "finger_ring_r_end" + +[node name="Pinky" type="BoneAttachment" parent="RootNode/Skeleton" index="5"] +transform = Transform( -0.615435, -0.749373, -0.244295, 0.0354297, -0.335934, 0.941219, -0.787391, 0.570604, 0.233296, 0.0270969, -0.0462902, 0.133467 ) +bone_name = "finger_pinky_r_end" diff --git a/src/addons/godot-openvr/scenes/ovr_shader_cache.gd b/ovr-utils/addons/godot-openvr/scenes/ovr_shader_cache.gd similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_shader_cache.gd rename to ovr-utils/addons/godot-openvr/scenes/ovr_shader_cache.gd diff --git a/src/addons/godot-openvr/scenes/ovr_shader_cache.tscn b/ovr-utils/addons/godot-openvr/scenes/ovr_shader_cache.tscn similarity index 100% rename from src/addons/godot-openvr/scenes/ovr_shader_cache.tscn rename to ovr-utils/addons/godot-openvr/scenes/ovr_shader_cache.tscn diff --git a/src/addons/openvr_overlay/MissingOverlay.tscn b/ovr-utils/addons/openvr_overlay/MissingOverlay.tscn similarity index 100% rename from src/addons/openvr_overlay/MissingOverlay.tscn rename to ovr-utils/addons/openvr_overlay/MissingOverlay.tscn diff --git a/ovr-utils/addons/openvr_overlay/OverlayCursor.tscn b/ovr-utils/addons/openvr_overlay/OverlayCursor.tscn new file mode 100644 index 0000000..7993016 --- /dev/null +++ b/ovr-utils/addons/openvr_overlay/OverlayCursor.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://addons/openvr_overlay/interaction/overlay_cursor.gd" type="Script" id=1] + +[node name="OverlayCursor" type="Node"] +script = ExtResource( 1 ) diff --git a/ovr-utils/addons/openvr_overlay/OverlayGrab.tscn b/ovr-utils/addons/openvr_overlay/OverlayGrab.tscn new file mode 100644 index 0000000..0535b42 --- /dev/null +++ b/ovr-utils/addons/openvr_overlay/OverlayGrab.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://addons/openvr_overlay/interaction/overlay_grab.gd" type="Script" id=1] + +[node name="OverlayGrab" type="Node"] +script = ExtResource( 1 ) diff --git a/src/addons/openvr_overlay/OverlayInstance.tscn b/ovr-utils/addons/openvr_overlay/OverlayInstance.tscn similarity index 54% rename from src/addons/openvr_overlay/OverlayInstance.tscn rename to ovr-utils/addons/openvr_overlay/OverlayInstance.tscn index ede672e..bd5ccc8 100644 --- a/src/addons/openvr_overlay/OverlayInstance.tscn +++ b/ovr-utils/addons/openvr_overlay/OverlayInstance.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://addons/openvr_overlay/overlay_instance.gd" type="Script" id=1] -[ext_resource path="res://addons/openvr_overlay/OverlayInteraction.tscn" type="PackedScene" id=2] [ext_resource path="res://addons/godot-openvr/OpenVROverlay.gdns" type="Script" id=3] [sub_resource type="StyleBoxFlat" id=1] @@ -12,24 +11,21 @@ border_width_right = 24 border_width_bottom = 24 border_color = Color( 0, 0.784314, 1, 0.611765 ) -[sub_resource type="ViewportTexture" id=2] -flags = 4 -viewport_path = NodePath("OverlayViewport") - [node name="OverlayInstance" type="Spatial"] script = ExtResource( 1 ) [node name="OverlayViewport" type="Viewport" parent="."] -size = Vector2( 2048, 2048 ) +size = Vector2( 100, 100 ) transparent_bg = true +handle_input_locally = false +msaa = 3 hdr = false disable_3d = true +keep_3d_linear = true usage = 0 render_target_update_mode = 3 -shadow_atlas_quad_0 = 0 -shadow_atlas_quad_1 = 0 -shadow_atlas_quad_2 = 0 -shadow_atlas_quad_3 = 0 +script = ExtResource( 3 ) +overlay_width_in_meters = 0.4 [node name="Container" type="Control" parent="OverlayViewport"] anchor_right = 1.0 @@ -41,28 +37,3 @@ anchor_right = 1.0 anchor_bottom = 1.0 mouse_filter = 2 custom_styles/panel = SubResource( 1 ) - -[node name="VROverlayViewport" type="Viewport" parent="."] -size = Vector2( 100, 100 ) -transparent_bg = true -handle_input_locally = false -hdr = false -disable_3d = true -usage = 0 -render_target_update_mode = 3 -shadow_atlas_quad_0 = 0 -shadow_atlas_quad_1 = 0 -shadow_atlas_quad_2 = 0 -shadow_atlas_quad_3 = 0 -script = ExtResource( 3 ) -overlay_width_in_meters = 0.4 - -[node name="TextureRect" type="TextureRect" parent="VROverlayViewport"] -anchor_right = 1.0 -anchor_bottom = 1.0 -texture = SubResource( 2 ) -expand = true -stretch_mode = 5 -flip_v = true - -[node name="OverlayInteraction" parent="." instance=ExtResource( 2 )] diff --git a/src/addons/openvr_overlay/OverlayInteraction.tscn b/ovr-utils/addons/openvr_overlay/OverlayInteraction.tscn similarity index 82% rename from src/addons/openvr_overlay/OverlayInteraction.tscn rename to ovr-utils/addons/openvr_overlay/OverlayInteraction.tscn index 5e5c959..9d0b978 100644 --- a/src/addons/openvr_overlay/OverlayInteraction.tscn +++ b/ovr-utils/addons/openvr_overlay/OverlayInteraction.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://addons/openvr_overlay/interaction/overlay_interaction.gd" type="Script" id=1] -[ext_resource path="res://addons/openvr_overlay/interaction/OverlayArea.tscn" type="PackedScene" id=2] +[ext_resource path="res://addons/openvr_overlay/interaction/OverlayActivator.tscn" type="PackedScene" id=6] [node name="OverlayInteraction" type="Node"] script = ExtResource( 1 ) @@ -10,14 +10,16 @@ script = ExtResource( 1 ) [node name="left" type="ARVRController" parent="VR"] +[node name="OverlayActivator" parent="VR/left" instance=ExtResource( 6 )] + [node name="right" type="ARVRController" parent="VR"] controller_id = 2 +[node name="OverlayActivator" parent="VR/right" instance=ExtResource( 6 )] + [node name="head" type="ARVRCamera" parent="VR"] visible = false -[node name="OverlayArea" parent="." instance=ExtResource( 2 )] - [connection signal="button_pressed" from="VR/left" to="." method="_on_LeftHand_button_pressed"] [connection signal="button_release" from="VR/left" to="." method="_on_LeftHand_button_release"] [connection signal="button_pressed" from="VR/right" to="." method="_on_RightHand_button_pressed"] diff --git a/src/addons/openvr_overlay/interaction/Cursor.tscn b/ovr-utils/addons/openvr_overlay/interaction/Cursor.tscn similarity index 100% rename from src/addons/openvr_overlay/interaction/Cursor.tscn rename to ovr-utils/addons/openvr_overlay/interaction/Cursor.tscn diff --git a/src/addons/openvr_overlay/interaction/HandCollider.tscn b/ovr-utils/addons/openvr_overlay/interaction/OverlayActivator.tscn similarity index 65% rename from src/addons/openvr_overlay/interaction/HandCollider.tscn rename to ovr-utils/addons/openvr_overlay/interaction/OverlayActivator.tscn index e238145..d705ca9 100644 --- a/src/addons/openvr_overlay/interaction/HandCollider.tscn +++ b/ovr-utils/addons/openvr_overlay/interaction/OverlayActivator.tscn @@ -4,10 +4,7 @@ margin = 0.001 radius = 0.01 -[node name="HandCollider" type="Area"] -monitoring = false -collision_layer = 30 -collision_mask = 0 +[node name="OverlayActivator" type="StaticBody"] [node name="Collision" type="CollisionShape" parent="."] shape = SubResource( 1 ) diff --git a/ovr-utils/addons/openvr_overlay/interaction/OverlayArea.tscn b/ovr-utils/addons/openvr_overlay/interaction/OverlayArea.tscn new file mode 100644 index 0000000..6825095 --- /dev/null +++ b/ovr-utils/addons/openvr_overlay/interaction/OverlayArea.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=2] + +[sub_resource type="BoxShape" id=1] +resource_local_to_scene = true +extents = Vector3( 0.2, 0.2, 0.01 ) + +[node name="OverlayArea" type="Area"] + +[node name="CollisionShape" type="CollisionShape" parent="."] +shape = SubResource( 1 ) diff --git a/src/addons/openvr_overlay/interaction/cursor.png b/ovr-utils/addons/openvr_overlay/interaction/cursor.png similarity index 100% rename from src/addons/openvr_overlay/interaction/cursor.png rename to ovr-utils/addons/openvr_overlay/interaction/cursor.png diff --git a/src/addons/openvr_overlay/interaction/cursor.png.import b/ovr-utils/addons/openvr_overlay/interaction/cursor.png.import similarity index 100% rename from src/addons/openvr_overlay/interaction/cursor.png.import rename to ovr-utils/addons/openvr_overlay/interaction/cursor.png.import diff --git a/ovr-utils/addons/openvr_overlay/interaction/overlay_cursor.gd b/ovr-utils/addons/openvr_overlay/interaction/overlay_cursor.gd new file mode 100644 index 0000000..5df6f54 --- /dev/null +++ b/ovr-utils/addons/openvr_overlay/interaction/overlay_cursor.gd @@ -0,0 +1,55 @@ +extends Node + + +var cursor_node = preload("res://addons/openvr_overlay/interaction/Cursor.tscn").instance() +onready var viewport: Viewport = get_node("../../OverlayViewport") +onready var _i = get_parent() + +func _ready() -> void: + viewport.add_child(cursor_node) + get_parent().connect("trigger_on", self, "_trigger_on") + get_parent().connect("trigger_off", self, "_trigger_off") + + +func _process(_delta: float) -> void: + _update_cursor() + + +#get canvas position of active controller +func get_canvas_pos() -> Vector2: + if not _i.active_controller: + return Vector2(-1000, 1000) # offscreen + + var controller_local_pos = _i._overlay_area.global_transform.xform_inv(\ + _i.tracker_nodes[_i.active_controller].translation) + var pos = Vector2(controller_local_pos.x, controller_local_pos.y) + + var overlay_size = OverlayInit.ovr_interface.get_render_targetsize() + # scale to pixels + pos *= overlay_size.x + pos /= _i.get_parent().width_meters + # adjust to center + pos.y *= -1 + pos += overlay_size * 0.5 + return pos + + +func _update_cursor(): + cursor_node.rect_position = get_canvas_pos() + + +func _send_click_event(state: bool): + var click_event = InputEventMouseButton.new() + click_event.position = get_canvas_pos() + click_event.pressed = state + click_event.button_index = 1 + viewport.input(click_event) + + +func _trigger_on(): + _send_click_event(true) + + +func _trigger_off(): + _send_click_event(false) + diff --git a/src/addons/openvr_overlay/interaction/mod/grabbable.gd b/ovr-utils/addons/openvr_overlay/interaction/overlay_grab.gd similarity index 86% rename from src/addons/openvr_overlay/interaction/mod/grabbable.gd rename to ovr-utils/addons/openvr_overlay/interaction/overlay_grab.gd index b2edefd..5c3069c 100644 --- a/src/addons/openvr_overlay/interaction/mod/grabbable.gd +++ b/ovr-utils/addons/openvr_overlay/interaction/overlay_grab.gd @@ -22,18 +22,18 @@ func _ready() -> void: get_parent().connect("trigger_off", self, "_trigger_off") -func _trigger_on(controller): +func _trigger_on(): if Settings.s.grab_mode or _interaction.grab_mode: - begin_move(controller) + begin_move() -func _trigger_off(_controller): +func _trigger_off(): finish_move() -func begin_move(controller="right"): - if not _interaction.state[controller].near: - print("Could not begin moving overlay, " + controller + " controller is not touching overlay. <", _overlay.name, ">") +func begin_move(): + if not _interaction.active_controller: + print("Could not begin moving overlay, no controller is touching overlay. <", _overlay.name, ">") return if is_moving: return @@ -41,7 +41,7 @@ func begin_move(controller="right"): _interaction.pause_triggers = true # store current states to revert after move _pre_move_target = _overlay.current_target - _mover_hand_name = controller + _mover_hand_name = _interaction.active_controller _mover_hand_offsets = _overlay.get_offset(_mover_hand_name) # calculate offsets from active controller to overlay @@ -73,6 +73,7 @@ func finish_move(): # revert target _overlay.update_current_target() + _overlay.save_settings() _interaction._update_target() _interaction.pause_triggers = false diff --git a/ovr-utils/addons/openvr_overlay/interaction/overlay_interaction.gd b/ovr-utils/addons/openvr_overlay/interaction/overlay_interaction.gd new file mode 100644 index 0000000..e8881e4 --- /dev/null +++ b/ovr-utils/addons/openvr_overlay/interaction/overlay_interaction.gd @@ -0,0 +1,114 @@ +extends Node + +signal touch_on # a controller entered +signal touch_off # a controller exited +signal trigger_on # trigger pushed while touching +signal trigger_off# trigger released + +var touch_state := false +var trigger_state := false +var grab_mode := false + +# controller that currently the trigger down +var active_controller := "" +# reference to the area node thats used for touch +var _overlay_area = preload("res://addons/openvr_overlay/interaction/OverlayArea.tscn").instance() +var _right_is_activator := false # this hand has a collider on it to trigger things on the overlay +var _left_is_activator := false + +var pause_triggers := false # disable triggers updating + +onready var tracker_nodes = { + "head": $VR/head, + "left": $VR/left, + "right": $VR/right, + "world": $VR +} + + +func _ready() -> void: + add_child(_overlay_area) + _overlay_area.connect("body_entered", self, "_on_OverlayArea_entered") + _overlay_area.connect("body_exited", self, "_on_OverlayArea_exited") + + get_parent().connect("width_changed", self, "_update_width") + get_parent().connect("offset_changed", self, "_update_offset") + get_parent().connect("target_changed", self, "_update_target") + + _update_width() + _update_offset() + _update_target() + + +func _trigger_on(controller): + if touch_state: + active_controller = controller + trigger_state = true + emit_signal("trigger_on") + + +func _trigger_off(): + trigger_state = false + emit_signal("trigger_off") + + +func _on_OverlayArea_entered(body: Node) -> void: + if body.get_node("../../..") != self or pause_triggers or !get_parent().overlay_visible: + return + touch_state = true + active_controller = body.get_parent().name + get_parent().get_node("OverlayViewport/Selected").visible = Settings.s.grab_mode or grab_mode + emit_signal("touch_on") + + +func _on_OverlayArea_exited(body: Node) -> void: + if body.get_node("../../..") != self or pause_triggers or !get_parent().overlay_visible: + return + # TODO revert to other controller if both were touching (edge case) + active_controller = "" + touch_state = false + get_parent().get_node("OverlayViewport/Selected").visible = false + emit_signal("touch_off") + + +func _update_width(): + var ratio = OverlayInit.ovr_interface.get_render_targetsize() + var extents = get_parent().width_meters * 0.5 + _overlay_area.get_child(0).shape.set_extents(Vector3(extents, extents * ratio.y/ratio.x, 0.05)) + + +func _update_offset(): + _overlay_area.translation = get_parent().translation + _overlay_area.rotation = get_parent().rotation + + +func _update_target(): + # reparent _overlay_area + _overlay_area.get_parent().remove_child(_overlay_area) + tracker_nodes[get_parent().current_target].add_child(_overlay_area) + + _left_is_activator = get_parent().current_target != "left" + _right_is_activator = get_parent().current_target != "right" + # toggle appropriate colliders + $VR/left/OverlayActivator/Collision.disabled = !_left_is_activator + $VR/right/OverlayActivator/Collision.disabled = !_right_is_activator + + +func _on_RightHand_button_pressed(button: int) -> void: + if button == JOY_VR_TRIGGER and _right_is_activator: + _trigger_on("right") + + +func _on_RightHand_button_release(button: int) -> void: + if button == JOY_VR_TRIGGER and active_controller == "right": + _trigger_off() + + +func _on_LeftHand_button_pressed(button: int) -> void: + if button == JOY_VR_TRIGGER and _left_is_activator: + _trigger_on("left") + + +func _on_LeftHand_button_release(button: int) -> void: + if button == JOY_VR_TRIGGER and active_controller == "left": + _trigger_off() diff --git a/src/addons/openvr_overlay/openvr_overlay.gd b/ovr-utils/addons/openvr_overlay/openvr_overlay.gd similarity index 56% rename from src/addons/openvr_overlay/openvr_overlay.gd rename to ovr-utils/addons/openvr_overlay/openvr_overlay.gd index 7c22a3b..4cdcb82 100644 --- a/src/addons/openvr_overlay/openvr_overlay.gd +++ b/ovr-utils/addons/openvr_overlay/openvr_overlay.gd @@ -4,9 +4,7 @@ extends EditorPlugin func _enter_tree() -> void: add_autoload_singleton("OverlayInit", "res://addons/openvr_overlay/overlay_init.gd") - add_autoload_singleton("OverlayInteractionRoot", "res://addons/openvr_overlay/OverlayInteractionRoot.tscn") func _exit_tree() -> void: remove_autoload_singleton("OverlayInit") - remove_autoload_singleton("OverlayInteractionRoot") diff --git a/src/addons/openvr_overlay/overlay_init.gd b/ovr-utils/addons/openvr_overlay/overlay_init.gd similarity index 80% rename from src/addons/openvr_overlay/overlay_init.gd rename to ovr-utils/addons/openvr_overlay/overlay_init.gd index 3abdeef..284d7f7 100644 --- a/src/addons/openvr_overlay/overlay_init.gd +++ b/ovr-utils/addons/openvr_overlay/overlay_init.gd @@ -1,14 +1,5 @@ extends Node - -const OVERLAY_PROPERTIES_DEFAULT = { - "allow_delete": true, - "allow_hide": true, - "clickable": false, - "touchable": false, - "grabbable": true, -} - var ovr_interface: ARVRInterface var ovr_config := preload("res://addons/godot-openvr/OpenVRConfig.gdns").new() @@ -20,7 +11,9 @@ var trackers = { } func _init() -> void: - ovr_config.set_application_type(2) # Set to OVERLAY MODE + OS.window_minimized = true + ovr_config = preload("res://addons/godot-openvr/OpenVRConfig.gdns").new() + ovr_config.set_application_type(2) # Set to OVERLAY MODE = 2, NORMAL MODE = 1 ovr_config.set_tracking_universe(1) # Set to SEATED MODE = 0, STANDING MODE = 1, RAW MODE = 2 # Find the OpenVR interface and initialise it @@ -30,14 +23,9 @@ func _init() -> void: func _ready() -> void: - OS.window_size = Vector2(16, 16) - OS.window_position = Vector2(32, 32) - OS.window_minimized = true - ARVRServer.connect("tracker_added", self, "_tracker_added") ARVRServer.connect("tracker_removed", self, "_tracker_removed") update_hand_ids() - #Input.set_use_accumulated_input(true) func _tracker_added(tracker_name: String, type: int, id: int): diff --git a/src/addons/openvr_overlay/overlay_instance.gd b/ovr-utils/addons/openvr_overlay/overlay_instance.gd similarity index 53% rename from src/addons/openvr_overlay/overlay_instance.gd rename to ovr-utils/addons/openvr_overlay/overlay_instance.gd index 35b8443..f930108 100644 --- a/src/addons/openvr_overlay/overlay_instance.gd +++ b/ovr-utils/addons/openvr_overlay/overlay_instance.gd @@ -1,23 +1,22 @@ extends Spatial -#signal path_changed -signal overlay_visible_changed signal width_changed -signal alpha_changed -signal target_changed -signal fallback_changed signal offset_changed +signal target_changed +signal overlay_visibility_changed const TARGETS = ["head", "left", "right", "world"] export (String, "head", "left", "right", "world") var target = "left" setget set_target +export var overlay_scene: PackedScene = \ + preload("res://addons/openvr_overlay/MissingOverlay.tscn") setget set_overlay_scene export var width_meters := 0.4 setget set_width_in_meters -export var alpha := 1.0 setget set_alpha - +export var add_grabbing := true # add grabbing module +export var add_cursor := false # add cursor module var _tracker_id := 0 var _offsets:Dictionary = { - "head": {"pos": Vector3(0, 0, -0.35), "rot": Quat()}, + "head": {"pos": Vector3(0, 0, -0.5), "rot": Quat()}, "left": {"pos": Vector3(), "rot": Quat()}, "right": {"pos": Vector3(), "rot": Quat()}, "world": {"pos": Vector3(0,1,0), "rot": Quat()}, @@ -28,46 +27,78 @@ var current_target: String = "world" setget _set_current_target var fallback = ["left", "right", "head"] # TODO setget that updates tracking (not important) var interaction_handler: Node var overlay_visible := true setget set_overlay_visible -var path : String = "res://special_overlays/MainOverlay.tscn"# setget set_path -var path_invalid := false -var OVERLAY_PROPERTIES: Dictionary # defined in overlay root script (optional) +var type := "main" onready var container = $OverlayViewport/Container -var overlay_scene: Node func _ready() -> void: - container = $OverlayViewport/Container - load_overlay() current_target = target ARVRServer.connect("tracker_added", self, "_tracker_changed") ARVRServer.connect("tracker_removed", self, "_tracker_changed") - $VROverlayViewport.size = OverlayInit.ovr_interface.get_render_targetsize() + $OverlayViewport.size = OverlayInit.ovr_interface.get_render_targetsize() set_notify_transform(true) + load_settings() + if add_cursor or add_grabbing: + interaction_handler = load("res://addons/openvr_overlay/OverlayInteraction.tscn").instance() + add_child(interaction_handler) + if add_cursor: + add_cursor() + if add_grabbing: + add_grab() + + if overlay_scene: + container.add_child(overlay_scene.instance()) + update_tracker_id() - call_deferred("update_offset") -func load_overlay() -> void: - path_invalid = false - var packed_overlay = load(path) - if not packed_overlay: - path_invalid = true - overlay_scene = load("res://special_overlays/UnknownType.tscn").instance() +func add_cursor(): + interaction_handler.add_child(load("res://addons/openvr_overlay/OverlayCursor.tscn").instance()) + + +func add_grab(): + interaction_handler.add_child(load("res://addons/openvr_overlay/OverlayGrab.tscn").instance()) + + +func load_settings(): + if Settings.s.overlays.has(name): + var loaded = Settings.s.overlays[name] + if loaded.has("fallback"): + fallback = loaded.fallback + set_target(loaded.target) + + set_width_in_meters(loaded.width) + + for t_key in loaded.offsets: + var t_offset = loaded.offsets[t_key] + _offsets[t_key].pos = t_offset.pos + _offsets[t_key].rot = t_offset.rot + update_offset() + if loaded.has("visible"): + set_overlay_visible(loaded.visible) else: - overlay_scene = packed_overlay.instance() + save_settings() - if overlay_scene.get("OVERLAY_PROPERTIES") != null: - OVERLAY_PROPERTIES = overlay_scene.OVERLAY_PROPERTIES - $OverlayInteraction.spawn_modules() +func save_settings(): + if not Settings.s.overlays.has(name): + Settings.s.overlays[name] = {} + Settings.s.overlays[name].target = target + Settings.s.overlays[name].width = width_meters + Settings.s.overlays[name].fallback = fallback + Settings.s.overlays[name].type = type + + if not Settings.s.overlays[name].has("offsets"): + Settings.s.overlays[name]["offsets"] = {} + for t_key in TARGETS: + Settings.s.overlays[name].offsets[t_key] = _offsets[t_key] + + Settings.save_settings() - if container.get_child_count() > 0: - container.get_child(0).queue_free() - container.add_child(overlay_scene) func update_tracker_id(): _tracker_id = -1 @@ -81,7 +112,7 @@ func update_tracker_id(): if _tracker_id == -1: # could not find controller, fallback -# print("Missing controller ", current_target, " ", target, " ", fallback, " - ", name) + print("Missing controller ", current_target, " ", target, " ", fallback, " - ", name) _tracker_id = 63 # highest tracker id (unused, at origin) @@ -91,11 +122,11 @@ func update_offset(): match current_target: "head": - $VROverlayViewport.track_relative_to_device(0, global_transform) + $OverlayViewport.track_relative_to_device(0, global_transform) "world": - $VROverlayViewport.overlay_position_absolute(global_transform) + $OverlayViewport.overlay_position_absolute(global_transform) _: - $VROverlayViewport.track_relative_to_device(_tracker_id, global_transform) + $OverlayViewport.track_relative_to_device(_tracker_id, global_transform) func update_current_target(): @@ -111,8 +142,10 @@ func update_current_target(): func set_overlay_visible(state: bool): overlay_visible = state - $VROverlayViewport.overlay_visible = state - emit_signal("overlay_visible_changed", state) + $OverlayViewport.overlay_visible = state + Settings.s.overlays[name].visible = state + emit_signal("overlay_visibility_changed", state) + save_settings() func _tracker_changed(tracker_name: String, type: int, id: int): @@ -145,14 +178,17 @@ func set_offset(offset_target: String, pos: Vector3, rot: Quat) -> void: func set_width_in_meters(width: float) -> void: width_meters = width - $VROverlayViewport.overlay_width_in_meters = width_meters + $OverlayViewport.overlay_width_in_meters = width_meters emit_signal("width_changed") -func set_alpha(val: float): - alpha = val - $VROverlayViewport/TextureRect.modulate.a = val - emit_signal("alpha_changed") +func set_overlay_scene(scene: PackedScene) -> void: + overlay_scene = scene + if not container: + return + if container.get_child_count() > 0: + container.get_child(0).queue_free() + container.add_child(overlay_scene.instance()) func reset_offset() -> void: @@ -161,15 +197,10 @@ func reset_offset() -> void: if current_target == "head": _offsets[current_target].pos.z = -0.5 update_offset() + save_settings() func _notification(what: int) -> void: if what == NOTIFICATION_TRANSFORM_CHANGED: + update_offset() emit_signal("offset_changed") - - -func get_property(p_name: String): - if OVERLAY_PROPERTIES.has(p_name): - return OVERLAY_PROPERTIES[p_name] - - return OverlayInit.OVERLAY_PROPERTIES_DEFAULT[p_name] diff --git a/src/addons/openvr_overlay/plugin.cfg b/ovr-utils/addons/openvr_overlay/plugin.cfg similarity index 100% rename from src/addons/openvr_overlay/plugin.cfg rename to ovr-utils/addons/openvr_overlay/plugin.cfg diff --git a/src/addons/ovr_utils/ovr_utils.gd b/ovr-utils/addons/ovr_utils/ovr_utils.gd similarity index 100% rename from src/addons/ovr_utils/ovr_utils.gd rename to ovr-utils/addons/ovr_utils/ovr_utils.gd diff --git a/src/addons/ovr_utils/ovr_utils_exporter.gd b/ovr-utils/addons/ovr_utils/ovr_utils_exporter.gd similarity index 100% rename from src/addons/ovr_utils/ovr_utils_exporter.gd rename to ovr-utils/addons/ovr_utils/ovr_utils_exporter.gd diff --git a/src/addons/ovr_utils/plugin.cfg b/ovr-utils/addons/ovr_utils/plugin.cfg similarity index 100% rename from src/addons/ovr_utils/plugin.cfg rename to ovr-utils/addons/ovr_utils/plugin.cfg diff --git a/src/addons/settings-manager/LICENSE b/ovr-utils/addons/settings-manager/LICENSE similarity index 100% rename from src/addons/settings-manager/LICENSE rename to ovr-utils/addons/settings-manager/LICENSE diff --git a/ovr-utils/addons/settings-manager/Settings.tscn b/ovr-utils/addons/settings-manager/Settings.tscn new file mode 100644 index 0000000..5ad12ee --- /dev/null +++ b/ovr-utils/addons/settings-manager/Settings.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://addons/settings-manager/settings.gd" type="Script" id=1] + +[node name="Settings" type="Node"] +script = ExtResource( 1 ) + +[node name="AutosaveTimer" type="Timer" parent="."] +wait_time = 300.0 +autostart = true + +[connection signal="timeout" from="AutosaveTimer" to="." method="_on_AutosaveTimer_timeout"] diff --git a/src/addons/settings-manager/plugin.cfg b/ovr-utils/addons/settings-manager/plugin.cfg similarity index 79% rename from src/addons/settings-manager/plugin.cfg rename to ovr-utils/addons/settings-manager/plugin.cfg index a2268b0..0a1f5cf 100644 --- a/src/addons/settings-manager/plugin.cfg +++ b/ovr-utils/addons/settings-manager/plugin.cfg @@ -4,4 +4,4 @@ name="SettingsManager" description="Simple settings manager for godot" author="CrispyPin" version="" -script="settings_plugin.gd" +script="settings_manager.gd" diff --git a/src/addons/settings-manager/settings_manager.gd b/ovr-utils/addons/settings-manager/settings.gd similarity index 73% rename from src/addons/settings-manager/settings_manager.gd rename to ovr-utils/addons/settings-manager/settings.gd index a6acf44..f256958 100644 --- a/src/addons/settings-manager/settings_manager.gd +++ b/ovr-utils/addons/settings-manager/settings.gd @@ -5,26 +5,16 @@ signal settings_loaded # emitted when settings are loaded from file, needs to be signal settings_changed # has to be manually called by the modifying script var DEBUG_SETTINGS = false -var SETTINGS_PATH = preload("res://settings_definition.gd").PATH -const SETTINGS_DEF = preload("res://settings_definition.gd").DEF +var SETTINGS_PATH = "user://overlay_data.json" +const SETTINGS_DEF = preload("res://addons/settings-manager/settings_definition.gd").DEF -var has_loaded := false -var s := {} -var _saved_hash: int +var s: Dictionary = {} func _ready() -> void: _init_settings() load_settings() - force_save() - - -func _on_SaveTimer_timeout() -> void: - var new_h: int = s.hash() - if new_h != _saved_hash: - _saved_hash = new_h - print("Saving to ", SETTINGS_PATH) - force_save() + save_settings() func _init_settings() -> void: @@ -47,7 +37,7 @@ func _init_sub_setting(def): return def.default -func force_save(): +func save_settings(): var to_save = {} for key in s: var val = _save_sub_setting(s[key], SETTINGS_DEF[key]) @@ -90,7 +80,6 @@ func _save_sub_setting(val, def): func load_settings() -> void: var file = File.new() - var validator: Script = preload("res://settings_validator.gd") if not file.file_exists(SETTINGS_PATH): if DEBUG_SETTINGS: @@ -101,16 +90,13 @@ func load_settings() -> void: var new_settings = parse_json(file.get_as_text()) file.close() - if validator.is_valid(new_settings): - for key in new_settings: - s[key] = _load_sub_setting(new_settings[key], SETTINGS_DEF[key]) - else: - print("Invalid or outdated config file, using defaults") + for key in new_settings: + s[key] = _load_sub_setting(new_settings[key], SETTINGS_DEF[key]) + emit_signal("settings_loaded") if DEBUG_SETTINGS: print("Loaded settings from file") - emit_signal("settings_loaded") - has_loaded = true +# print(s) func _load_sub_setting(val, def): @@ -125,10 +111,8 @@ func _load_sub_setting(val, def): var _s = {} var resize = has_flag(def, "resize") for key in val: - if resize: - _s[key] = _load_sub_setting(val[key], def.definition) - elif def.definition.has(key): - _s[key] = _load_sub_setting(val[key], def.definition[key]) + var subdef = def.definition if resize else def.definition[key] + _s[key] = _load_sub_setting(val[key], subdef) return _s _: return val @@ -139,4 +123,10 @@ func has_flag(def, flag): func _exit_tree() -> void: - force_save() + # save on quit + save_settings() + + +func _on_AutosaveTimer_timeout() -> void: + # auto saves every 5 minutes, saving should also be done manually + save_settings() diff --git a/src/settings_definition.gd b/ovr-utils/addons/settings-manager/settings_definition.gd similarity index 70% rename from src/settings_definition.gd rename to ovr-utils/addons/settings-manager/settings_definition.gd index f62d959..159dc86 100644 --- a/src/settings_definition.gd +++ b/ovr-utils/addons/settings-manager/settings_definition.gd @@ -1,14 +1,6 @@ extends Node -const VERSION = 1 - -const PATH = "user://overlay_data.json" const DEF = { - "version": { - "name": "Version of save file", - "type": "int", - "default": VERSION - }, "grab_mode": { "name": "Grab mode", "description": "Grab and drag around any overlay", @@ -23,10 +15,10 @@ const DEF = { "definition": { "type": "dict", "definition": { - "path": { - "name": "Overlay scene path", + "type": { + "name": "Overlay type", "type": "string", - "default": "res://special_overlays/UnknownType.tscn" + "default": "UI_demo" }, "visible": { "name": "Overlay Visible", @@ -35,14 +27,9 @@ const DEF = { }, "width": { "name": "Width (m)", - "type": "float", + "type": "number", "default": 0.4 }, - "alpha": { - "name": "Alpha", - "type": "float", - "default": 1.0 - }, "target": { "name": "Tracking target", "type": "string", @@ -78,20 +65,19 @@ const DEF = { }, "default": { "MainOverlay": { - "path": "res://special_overlays/MainOverlay.tscn", + "type": "MainOverlay", "visible": true, "width": 0.4, - "alpha": 1.0, "target": "left", "fallback": ["left", "right", "head"], "offsets": { "left": { - "pos": Vector3(0.15, 0.05, 0), - "rot": Quat(-0.653928, -0.023545, 0.008617, 0.756141), + "pos": Vector3(), + "rot": Quat(), }, "right": { - "pos": Vector3(-0.15, 0.05, 0), - "rot": Quat(-0.653928, -0.023545, 0.008617, 0.756141), + "pos": Vector3(), + "rot": Quat(), }, "head": { "pos": Vector3(0,0,-0.5), diff --git a/src/addons/settings-manager/settings_plugin.gd b/ovr-utils/addons/settings-manager/settings_manager.gd similarity index 100% rename from src/addons/settings-manager/settings_plugin.gd rename to ovr-utils/addons/settings-manager/settings_manager.gd diff --git a/src/default_env.tres b/ovr-utils/default_env.tres similarity index 100% rename from src/default_env.tres rename to ovr-utils/default_env.tres diff --git a/src/export_presets.cfg b/ovr-utils/export_presets.cfg similarity index 98% rename from src/export_presets.cfg rename to ovr-utils/export_presets.cfg index 6c24efb..a5e5b7b 100644 --- a/src/export_presets.cfg +++ b/ovr-utils/export_presets.cfg @@ -5,7 +5,7 @@ platform="Linux/X11" runnable=true custom_features="" export_filter="all_resources" -include_filter="*.json" +include_filter="" exclude_filter="" export_path="../builds/linux/ovr-utils.x86_64" script_export_mode=1 diff --git a/src/fonts/LICENSE.txt b/ovr-utils/fonts/LICENSE.txt similarity index 100% rename from src/fonts/LICENSE.txt rename to ovr-utils/fonts/LICENSE.txt diff --git a/src/fonts/OpenSans-Bold.ttf b/ovr-utils/fonts/OpenSans-Bold.ttf similarity index 100% rename from src/fonts/OpenSans-Bold.ttf rename to ovr-utils/fonts/OpenSans-Bold.ttf diff --git a/src/fonts/OpenSans-BoldItalic.ttf b/ovr-utils/fonts/OpenSans-BoldItalic.ttf similarity index 100% rename from src/fonts/OpenSans-BoldItalic.ttf rename to ovr-utils/fonts/OpenSans-BoldItalic.ttf diff --git a/src/fonts/OpenSans-ExtraBold.ttf b/ovr-utils/fonts/OpenSans-ExtraBold.ttf similarity index 100% rename from src/fonts/OpenSans-ExtraBold.ttf rename to ovr-utils/fonts/OpenSans-ExtraBold.ttf diff --git a/src/fonts/OpenSans-ExtraBoldItalic.ttf b/ovr-utils/fonts/OpenSans-ExtraBoldItalic.ttf similarity index 100% rename from src/fonts/OpenSans-ExtraBoldItalic.ttf rename to ovr-utils/fonts/OpenSans-ExtraBoldItalic.ttf diff --git a/src/fonts/OpenSans-Italic.ttf b/ovr-utils/fonts/OpenSans-Italic.ttf similarity index 100% rename from src/fonts/OpenSans-Italic.ttf rename to ovr-utils/fonts/OpenSans-Italic.ttf diff --git a/src/fonts/OpenSans-Light.ttf b/ovr-utils/fonts/OpenSans-Light.ttf similarity index 100% rename from src/fonts/OpenSans-Light.ttf rename to ovr-utils/fonts/OpenSans-Light.ttf diff --git a/src/fonts/OpenSans-LightItalic.ttf b/ovr-utils/fonts/OpenSans-LightItalic.ttf similarity index 100% rename from src/fonts/OpenSans-LightItalic.ttf rename to ovr-utils/fonts/OpenSans-LightItalic.ttf diff --git a/src/fonts/OpenSans-Regular.ttf b/ovr-utils/fonts/OpenSans-Regular.ttf similarity index 100% rename from src/fonts/OpenSans-Regular.ttf rename to ovr-utils/fonts/OpenSans-Regular.ttf diff --git a/src/fonts/OpenSans-SemiBold.ttf b/ovr-utils/fonts/OpenSans-SemiBold.ttf similarity index 100% rename from src/fonts/OpenSans-SemiBold.ttf rename to ovr-utils/fonts/OpenSans-SemiBold.ttf diff --git a/src/fonts/OpenSans-SemiBoldItalic.ttf b/ovr-utils/fonts/OpenSans-SemiBoldItalic.ttf similarity index 100% rename from src/fonts/OpenSans-SemiBoldItalic.ttf rename to ovr-utils/fonts/OpenSans-SemiBoldItalic.ttf diff --git a/src/icons/add.svg b/ovr-utils/icons/add.svg similarity index 100% rename from src/icons/add.svg rename to ovr-utils/icons/add.svg diff --git a/src/icons/add.svg.import b/ovr-utils/icons/add.svg.import similarity index 100% rename from src/icons/add.svg.import rename to ovr-utils/icons/add.svg.import diff --git a/src/icons/close.svg b/ovr-utils/icons/close.svg similarity index 100% rename from src/icons/close.svg rename to ovr-utils/icons/close.svg diff --git a/src/icons/close.svg.import b/ovr-utils/icons/close.svg.import similarity index 100% rename from src/icons/close.svg.import rename to ovr-utils/icons/close.svg.import diff --git a/src/icons/tracking/hand_r.svg b/ovr-utils/icons/hand_r.svg similarity index 100% rename from src/icons/tracking/hand_r.svg rename to ovr-utils/icons/hand_r.svg diff --git a/src/icons/alpha.svg.import b/ovr-utils/icons/hand_r.svg.import similarity index 71% rename from src/icons/alpha.svg.import rename to ovr-utils/icons/hand_r.svg.import index 81ca4fb..5d1d462 100644 --- a/src/icons/alpha.svg.import +++ b/ovr-utils/icons/hand_r.svg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/alpha.svg-22384cad50da35235f001642b0f4e493.stex" +path="res://.import/hand_r.svg-acd4ed4e6db8416fe852bbec606de215.stex" metadata={ "vram_texture": false } [deps] -source_file="res://icons/alpha.svg" -dest_files=[ "res://.import/alpha.svg-22384cad50da35235f001642b0f4e493.stex" ] +source_file="res://icons/hand_r.svg" +dest_files=[ "res://.import/hand_r.svg-acd4ed4e6db8416fe852bbec606de215.stex" ] [params] diff --git a/ovr-utils/icons/handle.svg b/ovr-utils/icons/handle.svg new file mode 100644 index 0000000..2a112e2 --- /dev/null +++ b/ovr-utils/icons/handle.svg @@ -0,0 +1 @@ + diff --git a/src/icons/tracking/hand_l.svg.import b/ovr-utils/icons/handle.svg.import similarity index 71% rename from src/icons/tracking/hand_l.svg.import rename to ovr-utils/icons/handle.svg.import index 8cd2f9a..df3a9f5 100644 --- a/src/icons/tracking/hand_l.svg.import +++ b/ovr-utils/icons/handle.svg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/hand_l.svg-439655c1d4ca8e4ecb241e9ecc5cb69b.stex" +path="res://.import/handle.svg-242cd3e4d69885cc43f9fb8909ecd878.stex" metadata={ "vram_texture": false } [deps] -source_file="res://icons/tracking/hand_l.svg" -dest_files=[ "res://.import/hand_l.svg-439655c1d4ca8e4ecb241e9ecc5cb69b.stex" ] +source_file="res://icons/handle.svg" +dest_files=[ "res://.import/handle.svg-242cd3e4d69885cc43f9fb8909ecd878.stex" ] [params] diff --git a/src/icons/hidden.svg b/ovr-utils/icons/hidden.svg similarity index 100% rename from src/icons/hidden.svg rename to ovr-utils/icons/hidden.svg diff --git a/src/icons/hidden.svg.import b/ovr-utils/icons/hidden.svg.import similarity index 100% rename from src/icons/hidden.svg.import rename to ovr-utils/icons/hidden.svg.import diff --git a/src/icons/list.svg b/ovr-utils/icons/list.svg similarity index 100% rename from src/icons/list.svg rename to ovr-utils/icons/list.svg diff --git a/src/icons/list.svg.import b/ovr-utils/icons/list.svg.import similarity index 100% rename from src/icons/list.svg.import rename to ovr-utils/icons/list.svg.import diff --git a/src/icons/move.svg b/ovr-utils/icons/move.svg similarity index 100% rename from src/icons/move.svg rename to ovr-utils/icons/move.svg diff --git a/src/icons/move.svg.import b/ovr-utils/icons/move.svg.import similarity index 100% rename from src/icons/move.svg.import rename to ovr-utils/icons/move.svg.import diff --git a/ovr-utils/icons/person.svg b/ovr-utils/icons/person.svg new file mode 100644 index 0000000..8fceaff --- /dev/null +++ b/ovr-utils/icons/person.svg @@ -0,0 +1 @@ + diff --git a/src/icons/tracking/person.svg.import b/ovr-utils/icons/person.svg.import similarity index 71% rename from src/icons/tracking/person.svg.import rename to ovr-utils/icons/person.svg.import index 7a59ae8..8a7d17e 100644 --- a/src/icons/tracking/person.svg.import +++ b/ovr-utils/icons/person.svg.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/person.svg-e934badec952647e74da4c1a4779da83.stex" +path="res://.import/person.svg-4e3fe005658ec640da7e201b9ff951d6.stex" metadata={ "vram_texture": false } [deps] -source_file="res://icons/tracking/person.svg" -dest_files=[ "res://.import/person.svg-e934badec952647e74da4c1a4779da83.stex" ] +source_file="res://icons/person.svg" +dest_files=[ "res://.import/person.svg-4e3fe005658ec640da7e201b9ff951d6.stex" ] [params] diff --git a/src/icons/remove.svg b/ovr-utils/icons/remove.svg similarity index 80% rename from src/icons/remove.svg rename to ovr-utils/icons/remove.svg index 08c01b6..5bcdf8e 100644 --- a/src/icons/remove.svg +++ b/ovr-utils/icons/remove.svg @@ -1 +1 @@ - + diff --git a/src/icons/remove.svg.import b/ovr-utils/icons/remove.svg.import similarity index 100% rename from src/icons/remove.svg.import rename to ovr-utils/icons/remove.svg.import diff --git a/src/icons/reset.svg b/ovr-utils/icons/reset.svg similarity index 100% rename from src/icons/reset.svg rename to ovr-utils/icons/reset.svg diff --git a/src/icons/reset.svg.import b/ovr-utils/icons/reset.svg.import similarity index 100% rename from src/icons/reset.svg.import rename to ovr-utils/icons/reset.svg.import diff --git a/src/icons/size.svg b/ovr-utils/icons/size.svg similarity index 100% rename from src/icons/size.svg rename to ovr-utils/icons/size.svg diff --git a/src/icons/size.svg.import b/ovr-utils/icons/size.svg.import similarity index 100% rename from src/icons/size.svg.import rename to ovr-utils/icons/size.svg.import diff --git a/src/icons/target.svg b/ovr-utils/icons/target.svg similarity index 67% rename from src/icons/target.svg rename to ovr-utils/icons/target.svg index e3e5df3..da7dfb0 100644 --- a/src/icons/target.svg +++ b/ovr-utils/icons/target.svg @@ -1 +1 @@ - + diff --git a/src/icons/target.svg.import b/ovr-utils/icons/target.svg.import similarity index 100% rename from src/icons/target.svg.import rename to ovr-utils/icons/target.svg.import diff --git a/src/icons/touch.svg b/ovr-utils/icons/touch.svg similarity index 84% rename from src/icons/touch.svg rename to ovr-utils/icons/touch.svg index 7759dae..aec0951 100644 --- a/src/icons/touch.svg +++ b/ovr-utils/icons/touch.svg @@ -1 +1 @@ - + diff --git a/src/icons/touch.svg.import b/ovr-utils/icons/touch.svg.import similarity index 100% rename from src/icons/touch.svg.import rename to ovr-utils/icons/touch.svg.import diff --git a/src/icons/visible.svg b/ovr-utils/icons/visible.svg similarity index 100% rename from src/icons/visible.svg rename to ovr-utils/icons/visible.svg diff --git a/src/icons/visible.svg.import b/ovr-utils/icons/visible.svg.import similarity index 100% rename from src/icons/visible.svg.import rename to ovr-utils/icons/visible.svg.import diff --git a/src/overlay_manager.gd b/ovr-utils/overlay_manager.gd similarity index 59% rename from src/overlay_manager.gd rename to ovr-utils/overlay_manager.gd index 6b1dea6..4ecc9b0 100644 --- a/src/overlay_manager.gd +++ b/ovr-utils/overlay_manager.gd @@ -2,7 +2,6 @@ extends Node signal added_overlay signal removed_overlay -signal grab_mode_changed var loaded := false @@ -20,34 +19,32 @@ func _load_overlays(): return loaded = true print("Loading in overlays") - for name in Settings.s.overlays: - if not name == "MainOverlay": - add_overlay(name) + for key in Settings.s.overlays: + if not key == "MainOverlay": + add_overlay(Settings.s.overlays[key].type, key) -func add_overlay(name): - print("Adding overlay '", name, "'") +func add_overlay(type, name): + var scene = load("res://overlays/" + type + ".tscn") + if not scene: + print("Unknown overlay type: '", type, "'. Skipping overlay '", name, "'") + return + print("Adding overlay '", name, "' of type '", type, "'") var instance = preload("res://addons/openvr_overlay/OverlayInstance.tscn").instance() instance.name = name - instance.path = Settings.s.overlays[name].path - instance.add_child(preload("res://OverlaySettingsSync.tscn").instance()) + instance.overlay_scene = scene + instance.type = type add_child(instance) + instance.update_offset() emit_signal("added_overlay", name) -func create_overlay(path, name): - Settings.s.overlays[name] = {} - Settings.s.overlays[name].path = path - add_overlay(name) - - func remove_overlay(name): - print("Removing overlay '", name, "'") var to_remove = get_node(name) if not to_remove: print("Could not remove overlay '", name, "'") return to_remove.queue_free() - Settings.s.overlays.erase(name) emit_signal("removed_overlay", name) - + Settings.s.overlays.erase(name) + Settings.save_settings() diff --git a/src/overlay_resources/battery.gd b/ovr-utils/overlay_scripts/battery.gd similarity index 100% rename from src/overlay_resources/battery.gd rename to ovr-utils/overlay_scripts/battery.gd diff --git a/ovr-utils/overlay_scripts/main_menu.gd b/ovr-utils/overlay_scripts/main_menu.gd new file mode 100644 index 0000000..ad059c3 --- /dev/null +++ b/ovr-utils/overlay_scripts/main_menu.gd @@ -0,0 +1,32 @@ +extends Control + + +func _ready() -> void: + OverlayManager.connect("added_overlay", self, "_add_overlay_to_list") + OverlayManager.connect("removed_overlay", self, "_remove_overlay_from_list") + for o in Settings.s.overlays: + if o != "MainOverlay": + _add_overlay_to_list(o) + $VSplitContainer/Control/Overlays.visible = false + + +func _add_overlay_to_list(name): + var new = preload("res://ui/ListOverlayItem.tscn").instance() + new.overlay_name = name + $VSplitContainer/Control/Overlays.add_child(new) + +func _remove_overlay_from_list(name): + $VSplitContainer/Control/Overlays.get_node(name).queue_free() + + +func _on_GrabMode_toggled(state: bool) -> void: + Settings.s.grab_mode = state + + +func _on_ShowOverlays_toggled(state: bool) -> void: + $VSplitContainer/Control/Overlays.visible = state + + +func _on_AddOverlay_pressed() -> void: + $VSplitContainer/Control/AddMenu.visible = !$VSplitContainer/Control/AddMenu.visible + diff --git a/src/overlay_resources/time.gd b/ovr-utils/overlay_scripts/time.gd similarity index 85% rename from src/overlay_resources/time.gd rename to ovr-utils/overlay_scripts/time.gd index 02459ef..dda958f 100644 --- a/src/overlay_resources/time.gd +++ b/ovr-utils/overlay_scripts/time.gd @@ -1,15 +1,11 @@ extends Label -const OVERLAY_PROPERTIES = { - -} - var _delay = 0 func _process(delta: float) -> void: _delay += delta - if _delay > 0.2: + if _delay > 0.5: update_time() _delay = 0 diff --git a/src/overlay_resources/ui_demo.gd b/ovr-utils/overlay_scripts/ui_demo.gd similarity index 55% rename from src/overlay_resources/ui_demo.gd rename to ovr-utils/overlay_scripts/ui_demo.gd index 4831f65..6fdd811 100644 --- a/src/overlay_resources/ui_demo.gd +++ b/ovr-utils/overlay_scripts/ui_demo.gd @@ -1,30 +1,25 @@ extends Control -const OVERLAY_PROPERTIES = { - "clickable": true, - "touchable": true, -} - -var grabber -var clicker +var ihandler var oinst func _ready() -> void: oinst = get_viewport().get_parent() - clicker = get_viewport().get_node("../OverlayInteraction/OverlayTouchCursor") - grabber = get_viewport().get_node("../OverlayInteraction/OverlayGrab") + ihandler = get_viewport().get_node("../OverlayInteraction/OverlayGrab") + if not oinst.add_cursor: + oinst.add_cursor() for t in oinst.TARGETS: $OptionButton.add_item(t) $OptionButton.selected = oinst.TARGETS.find(oinst.target) func _on_DragButton_button_down() -> void: - grabber.begin_move(clicker.active_side) + ihandler.begin_move() func _on_DragButton_button_up() -> void: - grabber.finish_move() + ihandler.finish_move() func _on_OptionButton_item_selected(index: int) -> void: diff --git a/src/overlays/BatteryLevel.tscn b/ovr-utils/overlays/BatteryLevel.tscn similarity index 61% rename from src/overlays/BatteryLevel.tscn rename to ovr-utils/overlays/BatteryLevel.tscn index b6b0283..0ddfc84 100644 --- a/src/overlays/BatteryLevel.tscn +++ b/ovr-utils/overlays/BatteryLevel.tscn @@ -1,20 +1,19 @@ [gd_scene load_steps=6 format=2] -[ext_resource path="res://overlay_resources/battery.gd" type="Script" id=1] +[ext_resource path="res://overlay_scripts/battery.gd" type="Script" id=1] [ext_resource path="res://fonts/OpenSans-Regular.ttf" type="DynamicFontData" id=2] -[sub_resource type="StyleBoxEmpty" id=4] +[sub_resource type="StyleBoxEmpty" id=3] -[sub_resource type="StyleBoxFlat" id=2] +[sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0, 0, 0, 0.705882 ) expand_margin_left = 8.0 expand_margin_right = 8.0 expand_margin_top = 8.0 expand_margin_bottom = 8.0 -[sub_resource type="DynamicFont" id=3] -size = 256 -use_filter = true +[sub_resource type="DynamicFont" id=2] +size = 128 font_data = ExtResource( 2 ) [node name="Overlay" type="Control"] @@ -27,38 +26,43 @@ __meta__ = { } [node name="PanelContainer" type="PanelContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -199.0 +margin_top = -94.5 +margin_right = 199.0 +margin_bottom = 94.5 grow_horizontal = 2 -custom_styles/panel = SubResource( 4 ) +custom_styles/panel = SubResource( 3 ) __meta__ = { "_edit_use_anchors_": false } [node name="CenterContainer" type="CenterContainer" parent="PanelContainer"] -margin_right = 2048.0 -margin_bottom = 2048.0 +margin_right = 398.0 +margin_bottom = 189.0 [node name="ColorRect" type="PanelContainer" parent="PanelContainer/CenterContainer"] -margin_left = 134.0 -margin_top = 849.0 -margin_right = 1914.0 -margin_bottom = 1198.0 +margin_left = 7.0 +margin_top = 7.0 +margin_right = 391.0 +margin_bottom = 182.0 grow_horizontal = 2 size_flags_horizontal = 0 -custom_styles/panel = SubResource( 2 ) +custom_styles/panel = SubResource( 1 ) __meta__ = { "_edit_use_anchors_": false } [node name="Label" type="Label" parent="PanelContainer/CenterContainer/ColorRect"] -margin_right = 1780.0 -margin_bottom = 349.0 +margin_right = 384.0 +margin_bottom = 175.0 size_flags_horizontal = 0 -custom_fonts/font = SubResource( 3 ) -text = "L: 10% R: 100%" +custom_fonts/font = SubResource( 2 ) +text = "L: 10%" align = 1 -valign = 1 script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false diff --git a/src/overlays/Clock.tscn b/ovr-utils/overlays/Clock.tscn similarity index 93% rename from src/overlays/Clock.tscn rename to ovr-utils/overlays/Clock.tscn index d485184..d594de1 100644 --- a/src/overlays/Clock.tscn +++ b/ovr-utils/overlays/Clock.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://overlay_resources/time.gd" type="Script" id=1] +[ext_resource path="res://overlay_scripts/time.gd" type="Script" id=1] [ext_resource path="res://fonts/OpenSans-Regular.ttf" type="DynamicFontData" id=2] [sub_resource type="StyleBoxFlat" id=1] diff --git a/src/overlays/UI_demo.tscn b/ovr-utils/overlays/UI_demo.tscn similarity index 68% rename from src/overlays/UI_demo.tscn rename to ovr-utils/overlays/UI_demo.tscn index 9f88f58..bb2e3b0 100644 --- a/src/overlays/UI_demo.tscn +++ b/ovr-utils/overlays/UI_demo.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=9 format=2] -[ext_resource path="res://overlay_resources/ui_demo.gd" type="Script" id=1] +[ext_resource path="res://overlay_scripts/ui_demo.gd" type="Script" id=1] [ext_resource path="res://fonts/OpenSans-Regular.ttf" type="DynamicFontData" id=2] [ext_resource path="res://fonts/OpenSans-Bold.ttf" type="DynamicFontData" id=3] -[ext_resource path="res://styles/menu.theme" type="Theme" id=4] [sub_resource type="DynamicFont" id=1] size = 100 @@ -12,10 +11,6 @@ font_data = ExtResource( 2 ) [sub_resource type="Theme" id=2] default_font = SubResource( 1 ) -[sub_resource type="DynamicFont" id=5] -size = 64 -font_data = ExtResource( 3 ) - [sub_resource type="StyleBoxFlat" id=3] bg_color = Color( 0.419608, 0.419608, 0.419608, 1 ) border_width_left = 16 @@ -27,10 +22,13 @@ corner_detail = 1 [sub_resource type="StyleBoxFlat" id=4] +[sub_resource type="DynamicFont" id=5] +size = 64 +font_data = ExtResource( 3 ) + [node name="Control" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 -theme = ExtResource( 4 ) script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false @@ -57,46 +55,15 @@ __meta__ = { margin_left = 335.0 margin_right = 650.0 margin_bottom = 143.0 -custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = SubResource( 5 ) custom_styles/pressed = SubResource( 3 ) custom_styles/normal = SubResource( 4 ) +custom_fonts/font = SubResource( 5 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Drag" __meta__ = { "_edit_use_anchors_": false } -[node name="Button" type="Button" parent="."] -margin_left = 80.8171 -margin_top = 242.452 -margin_right = 481.817 -margin_bottom = 433.452 -text = "aaaaa" - -[node name="Button2" type="Button" parent="."] -margin_left = 80.8171 -margin_top = 433.452 -margin_right = 481.817 -margin_bottom = 624.452 -text = "EEEEE" - -[node name="Button3" type="Button" parent="."] -margin_left = 650.0 -margin_top = 242.452 -margin_right = 1051.0 -margin_bottom = 433.452 -text = "aaaaa" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Button4" type="Button" parent="."] -margin_left = 650.0 -margin_top = 433.452 -margin_right = 1051.0 -margin_bottom = 624.452 -text = "EEEEE" - [connection signal="item_selected" from="OptionButton" to="." method="_on_OptionButton_item_selected"] [connection signal="button_down" from="DragButton" to="." method="_on_DragButton_button_down"] [connection signal="button_up" from="DragButton" to="." method="_on_DragButton_button_up"] diff --git a/src/project.godot b/ovr-utils/project.godot similarity index 58% rename from src/project.godot rename to ovr-utils/project.godot index d732527..55b23e9 100644 --- a/src/project.godot +++ b/ovr-utils/project.godot @@ -20,14 +20,7 @@ config/icon="res://textures/icon.png" Settings="*res://addons/settings-manager/Settings.tscn" OverlayInit="*res://addons/openvr_overlay/overlay_init.gd" -OverlayInteractionRoot="*res://addons/openvr_overlay/OverlayInteractionRoot.tscn" OverlayManager="*res://OverlayManager.tscn" -GDVK="*res://addons/gdvk/GDVK.tscn" - -[debug] - -gdscript/warnings/unused_signal=false -gdscript/warnings/return_value_discarded=false [display] @@ -36,22 +29,15 @@ window/size/height=2048 [editor_plugins] -enabled=PoolStringArray( "res://addons/gdvk/plugin.cfg", "res://addons/godot-openvr/plugin.cfg", "res://addons/openvr_overlay/plugin.cfg", "res://addons/ovr_utils/plugin.cfg", "res://addons/settings-manager/plugin.cfg" ) +enabled=PoolStringArray( "res://addons/godot-openvr/plugin.cfg", "res://addons/openvr_overlay/plugin.cfg", "res://addons/ovr_utils/plugin.cfg", "res://addons/settings-manager/plugin.cfg" ) [gdnative] singletons=[ "res://addons/godot-openvr/godot_openvr.gdnlib" ] -[layer_names] - -3d_physics/layer_2="right_hand" -3d_physics/layer_3="left_hand" -3d_physics/layer_4="right_touch" -3d_physics/layer_5="left_touch" - [physics] -3d/active_soft_world=false +common/enable_pause_aware_picking=true [rendering] diff --git a/src/styles/background.stylebox b/ovr-utils/styles/background.stylebox similarity index 100% rename from src/styles/background.stylebox rename to ovr-utils/styles/background.stylebox diff --git a/src/styles/buttons/normal.stylebox b/ovr-utils/styles/buttons/normal.stylebox similarity index 100% rename from src/styles/buttons/normal.stylebox rename to ovr-utils/styles/buttons/normal.stylebox diff --git a/src/styles/buttons/pressed.stylebox b/ovr-utils/styles/buttons/pressed.stylebox similarity index 100% rename from src/styles/buttons/pressed.stylebox rename to ovr-utils/styles/buttons/pressed.stylebox diff --git a/ovr-utils/styles/menu.theme b/ovr-utils/styles/menu.theme new file mode 100644 index 0000000..723bd16 Binary files /dev/null and b/ovr-utils/styles/menu.theme differ diff --git a/ovr-utils/styles/sliders/active.stylebox b/ovr-utils/styles/sliders/active.stylebox new file mode 100644 index 0000000..56089fe Binary files /dev/null and b/ovr-utils/styles/sliders/active.stylebox differ diff --git a/ovr-utils/styles/sliders/normal.stylebox b/ovr-utils/styles/sliders/normal.stylebox new file mode 100644 index 0000000..4cbdfaf Binary files /dev/null and b/ovr-utils/styles/sliders/normal.stylebox differ diff --git a/src/textures/icon.png b/ovr-utils/textures/icon.png similarity index 100% rename from src/textures/icon.png rename to ovr-utils/textures/icon.png diff --git a/src/textures/icon.png.import b/ovr-utils/textures/icon.png.import similarity index 100% rename from src/textures/icon.png.import rename to ovr-utils/textures/icon.png.import diff --git a/ovr-utils/ui/AddMenu.tscn b/ovr-utils/ui/AddMenu.tscn new file mode 100644 index 0000000..121f7b8 --- /dev/null +++ b/ovr-utils/ui/AddMenu.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://ui/add_menu.gd" type="Script" id=1] + +[node name="AddMenu" type="PanelContainer"] +anchor_top = 1.0 +anchor_bottom = 1.0 +margin_top = -78.0 +margin_right = 78.0 +grow_vertical = 0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer" type="MarginContainer" parent="."] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 71.0 +margin_bottom = 71.0 +custom_constants/margin_right = 32 +custom_constants/margin_top = 32 +custom_constants/margin_left = 32 +custom_constants/margin_bottom = 32 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +margin_left = 32.0 +margin_top = 32.0 +margin_right = 32.0 +margin_bottom = 32.0 +alignment = 2 diff --git a/ovr-utils/ui/AddOverlayButton.tscn b/ovr-utils/ui/AddOverlayButton.tscn new file mode 100644 index 0000000..7e6c13a --- /dev/null +++ b/ovr-utils/ui/AddOverlayButton.tscn @@ -0,0 +1,6 @@ +[gd_scene format=2] + +[node name="Button" type="Button"] +margin_top = 1950.0 +margin_right = 1970.0 +margin_bottom = 1970.0 diff --git a/src/ui/ListOverlayItem.tscn b/ovr-utils/ui/ListOverlayItem.tscn similarity index 57% rename from src/ui/ListOverlayItem.tscn rename to ovr-utils/ui/ListOverlayItem.tscn index 84d1a81..6742bff 100644 --- a/src/ui/ListOverlayItem.tscn +++ b/ovr-utils/ui/ListOverlayItem.tscn @@ -1,25 +1,16 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=12 format=2] [ext_resource path="res://ui/overlay_list_item.gd" type="Script" id=1] [ext_resource path="res://icons/remove.svg" type="Texture" id=2] [ext_resource path="res://icons/move.svg" type="Texture" id=3] [ext_resource path="res://icons/size.svg" type="Texture" id=4] [ext_resource path="res://icons/reset.svg" type="Texture" id=5] -[ext_resource path="res://icons/tracking/hand_r.svg" type="Texture" id=6] -[ext_resource path="res://icons/tracking/person.svg" type="Texture" id=7] +[ext_resource path="res://icons/hand_r.svg" type="Texture" id=6] +[ext_resource path="res://icons/person.svg" type="Texture" id=7] [ext_resource path="res://icons/visible.svg" type="Texture" id=8] [ext_resource path="res://styles/menu.theme" type="Theme" id=9] [ext_resource path="res://icons/list.svg" type="Texture" id=10] [ext_resource path="res://icons/close.svg" type="Texture" id=11] -[ext_resource path="res://icons/alpha.svg" type="Texture" id=12] -[ext_resource path="res://icons/tracking/hand_l.svg" type="Texture" id=13] -[ext_resource path="res://icons/tracking/world.svg" type="Texture" id=14] -[ext_resource path="res://icons/warning.svg" type="Texture" id=15] -[ext_resource path="res://fonts/OpenSans-Italic.ttf" type="DynamicFontData" id=16] - -[sub_resource type="DynamicFont" id=1] -size = 48 -font_data = ExtResource( 16 ) [node name="ListOverlayItem" type="MarginContainer"] margin_top = 1727.0 @@ -27,7 +18,9 @@ margin_right = 2048.0 margin_bottom = 1920.0 rect_min_size = Vector2( 100, 128 ) theme = ExtResource( 9 ) +custom_constants/margin_right = 8 custom_constants/margin_top = 8 +custom_constants/margin_left = 8 custom_constants/margin_bottom = 8 script = ExtResource( 1 ) __meta__ = { @@ -35,14 +28,15 @@ __meta__ = { } [node name="BasicOptions" type="PanelContainer" parent="."] +margin_left = 8.0 margin_top = 8.0 -margin_right = 2048.0 +margin_right = 2040.0 margin_bottom = 215.0 [node name="Label" type="Label" parent="BasicOptions"] margin_left = 8.0 margin_top = 16.0 -margin_right = 2040.0 +margin_right = 2024.0 margin_bottom = 191.0 text = "Main Menu" __meta__ = { @@ -52,53 +46,24 @@ __meta__ = { [node name="List" type="HBoxContainer" parent="BasicOptions"] margin_left = 8.0 margin_top = 8.0 -margin_right = 2040.0 +margin_right = 2024.0 margin_bottom = 199.0 alignment = 2 __meta__ = { "_edit_use_anchors_": false } -[node name="Warning" type="Button" parent="BasicOptions/List"] -visible = false -margin_left = 1316.0 -margin_right = 1492.0 -margin_bottom = 191.0 -toggle_mode = true -icon = ExtResource( 15 ) - -[node name="WarningInfo" type="PanelContainer" parent="BasicOptions/List/Warning"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = -191.0 -margin_top = -165.0 -margin_right = 122.0 -margin_bottom = -203.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Label" type="Label" parent="BasicOptions/List/Warning/WarningInfo"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 481.0 -margin_bottom = 145.0 -custom_fonts/font = SubResource( 1 ) -text = "res://overlays/not_real -not found" - [node name="Grab" type="Button" parent="BasicOptions/List"] -margin_left = 1496.0 -margin_right = 1672.0 +margin_left = 1480.0 +margin_right = 1656.0 margin_bottom = 191.0 focus_mode = 0 toggle_mode = true icon = ExtResource( 3 ) [node name="Visibility" type="Button" parent="BasicOptions/List"] -margin_left = 1676.0 -margin_right = 1852.0 +margin_left = 1660.0 +margin_right = 1836.0 margin_bottom = 191.0 focus_mode = 0 toggle_mode = true @@ -106,60 +71,52 @@ pressed = true icon = ExtResource( 8 ) [node name="Options" type="Button" parent="BasicOptions/List"] -margin_left = 1856.0 -margin_right = 2032.0 +margin_left = 1840.0 +margin_right = 2016.0 margin_bottom = 191.0 icon = ExtResource( 10 ) [node name="MoreOptions" type="HSplitContainer" parent="."] +margin_left = 8.0 margin_top = 8.0 -margin_right = 2048.0 +margin_right = 2040.0 margin_bottom = 215.0 [node name="Spacer" type="Control" parent="MoreOptions"] -margin_right = 760.0 +margin_right = 1104.0 margin_bottom = 207.0 size_flags_horizontal = 3 [node name="Container" type="PanelContainer" parent="MoreOptions"] -margin_left = 772.0 -margin_right = 2048.0 +margin_left = 1116.0 +margin_right = 2032.0 margin_bottom = 207.0 [node name="List" type="HBoxContainer" parent="MoreOptions/Container"] margin_left = 8.0 margin_top = 8.0 -margin_right = 1268.0 +margin_right = 908.0 margin_bottom = 199.0 alignment = 2 [node name="Remove" type="Button" parent="MoreOptions/Container/List"] margin_right = 176.0 margin_bottom = 191.0 -focus_mode = 0 icon = ExtResource( 2 ) -[node name="Grab" type="Button" parent="MoreOptions/Container/List"] +[node name="SetSize" type="Button" parent="MoreOptions/Container/List"] margin_left = 180.0 margin_right = 356.0 margin_bottom = 191.0 toggle_mode = true -icon = ExtResource( 3 ) - -[node name="SetSize" type="Button" parent="MoreOptions/Container/List"] -margin_left = 360.0 -margin_right = 536.0 -margin_bottom = 191.0 -focus_mode = 0 -toggle_mode = true icon = ExtResource( 4 ) [node name="PanelContainer" type="PanelContainer" parent="MoreOptions/Container/List/SetSize"] anchor_top = -0.016 anchor_right = 1.0 anchor_bottom = -0.016 -margin_top = -905.944 -margin_bottom = -6.944 +margin_top = -464.944 +margin_bottom = 0.0560002 __meta__ = { "_edit_use_anchors_": false } @@ -167,85 +124,44 @@ __meta__ = { [node name="SizeSlider" type="VSlider" parent="MoreOptions/Container/List/SetSize/PanelContainer"] margin_left = 8.0 margin_top = 8.0 -margin_right = 168.0 -margin_bottom = 891.0 +margin_right = 108.0 +margin_bottom = 457.0 min_value = 0.1 max_value = 1.0 step = 0.05 -value = 0.4 -scrollable = false -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="SetAlpha" type="Button" parent="MoreOptions/Container/List"] -margin_left = 540.0 -margin_right = 716.0 -margin_bottom = 191.0 -focus_mode = 0 -toggle_mode = true -icon = ExtResource( 12 ) - -[node name="PanelContainer" type="PanelContainer" parent="MoreOptions/Container/List/SetAlpha"] -anchor_top = -0.016 -anchor_right = 1.0 -anchor_bottom = -0.016 -margin_top = -455.944 -margin_bottom = -6.944 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="AlphaSlider" type="VSlider" parent="MoreOptions/Container/List/SetAlpha/PanelContainer"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 168.0 -margin_bottom = 441.0 -focus_mode = 0 -min_value = 0.3 -max_value = 1.0 -step = 0.1 -value = 1.0 -scrollable = false +value = 0.1 __meta__ = { "_edit_use_anchors_": false } [node name="Target" type="OptionButton" parent="MoreOptions/Container/List"] -margin_left = 720.0 -margin_right = 900.0 +margin_left = 360.0 +margin_right = 540.0 margin_bottom = 191.0 -focus_mode = 0 text = "Left" -icon = ExtResource( 13 ) +icon = ExtResource( 6 ) clip_text = true -items = [ "Head", ExtResource( 7 ), false, 0, null, "Left", ExtResource( 13 ), false, 1, null, "Right", ExtResource( 6 ), false, 2, null, "World", ExtResource( 14 ), false, 3, null ] +items = [ "Head", ExtResource( 7 ), false, 0, null, "Left", ExtResource( 6 ), false, 1, null, "Right", ExtResource( 6 ), false, 2, null, "World", ExtResource( 3 ), false, 3, null ] selected = 1 [node name="Reset" type="Button" parent="MoreOptions/Container/List"] -margin_left = 904.0 -margin_right = 1080.0 +margin_left = 544.0 +margin_right = 720.0 margin_bottom = 191.0 -focus_mode = 0 icon = ExtResource( 5 ) [node name="CloseOptions" type="Button" parent="MoreOptions/Container/List"] -margin_left = 1084.0 -margin_right = 1260.0 +margin_left = 724.0 +margin_right = 900.0 margin_bottom = 191.0 -focus_mode = 0 icon = ExtResource( 11 ) -[connection signal="toggled" from="BasicOptions/List/Warning" to="." method="_on_Warning_toggled"] [connection signal="toggled" from="BasicOptions/List/Grab" to="." method="_on_Grab_toggled"] [connection signal="toggled" from="BasicOptions/List/Visibility" to="." method="_on_Visibility_toggled"] [connection signal="pressed" from="BasicOptions/List/Options" to="." method="_on_Options_pressed"] [connection signal="pressed" from="MoreOptions/Container/List/Remove" to="." method="_on_Remove_pressed"] -[connection signal="toggled" from="MoreOptions/Container/List/Grab" to="." method="_on_Grab_toggled"] [connection signal="toggled" from="MoreOptions/Container/List/SetSize" to="." method="_on_SetSize_toggled"] [connection signal="value_changed" from="MoreOptions/Container/List/SetSize/PanelContainer/SizeSlider" to="." method="_on_SizeSlider_value_changed"] -[connection signal="toggled" from="MoreOptions/Container/List/SetAlpha" to="." method="_on_SetAlpha_toggled"] -[connection signal="value_changed" from="MoreOptions/Container/List/SetAlpha/PanelContainer/AlphaSlider" to="." method="_on_AlphaSlider_value_changed"] [connection signal="item_selected" from="MoreOptions/Container/List/Target" to="." method="_on_Target_item_selected"] [connection signal="pressed" from="MoreOptions/Container/List/Reset" to="." method="_on_Reset_pressed"] [connection signal="pressed" from="MoreOptions/Container/List/CloseOptions" to="." method="_on_CloseOptions_pressed"] diff --git a/ovr-utils/ui/MainOverlay.tscn b/ovr-utils/ui/MainOverlay.tscn new file mode 100644 index 0000000..47f6710 --- /dev/null +++ b/ovr-utils/ui/MainOverlay.tscn @@ -0,0 +1,81 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://overlay_scripts/main_menu.gd" type="Script" id=1] +[ext_resource path="res://styles/menu.theme" type="Theme" id=2] +[ext_resource path="res://ui/AddMenu.tscn" type="PackedScene" id=3] +[ext_resource path="res://icons/add.svg" type="Texture" id=4] +[ext_resource path="res://icons/move.svg" type="Texture" id=5] +[ext_resource path="res://icons/list.svg" type="Texture" id=6] +[ext_resource path="res://ui/ListOverlayItem.tscn" type="PackedScene" id=7] + +[node name="MainOverlay" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 2 ) +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VSplitContainer" type="VSplitContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Control" type="Control" parent="VSplitContainer"] +margin_right = 2048.0 +margin_bottom = 1845.0 +size_flags_vertical = 3 + +[node name="Overlays" type="VBoxContainer" parent="VSplitContainer/Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_vertical = 3 +alignment = 2 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ListOverlayItem" parent="VSplitContainer/Control/Overlays" instance=ExtResource( 7 )] +margin_top = 1622.0 +margin_bottom = 1845.0 +overlay_name = "MainOverlay" + +[node name="AddMenu" parent="VSplitContainer/Control" instance=ExtResource( 3 )] +visible = false + +[node name="MainBar" type="HBoxContainer" parent="VSplitContainer"] +margin_top = 1857.0 +margin_right = 2048.0 +margin_bottom = 2048.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ShowOverlays" type="Button" parent="VSplitContainer/MainBar"] +margin_right = 176.0 +margin_bottom = 191.0 +focus_mode = 0 +toggle_mode = true +icon = ExtResource( 6 ) + +[node name="GrabMode" type="Button" parent="VSplitContainer/MainBar"] +margin_left = 180.0 +margin_right = 356.0 +margin_bottom = 191.0 +focus_mode = 0 +toggle_mode = true +icon = ExtResource( 5 ) + +[node name="AddOverlay" type="Button" parent="VSplitContainer/MainBar"] +margin_left = 360.0 +margin_right = 536.0 +margin_bottom = 191.0 +focus_mode = 0 +icon = ExtResource( 4 ) + +[connection signal="toggled" from="VSplitContainer/MainBar/ShowOverlays" to="." method="_on_ShowOverlays_toggled"] +[connection signal="toggled" from="VSplitContainer/MainBar/GrabMode" to="." method="_on_GrabMode_toggled"] +[connection signal="pressed" from="VSplitContainer/MainBar/AddOverlay" to="." method="_on_AddOverlay_pressed"] diff --git a/ovr-utils/ui/add_menu.gd b/ovr-utils/ui/add_menu.gd new file mode 100644 index 0000000..a20e4e2 --- /dev/null +++ b/ovr-utils/ui/add_menu.gd @@ -0,0 +1,36 @@ +extends Control + + +var types: Array + +func _ready() -> void: + visible = false + types = get_overlay_types() + for t in types: + var btn = preload("res://ui/AddOverlayButton.tscn").instance() + btn.text = t + btn.connect("pressed", self, "add_overlay", [t]) + $MarginContainer/VBoxContainer.add_child(btn) + + +func add_overlay(type): + OverlayManager.add_overlay(type, type + " " + str(randi()%1000)) + visible = false + + +func get_overlay_types(path := "res://overlays/"): + var found = [] + var dir = Directory.new() + if dir.open(path) == OK: + dir.list_dir_begin(true) + var file_name = dir.get_next() + while file_name != "": + if dir.current_is_dir(): + # TODO make recursive, must include folder as prefix for type + pass + else: + found.append(file_name.split(".")[0]) + file_name = dir.get_next() + else: + print("An error occurred when trying to access the path ", path) + return found diff --git a/src/ui/overlay_list_item.gd b/ovr-utils/ui/overlay_list_item.gd similarity index 51% rename from src/ui/overlay_list_item.gd rename to ovr-utils/ui/overlay_list_item.gd index 7403af7..bc61081 100644 --- a/src/ui/overlay_list_item.gd +++ b/ovr-utils/ui/overlay_list_item.gd @@ -5,44 +5,24 @@ var overlay func _ready() -> void: overlay = OverlayManager.get_node(overlay_name) - overlay.get_node("OverlaySettingsSync").connect("loaded_settings", self, "_apply_loaded") - $MoreOptions/Container/List/SetSize/PanelContainer.visible = false - $MoreOptions/Container/List/SetAlpha/PanelContainer.visible = false $MoreOptions.visible = false - $BasicOptions/Label.text = overlay_name name = overlay_name - overlay.connect("overlay_visible_changed", self, "_overlay_visible_changed") - - -func _apply_loaded(): - $MoreOptions/Container/List/SetSize/PanelContainer/SizeSlider.value = overlay.width_meters - $MoreOptions/Container/List/Target.selected = overlay.TARGETS.find(overlay.target) - $MoreOptions/Container/List/SetAlpha/PanelContainer/AlphaSlider.value = overlay.alpha - _overlay_visible_changed(overlay.overlay_visible) - _update_warning() - - -func _update_warning(): - $BasicOptions/List/Warning.visible = overlay.path_invalid - $BasicOptions/List/Warning/WarningInfo/Label.text = overlay.path + "\nnot found" + $MoreOptions/Container/List/Target.selected = overlay.TARGETS.find(Settings.s.overlays[overlay_name].target) + overlay.connect("overlay_visibility_changed", self, "_overlay_visibility_changed") func _on_Visibility_toggled(state: bool) -> void: - if overlay.get_property("allow_hide"): + if overlay.type and overlay.type != "main": overlay.overlay_visible = state - else: - overlay.overlay_visible = true func _on_Grab_toggled(state: bool) -> void: overlay.get_node("OverlayInteraction").grab_mode = state - $BasicOptions/List/Grab.pressed = state - $MoreOptions/Container/List/Grab.pressed = state -func _overlay_visible_changed(state: bool): +func _overlay_visibility_changed(state: bool): $BasicOptions/List/Visibility.pressed = state if state: $BasicOptions/List/Visibility.icon = preload("res://icons/visible.svg") @@ -51,13 +31,12 @@ func _overlay_visible_changed(state: bool): func _on_Remove_pressed() -> void: - if overlay.get_property("allow_delete"): + if overlay.type and overlay.type != "main": OverlayManager.remove_overlay(overlay_name) func _on_Reset_pressed() -> void: overlay.reset_offset() - _on_Grab_toggled(true) func _on_Target_item_selected(index: int) -> void: @@ -76,18 +55,5 @@ func _on_SetSize_toggled(state: bool) -> void: $MoreOptions/Container/List/SetSize/PanelContainer.visible = state -func _on_SetAlpha_toggled(state: bool) -> void: - $MoreOptions/Container/List/SetAlpha/PanelContainer.visible = state - - func _on_SizeSlider_value_changed(value: float) -> void: overlay.width_meters = value - - -func _on_AlphaSlider_value_changed(value: float) -> void: - overlay.alpha = value - - -func _on_Warning_toggled(state: bool) -> void: - $BasicOptions/List/Warning/WarningInfo.visible = state - diff --git a/src/Main.tscn b/src/Main.tscn deleted file mode 100644 index 123ab04..0000000 --- a/src/Main.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene format=2] - -[node name="Main" type="Node"] -__meta__ = { -"_editor_description_": "Everything is loaded using autoloads so this scene is just a dummy" -} diff --git a/src/OverlaySettingsSync.tscn b/src/OverlaySettingsSync.tscn deleted file mode 100644 index 45c2bf8..0000000 --- a/src/OverlaySettingsSync.tscn +++ /dev/null @@ -1,12 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://overlay_settings_sync.gd" type="Script" id=1] - -[node name="OverlaySettingsSync" type="Node"] -script = ExtResource( 1 ) - -[node name="SyncTimer" type="Timer" parent="."] -wait_time = 0.2 -autostart = true - -[connection signal="timeout" from="SyncTimer" to="." method="_on_SyncTimer_timeout"] diff --git a/src/addons/gdvk/GDVK.tscn b/src/addons/gdvk/GDVK.tscn deleted file mode 100644 index 24c3c32..0000000 --- a/src/addons/gdvk/GDVK.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/gdvk/gdvk.gdns" type="Script" id=1] - -[node name="GDVK" type="Node"] -script = ExtResource( 1 ) diff --git a/src/addons/gdvk/bin/x11/libgdvk.so b/src/addons/gdvk/bin/x11/libgdvk.so deleted file mode 100755 index 5f9df7e..0000000 Binary files a/src/addons/gdvk/bin/x11/libgdvk.so and /dev/null differ diff --git a/src/addons/gdvk/gdvk.gdnlib b/src/addons/gdvk/gdvk.gdnlib deleted file mode 100644 index 5c71e68..0000000 --- a/src/addons/gdvk/gdvk.gdnlib +++ /dev/null @@ -1,17 +0,0 @@ -[general] - -singleton=false -load_once=true -symbol_prefix="gdvk_" -reloadable=true - -[entry] - -X11.64="res://addons/gdvk/bin/x11/libgdvk.so" -Windows.64="res://addons/gdvk/bin/win64/libgdvk.dll" - -[dependencies] - -X11.64=[ ] -Windows.64=[ ] -OSX.64=[ ] diff --git a/src/addons/gdvk/gdvk.gdns b/src/addons/gdvk/gdvk.gdns deleted file mode 100644 index 4b84e82..0000000 --- a/src/addons/gdvk/gdvk.gdns +++ /dev/null @@ -1,8 +0,0 @@ -[gd_resource type="NativeScript" load_steps=2 format=2] - -[ext_resource path="res://addons/gdvk/gdvk.gdnlib" type="GDNativeLibrary" id=1] - -[resource] -resource_name = "gdvk" -class_name = "GDVK" -library = ExtResource( 1 ) diff --git a/src/addons/gdvk/gdvk_plugin.gd b/src/addons/gdvk/gdvk_plugin.gd deleted file mode 100644 index 3ff0173..0000000 --- a/src/addons/gdvk/gdvk_plugin.gd +++ /dev/null @@ -1,10 +0,0 @@ -tool -extends EditorPlugin - - -func _enter_tree() -> void: - add_autoload_singleton("GDVK", "res://addons/gdvk/GDVK.tscn") - - -func _exit_tree() -> void: - remove_autoload_singleton("GDVK") diff --git a/src/addons/gdvk/plugin.cfg b/src/addons/gdvk/plugin.cfg deleted file mode 100644 index 4315d7b..0000000 --- a/src/addons/gdvk/plugin.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[plugin] - -name="GDVK" -description="Godot virtual keyboard plugin - -see https://github.com/CrispyPin/gdvk" -author="CrispyPin" -version="0.1.0" -script="gdvk_plugin.gd" diff --git a/src/addons/godot-openvr/bin/win64/libgodot_openvr.dll b/src/addons/godot-openvr/bin/win64/libgodot_openvr.dll deleted file mode 100644 index 88d1bfb..0000000 Binary files a/src/addons/godot-openvr/bin/win64/libgodot_openvr.dll and /dev/null differ diff --git a/src/addons/godot-openvr/bin/x11/libgodot_openvr.so b/src/addons/godot-openvr/bin/x11/libgodot_openvr.so deleted file mode 100755 index 844e078..0000000 Binary files a/src/addons/godot-openvr/bin/x11/libgodot_openvr.so and /dev/null differ diff --git a/src/addons/godot-openvr/bin/x11/libopenvr_api.so b/src/addons/godot-openvr/bin/x11/libopenvr_api.so deleted file mode 100644 index 1e035ae..0000000 Binary files a/src/addons/godot-openvr/bin/x11/libopenvr_api.so and /dev/null differ diff --git a/src/addons/openvr_overlay/OverlayInteractionRoot.tscn b/src/addons/openvr_overlay/OverlayInteractionRoot.tscn deleted file mode 100644 index 912f27d..0000000 --- a/src/addons/openvr_overlay/OverlayInteractionRoot.tscn +++ /dev/null @@ -1,25 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/openvr_overlay/interaction/HandCollider.tscn" type="PackedScene" id=1] - -[node name="OverlayInteractionRoot" type="Node"] - -[node name="VR" type="ARVROrigin" parent="."] - -[node name="left" type="ARVRController" parent="VR"] - -[node name="HandCollider" parent="VR/left" groups=[ -"left", -] instance=ExtResource( 1 )] -collision_layer = 20 - -[node name="right" type="ARVRController" parent="VR"] -controller_id = 2 - -[node name="HandCollider" parent="VR/right" groups=[ -"right", -] instance=ExtResource( 1 )] -collision_layer = 10 - -[node name="head" type="ARVRCamera" parent="VR"] -visible = false diff --git a/src/addons/openvr_overlay/interaction/OverlayArea.tscn b/src/addons/openvr_overlay/interaction/OverlayArea.tscn deleted file mode 100644 index 137fc12..0000000 --- a/src/addons/openvr_overlay/interaction/OverlayArea.tscn +++ /dev/null @@ -1,27 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[sub_resource type="BoxShape" id=1] -resource_local_to_scene = true -extents = Vector3( 0.2, 0.2, 0.1 ) - -[sub_resource type="BoxShape" id=2] -resource_local_to_scene = true -extents = Vector3( 0.2, 0.2, 0.01 ) - -[node name="OverlayArea" type="Spatial"] - -[node name="AreaNear" type="Area" parent="."] -monitorable = false -collision_layer = 0 -collision_mask = 6 - -[node name="CollisionShape" type="CollisionShape" parent="AreaNear"] -shape = SubResource( 1 ) - -[node name="AreaTouch" type="Area" parent="."] -monitorable = false -collision_layer = 0 -collision_mask = 24 - -[node name="CollisionShape" type="CollisionShape" parent="AreaTouch"] -shape = SubResource( 2 ) diff --git a/src/addons/openvr_overlay/interaction/mod/Clickable.tscn b/src/addons/openvr_overlay/interaction/mod/Clickable.tscn deleted file mode 100644 index 0930847..0000000 --- a/src/addons/openvr_overlay/interaction/mod/Clickable.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/openvr_overlay/interaction/mod/clickable.gd" type="Script" id=1] - -[node name="Clickable" type="Node"] -script = ExtResource( 1 ) diff --git a/src/addons/openvr_overlay/interaction/mod/Grabbable.tscn b/src/addons/openvr_overlay/interaction/mod/Grabbable.tscn deleted file mode 100644 index 41a9f85..0000000 --- a/src/addons/openvr_overlay/interaction/mod/Grabbable.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/openvr_overlay/interaction/mod/grabbable.gd" type="Script" id=1] - -[node name="Grabbable" type="Node"] -script = ExtResource( 1 ) diff --git a/src/addons/openvr_overlay/interaction/mod/Touchable.tscn b/src/addons/openvr_overlay/interaction/mod/Touchable.tscn deleted file mode 100644 index f75ed18..0000000 --- a/src/addons/openvr_overlay/interaction/mod/Touchable.tscn +++ /dev/null @@ -1,7 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/openvr_overlay/interaction/mod/clickable.gd" type="Script" id=1] - -[node name="Touchable" type="Node"] -script = ExtResource( 1 ) -is_touch = true diff --git a/src/addons/openvr_overlay/interaction/mod/clickable.gd b/src/addons/openvr_overlay/interaction/mod/clickable.gd deleted file mode 100644 index f13b674..0000000 --- a/src/addons/openvr_overlay/interaction/mod/clickable.gd +++ /dev/null @@ -1,109 +0,0 @@ -extends Node - -export var is_touch := false - -onready var viewport: Viewport = get_node("../../OverlayViewport") -onready var _i = get_parent() - -var cursor_pos := { - "right": Vector2(), - "left": Vector2(), -} -var prev_pos := { - "right": Vector2(), - "left": Vector2(), -} -var click := { - "right": false, - "left": false, -} -var active_side := "" - -var cursor_nodes := { - "right": preload("res://addons/openvr_overlay/interaction/Cursor.tscn").instance(), - "left": preload("res://addons/openvr_overlay/interaction/Cursor.tscn").instance(), -} - -func _ready() -> void: - viewport.add_child(cursor_nodes.right) - viewport.add_child(cursor_nodes.left) - if is_touch: - get_parent().connect("touch_on", self, "_trigger_on") - get_parent().connect("touch_off", self, "_trigger_off") - else: - get_parent().connect("trigger_on", self, "_trigger_on") - get_parent().connect("trigger_off", self, "_trigger_off") - - -func _process(delta: float) -> void: - cursor_pos.right = get_canvas_pos("right") - cursor_pos.left = get_canvas_pos("left") - _update_cursors() -# _send_move_event() - prev_pos = cursor_pos.duplicate(true) - - - -# get canvas position of controller -func get_canvas_pos(controller) -> Vector2: - var controller_local_pos = _i._overlay_area.global_transform.xform_inv(\ - _i.tracker_nodes[controller].translation) - var pos = Vector2(controller_local_pos.x, controller_local_pos.y) - - var overlay_size = Vector2(2048, 2048) - # scale to pixels - pos *= overlay_size.x - pos /= _i.get_parent().width_meters - # adjust to center - pos.y *= -1 - pos += overlay_size * 0.5 - return pos - - -func _update_cursors(): - cursor_nodes.right.visible = _i.state.right.near - cursor_nodes.left.visible = _i.state.left.near - cursor_nodes.right.rect_position = cursor_pos.right - cursor_nodes.left.rect_position = cursor_pos.left - - -func _send_move_event(): - if not active_side: - return# only send move events while a cursor is held down - - var event = InputEventMouseMotion.new() - event.position = prev_pos[active_side] - event.relative = cursor_pos[active_side] - prev_pos[active_side] - event.speed = event.relative - viewport.input(event) - - -func _send_click_event(state: bool, controller: String): - if click[controller] == state: - return # already in that state - click[controller] = state - _update_active_side() - var click_event = InputEventMouseButton.new() - click_event.position = cursor_pos[controller] - click_event.pressed = state - click_event.button_index = 1 - viewport.input(click_event) -# print("SENT EVENT ", click_event.position, " -- ", click_event.pressed) - - -func _trigger_on(controller): - if click.right or click.left: - return - _send_click_event(true, controller) - - -func _trigger_off(controller): - _send_click_event(false, controller) - -func _update_active_side() -> void: - if click.right: - active_side = "right" - elif click.left: - active_side = "left" - else: - active_side = "" diff --git a/src/addons/openvr_overlay/interaction/overlay_interaction.gd b/src/addons/openvr_overlay/interaction/overlay_interaction.gd deleted file mode 100644 index 693466a..0000000 --- a/src/addons/openvr_overlay/interaction/overlay_interaction.gd +++ /dev/null @@ -1,188 +0,0 @@ -extends Node - - -signal near_on # a controller entered the near area (enable cursor and/or touch visualiser) -signal near_off # a controller exited -signal touch_on -signal touch_off -signal trigger_on # trigger pushed while touching -signal trigger_off # trigger released - -var grab_mode := false setget set_grab_mode - -# reference to the area node thats used for touch -var _overlay_area: Spatial# = preload("res://addons/openvr_overlay/interaction/OverlayArea.tscn").instance() -var _right_is_activator := false # this hand has a collider on it to trigger things on the overlay -var _left_is_activator := false - -var pause_triggers := false # disable triggers updating (used by grab module) - -var state := { - "right": { - "active": false, - "near": false, - "touch": false, - "trigger": false, - }, - "left": { - "active": false, - "near": false, - "touch": false, - "trigger": false, - }, -} - - -onready var tracker_nodes = { - "head": $VR/head, - "left": $VR/left, - "right": $VR/right, - "world": $VR -} - - -func _ready() -> void: - _overlay_area = $OverlayArea - _overlay_area.get_node("AreaNear"). connect("area_entered", self, "_on_Near_entered") - _overlay_area.get_node("AreaNear"). connect("area_exited", self, "_on_Near_exited") - _overlay_area.get_node("AreaTouch").connect("area_entered", self, "_on_Touch_entered") - _overlay_area.get_node("AreaTouch").connect("area_exited", self, "_on_Touch_exited") - - get_parent().connect("width_changed", self, "_update_width") - get_parent().connect("offset_changed", self, "_update_offset") - get_parent().connect("target_changed", self, "_update_target") - - OverlayManager.connect("grab_mode_changed", self, "update_selection") - - call_deferred("_update_width") - call_deferred("_update_offset") - call_deferred("_update_target") - - -func _trigger_on(controller): - if state[controller].near: - state[controller].trigger = true -# print("TRIGGER ON ", controller) - emit_signal("trigger_on", controller) - - -func _trigger_off(controller): - state[controller].trigger = false -# print("TRIGGER OFF ", controller) - emit_signal("trigger_off", controller) - - -func _on_Near_entered(body: Node) -> void: - if pause_triggers or !get_parent().overlay_visible: - return - var hand = body.get_groups()[0] - state[hand].near = true - update_selection() -# print("NEAR ON ", hand) - emit_signal("near_on") - - -func _on_Near_exited(body: Node) -> void: - if pause_triggers or !get_parent().overlay_visible: - return - var hand = body.get_groups()[0] - state[hand].near = false - -# print("NEAR OFF ", hand) - update_selection() - emit_signal("near_off") - - -func _on_Touch_entered(body: Node) -> void: - if pause_triggers or !get_parent().overlay_visible: - return - var hand = body.get_groups()[0] - state[hand].touch = true - update_selection() -# print("TOUCH ON ", hand) - emit_signal("touch_on", hand) - - -func _on_Touch_exited(body: Node) -> void: - if pause_triggers or !get_parent().overlay_visible: - return - var hand = body.get_groups()[0] - state[hand].touch = false - update_selection() -# print("TOUCH OFF ", hand) - emit_signal("touch_off", hand) - - -func update_selection(): - var sel = (Settings.s.grab_mode or grab_mode) - sel = sel and (state.right.near or state.left.near) - get_parent().get_node("OverlayViewport/Selected").visible = sel - - -func set_grab_mode(state: bool) -> void: - grab_mode = state - update_selection() - - -func _update_width(): - var ratio = OverlayInit.ovr_interface.get_render_targetsize() - var extents = get_parent().width_meters * 0.5 - _overlay_area.get_node("AreaNear/CollisionShape").shape.set_extents( - Vector3(extents, extents * ratio.y/ratio.x, 0.1)) - _overlay_area.get_node("AreaTouch/CollisionShape").shape.set_extents( - Vector3(extents, extents * ratio.y/ratio.x, 0.01)) - - -func _update_offset(): - _overlay_area.translation = get_parent().translation - _overlay_area.rotation = get_parent().rotation - - -func _update_target(): - var t = get_parent().current_target - # reparent _overlay_area - _overlay_area.get_parent().remove_child(_overlay_area) - tracker_nodes[t].add_child(_overlay_area) - - state.right.active = t != "right" - state.left.active = t != "left" - # make area only detect colliders of a different hand - _overlay_area.get_node("AreaNear").collision_mask = int(t!="right")*2 # detect right hand - _overlay_area.get_node("AreaNear").collision_mask += int(t!="left")*4 # detect left hand - _overlay_area.get_node("AreaNear").collision_mask = int(t!="right")*8 # detect right hand - _overlay_area.get_node("AreaNear").collision_mask += int(t!="left")*16 # detect left hand - - -# called by overlay_instance after properties are loaded and before overlay scene enters the tree -func spawn_modules(): - if get_parent().get_property("grabbable"): - var module = preload("res://addons/openvr_overlay/interaction/mod/Grabbable.tscn") - add_child(module.instance()) - - if get_parent().get_property("clickable"): - var module = preload("res://addons/openvr_overlay/interaction/mod/Clickable.tscn") - add_child(module.instance()) - - if get_parent().get_property("touchable"): - var module = preload("res://addons/openvr_overlay/interaction/mod/Touchable.tscn") - add_child(module.instance()) - - -func _on_RightHand_button_pressed(button: int) -> void: - if button == JOY_VR_TRIGGER and state.right.active: - _trigger_on("right") - - -func _on_RightHand_button_release(button: int) -> void: - if button == JOY_VR_TRIGGER and state.right.trigger: - _trigger_off("right") - - -func _on_LeftHand_button_pressed(button: int) -> void: - if button == JOY_VR_TRIGGER and state.left.active: - _trigger_on("left") - - -func _on_LeftHand_button_release(button: int) -> void: - if button == JOY_VR_TRIGGER and state.left.trigger: - _trigger_off("left") diff --git a/src/addons/settings-manager/Settings.tscn b/src/addons/settings-manager/Settings.tscn deleted file mode 100644 index c6aada0..0000000 --- a/src/addons/settings-manager/Settings.tscn +++ /dev/null @@ -1,11 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/settings-manager/settings_manager.gd" type="Script" id=1] - -[node name="Settings" type="Node"] -script = ExtResource( 1 ) - -[node name="SaveTimer" type="Timer" parent="."] -autostart = true - -[connection signal="timeout" from="SaveTimer" to="." method="_on_SaveTimer_timeout"] diff --git a/src/icons/alpha.svg b/src/icons/alpha.svg deleted file mode 100644 index 109911d..0000000 --- a/src/icons/alpha.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/icons/slider_handle.svg b/src/icons/slider_handle.svg deleted file mode 100644 index 11e0390..0000000 --- a/src/icons/slider_handle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/icons/slider_handle.svg.import b/src/icons/slider_handle.svg.import deleted file mode 100644 index d2a239c..0000000 --- a/src/icons/slider_handle.svg.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/slider_handle.svg-a6a99aef20e26beab0e4cd9cc3df1fc7.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icons/slider_handle.svg" -dest_files=[ "res://.import/slider_handle.svg-a6a99aef20e26beab0e4cd9cc3df1fc7.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=10.0 diff --git a/src/icons/tracking/hand_l.svg b/src/icons/tracking/hand_l.svg deleted file mode 100644 index 24cde54..0000000 --- a/src/icons/tracking/hand_l.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/icons/tracking/hand_r.svg.import b/src/icons/tracking/hand_r.svg.import deleted file mode 100644 index 1a143c2..0000000 --- a/src/icons/tracking/hand_r.svg.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/hand_r.svg-4a3347af4c88154210ef6301d860d907.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icons/tracking/hand_r.svg" -dest_files=[ "res://.import/hand_r.svg-4a3347af4c88154210ef6301d860d907.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=10.0 diff --git a/src/icons/tracking/person.svg b/src/icons/tracking/person.svg deleted file mode 100644 index 81dadc6..0000000 --- a/src/icons/tracking/person.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/icons/tracking/world.svg b/src/icons/tracking/world.svg deleted file mode 100644 index 501b47a..0000000 --- a/src/icons/tracking/world.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/icons/tracking/world.svg.import b/src/icons/tracking/world.svg.import deleted file mode 100644 index 3d3f31c..0000000 --- a/src/icons/tracking/world.svg.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/world.svg-808e531a61f25841cc39f2ea6733d0a8.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icons/tracking/world.svg" -dest_files=[ "res://.import/world.svg-808e531a61f25841cc39f2ea6733d0a8.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=10.0 diff --git a/src/icons/warning.svg b/src/icons/warning.svg deleted file mode 100644 index f40d539..0000000 --- a/src/icons/warning.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/icons/warning.svg.import b/src/icons/warning.svg.import deleted file mode 100644 index 21c5622..0000000 --- a/src/icons/warning.svg.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/warning.svg-b033954d2064445c7f6c3060b1067f3b.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icons/warning.svg" -dest_files=[ "res://.import/warning.svg-b033954d2064445c7f6c3060b1067f3b.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=10.0 diff --git a/src/overlay_resources/image_viewer.gd b/src/overlay_resources/image_viewer.gd deleted file mode 100644 index f762935..0000000 --- a/src/overlay_resources/image_viewer.gd +++ /dev/null @@ -1,28 +0,0 @@ -extends Control - -const OVERLAY_PROPERTIES = { - "clickable": true, -} - - -func _ready() -> void: - #get_viewport().get_parent().add_cursor() - var homefolder = OS.get_user_data_dir() - homefolder = homefolder.get_base_dir().get_base_dir().get_base_dir() - $FileDialog.current_dir = homefolder - - -func _on_Open_pressed() -> void: - $FileDialog.popup_centered() - - -func _on_FileDialog_file_selected(path: String) -> void: - var tex = ImageTexture.new() - tex.load(path) - $Image.texture = tex - - -func _on_FileDialog_dir_selected(dir: String) -> void: - print(dir) - $FileDialog.current_dir = dir - $FileDialog.call_deferred("show") diff --git a/src/overlay_resources/keyboard/KeyBtn.tscn b/src/overlay_resources/keyboard/KeyBtn.tscn deleted file mode 100644 index a932e17..0000000 --- a/src/overlay_resources/keyboard/KeyBtn.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://overlay_resources/keyboard/keyboard.theme" type="Theme" id=1] - -[node name="Btn" type="Button"] -margin_top = 993.0 -margin_right = 78.0 -margin_bottom = 1054.0 -rect_min_size = Vector2( 100, 100 ) -rect_pivot_offset = Vector2( 50, 50 ) -theme = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Label" type="Label" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -text = "Key" -align = 1 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/src/overlay_resources/keyboard/KeyRow.tscn b/src/overlay_resources/keyboard/KeyRow.tscn deleted file mode 100644 index 08125f2..0000000 --- a/src/overlay_resources/keyboard/KeyRow.tscn +++ /dev/null @@ -1,9 +0,0 @@ -[gd_scene format=2] - -[node name="KeyRow" type="HBoxContainer"] -margin_right = 230.0 -margin_bottom = 128.0 -custom_constants/separation = 0 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/src/overlay_resources/keyboard/key_normal.stylebox b/src/overlay_resources/keyboard/key_normal.stylebox deleted file mode 100644 index c01042e..0000000 Binary files a/src/overlay_resources/keyboard/key_normal.stylebox and /dev/null differ diff --git a/src/overlay_resources/keyboard/key_pressed.stylebox b/src/overlay_resources/keyboard/key_pressed.stylebox deleted file mode 100644 index ec6842b..0000000 Binary files a/src/overlay_resources/keyboard/key_pressed.stylebox and /dev/null differ diff --git a/src/overlay_resources/keyboard/keyboard.theme b/src/overlay_resources/keyboard/keyboard.theme deleted file mode 100644 index ef3ff34..0000000 Binary files a/src/overlay_resources/keyboard/keyboard.theme and /dev/null differ diff --git a/src/overlay_resources/keyboard/keyboard_overlay.gd b/src/overlay_resources/keyboard/keyboard_overlay.gd deleted file mode 100644 index 4a58465..0000000 --- a/src/overlay_resources/keyboard/keyboard_overlay.gd +++ /dev/null @@ -1,90 +0,0 @@ -extends Control - -const OVERLAY_PROPERTIES = { - "touchable": true, -} - -export var key_size := 100 -export var key_row : PackedScene -export var key_button : PackedScene -export var row_container_path : NodePath - -var row_container - -var keymap := {} -var toggle_keys := [] - -func _ready(): - row_container = get_node(row_container_path) - load_keys("res://overlay_resources/keyboard/layouts/layout_se.json") - - -func load_keys(fp: String): - var file = File.new() - file.open(fp, File.READ) - keymap = parse_json(file.get_as_text()) - file.close() - - apply_keys() - - -func apply_keys(): - for row in keymap.rows: - var row_box = key_row.instance() - row_container.add_child(row_box) - for key in row.keys: - var btn = key_button.instance() - - if not key.has("display"): - key.display = key.keycode - btn.get_node("Label").text = key.display - btn.name = key.keycode - - btn.rect_min_size.x = key_size - btn.rect_min_size.y = key_size - if key.has("width"): - btn.rect_min_size.x *= key.width - - if key.has("toggle") and key.toggle: - btn.toggle_mode = true - btn.connect("toggled", self, "key_toggled", [key.keycode]) - toggle_keys.append(btn) - else: - btn.connect("button_down", self, "key_down", [key.keycode]) - btn.connect("button_up", self, "key_up", [key.keycode]) - - row_box.add_child(btn) - - # horizontal gaps - if key.has("gap"): - var gapbox = Control.new() - gapbox.rect_min_size.x = key.gap * key_size - gapbox.name = "Gap" - row_box.add_child(gapbox) - - # vertical gaps - if row.has("gap") and row.gap > 0: - var gapbox = Control.new() - gapbox.rect_min_size.y = row.gap * key_size - gapbox.name = "Gap" - row_container.add_child(gapbox) - - -func key_toggled(state, code): - if state: - GDVK.key_down(code) - else: - GDVK.key_up(code) - - -func key_down(code): - GDVK.key_down(code) - - -func key_up(code): - GDVK.key_up(code) - # clear all modifier keys - for k in toggle_keys: - if k.pressed: - k.pressed = false - diff --git a/src/overlay_resources/keyboard/layouts/layout_se.json b/src/overlay_resources/keyboard/layouts/layout_se.json deleted file mode 100644 index c90a356..0000000 --- a/src/overlay_resources/keyboard/layouts/layout_se.json +++ /dev/null @@ -1,372 +0,0 @@ -{ - "rows": [ - { - "gap": 0.5, - "keys": [ - { - "keycode": "ESCAPE", - "display": "Esc", - "gap": 1 - }, - { - "keycode": "F1", - "display": "F1" - }, - { - "keycode": "F2", - "display": "F2" - }, - { - "keycode": "F3", - "display": "F3" - }, - { - "keycode": "F4", - "display": "F4", - "gap": 0.5 - }, - { - "keycode": "F5", - "display": "F5" - }, - { - "keycode": "F6", - "display": "F6" - }, - { - "keycode": "F7", - "display": "F7" - }, - { - "keycode": "F8", - "display": "F8", - "gap": 0.5 - }, - { - "keycode": "F9", - "display": "F9" - }, - { - "keycode": "F10", - "display": "F10" - }, - { - "keycode": "F11", - "display": "F11" - }, - { - "keycode": "F12", - "display": "F12", - "gap": 0.5 - }, - { - "keycode": "PRINT", - "display": "Print\nScrn" - } - ] - }, - { - "keys": [ - { - "keycode": "SECTION", - "display": "§" - }, - { - "keycode": "1" - }, - { - "keycode": "2" - }, - { - "keycode": "3" - }, - { - "keycode": "4" - }, - { - "keycode": "5" - }, - { - "keycode": "6" - }, - { - "keycode": "7" - }, - { - "keycode": "8" - }, - { - "keycode": "9" - }, - { - "keycode": "0" - }, - { - "keycode": "PLUS", - "display": "+" - }, - { - "keycode": "GRAVE", - "display": "`" - }, - { - "keycode": "BACKSPACE", - "display": "Backspace", - "width": 2, - "gap": 0.5 - }, - { - "keycode": "INSERT", - "display": "Ins" - }, - { - "keycode": "HOME", - "display": "Home" - }, - { - "keycode": "PAGE_UP", - "display": "Page\nUp" - } - ] - }, - { - "keys": [ - { - "keycode": "TAB", - "display": "->", - "width": 1.5 - }, - { - "keycode": "Q" - }, - { - "keycode": "W" - }, - { - "keycode": "E" - }, - { - "keycode": "R" - }, - { - "keycode": "T" - }, - { - "keycode": "Y" - }, - { - "keycode": "U" - }, - { - "keycode": "I" - }, - { - "keycode": "O" - }, - { - "keycode": "P" - }, - { - "keycode": "ARING", - "display": "Å" - }, - { - "keycode": "DIAERSIS", - "display": "^\n¨ ~" - }, - { - "keycode": "ENTER", - "display": "Enter", - "width": 1.5, - "gap": 0.5 - }, - { - "keycode": "DELETE", - "display": "Del" - }, - { - "keycode": "END", - "display": "End" - }, - { - "keycode": "PAGE_DOWN", - "display": "Page\nDown" - } - ] - }, - { - "keys": [ - { - "keycode": "CAPSLOCK", - "display": "CAPS", - "width": 1.75 - }, - { - "keycode": "A" - }, - { - "keycode": "S" - }, - { - "keycode": "D" - }, - { - "keycode": "F" - }, - { - "keycode": "G" - }, - { - "keycode": "H" - }, - { - "keycode": "J" - }, - { - "keycode": "K" - }, - { - "keycode": "L" - }, - { - "keycode": "ODIAERSIS", - "display": "Ö" - }, - { - "keycode": "ADIAERSIS", - "display": "Ä" - }, - { - "keycode": "APOSTROPHE", - "display": "*\n'" - }, - { - "keycode": "ENTER", - "display": "Enter", - "width": 1.25 - } - ] - }, - { - "keys": [ - { - "keycode": "SHIFT_L", - "display": "Shift", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "LESS", - "display": "> \n< |" - }, - { - "keycode": "Z" - }, - { - "keycode": "X" - }, - { - "keycode": "C" - }, - { - "keycode": "V" - }, - { - "keycode": "B" - }, - { - "keycode": "N" - }, - { - "keycode": "M" - }, - { - "keycode": "COMMA", - "display": ";\n," - }, - { - "keycode": "PERIOD", - "display": ":\n." - }, - { - "keycode": "MINUS", - "display": "_\n-" - }, - { - "keycode": "SHIFT_R", - "display": "Shift", - "toggle": true, - "width": 2.75, - "gap": 1.5 - }, - { - "keycode": "UP", - "display": "^" - } - ] - }, - { - "keys": [ - { - "keycode": "CONTROL_L", - "display": "Ctrl", - "toggle": true, - "width": 1.5 - }, - { - "keycode": "SUPER", - "display": "Sup", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "ALT", - "display": "Alt", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "SPACE", - "display": "", - "width": 5.75 - }, - { - "keycode": "ALT_GR", - "display": "Alt Gr", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "SUPER", - "display": "Sup", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "MENU", - "display": "Menu", - "width": 1.25 - }, - { - "keycode": "CONTROL_R", - "display": "Ctrl", - "toggle": true, - "width": 1.5, - "gap": 0.5 - }, - { - "keycode": "LEFT", - "display": "\n<" - }, - { - "keycode": "DOWN", - "display": "\nv" - }, - { - "keycode": "RIGHT", - "display": "\n>" - } - ] - } - ] -} \ No newline at end of file diff --git a/src/overlay_resources/keyboard/layouts/layout_us.json b/src/overlay_resources/keyboard/layouts/layout_us.json deleted file mode 100644 index afd220b..0000000 --- a/src/overlay_resources/keyboard/layouts/layout_us.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "rows": [ - { - "gap": 0.5, - "keys": [ - { - "keycode": "ESCAPE", - "display": "Esc", - "gap": 1 - }, - { - "keycode": "F1", - "display": "F1" - }, - { - "keycode": "F2", - "display": "F2" - }, - { - "keycode": "F3", - "display": "F3" - }, - { - "keycode": "F4", - "display": "F4", - "gap": 0.5 - }, - { - "keycode": "F5", - "display": "F5" - }, - { - "keycode": "F6", - "display": "F6" - }, - { - "keycode": "F7", - "display": "F7" - }, - { - "keycode": "F8", - "display": "F8", - "gap": 0.5 - }, - { - "keycode": "F9", - "display": "F9" - }, - { - "keycode": "F10", - "display": "F10" - }, - { - "keycode": "F11", - "display": "F11" - }, - { - "keycode": "F12", - "display": "F12" - } - ] - }, - { - "keys": [ - { - "keycode": "ASCIITILDE", - "display": "~ `" - }, - { - "keycode": "1" - }, - { - "keycode": "2" - }, - { - "keycode": "3" - }, - { - "keycode": "4" - }, - { - "keycode": "5" - }, - { - "keycode": "6" - }, - { - "keycode": "7" - }, - { - "keycode": "8" - }, - { - "keycode": "9" - }, - { - "keycode": "0" - }, - { - "keycode": "MINUS", - "display": "-" - }, - { - "keycode": "EQUAL", - "display": "=" - }, - { - "keycode": "BACKSPACE", - "display": "<-", - "width": 2 - } - ] - }, - { - "keys": [ - { - "keycode": "TAB", - "display": "->", - "width": 1.5 - }, - { - "keycode": "Q" - }, - { - "keycode": "W" - }, - { - "keycode": "E" - }, - { - "keycode": "R" - }, - { - "keycode": "T" - }, - { - "keycode": "Y" - }, - { - "keycode": "U" - }, - { - "keycode": "I" - }, - { - "keycode": "O" - }, - { - "keycode": "P" - }, - { - "keycode": "BRACKETLEFT", - "display": "[" - }, - { - "keycode": "BRACKETRIGHT", - "display": "]" - }, - { - "keycode": "BACKSLASH", - "display": "\\", - "width": 1.5 - } - ] - }, - { - "keys": [ - { - "keycode": "CAPSLOCK", - "display": "CAPS", - "width": 1.75 - }, - { - "keycode": "A" - }, - { - "keycode": "S" - }, - { - "keycode": "D" - }, - { - "keycode": "F" - }, - { - "keycode": "G" - }, - { - "keycode": "H" - }, - { - "keycode": "J" - }, - { - "keycode": "K" - }, - { - "keycode": "L" - }, - { - "keycode": "SEMICOLON", - "display": ";" - }, - { - "keycode": "QUOTELEFT", - "display": "`" - }, - { - "keycode": "ENTER", - "display": "Enter", - "width": 2.25 - } - ] - }, - { - "keys": [ - { - "keycode": "SHIFT", - "display": "^", - "toggle": true, - "width": 2.25 - }, - { - "keycode": "Z" - }, - { - "keycode": "X" - }, - { - "keycode": "C" - }, - { - "keycode": "V" - }, - { - "keycode": "B" - }, - { - "keycode": "N" - }, - { - "keycode": "M" - }, - { - "keycode": "COMMA", - "display": "<\n ," - }, - { - "keycode": "PERIOD", - "display": ">\n ." - }, - { - "keycode": "SLASH", - "display": "?\n /" - }, - { - "keycode": "SHIFT", - "display": "Shift", - "toggle": true, - "width": 2.75 - } - ] - }, - { - "keys": [ - { - "keycode": "CONTROL", - "display": "Ctrl", - "toggle": true, - "width": 1.5 - }, - { - "keycode": "SUPER", - "display": "Sup", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "ALT", - "display": "Alt", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "SPACE", - "display": "", - "width": 5.75 - }, - { - "keycode": "ALT", - "display": "Alt", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "SUPER", - "display": "Sup", - "toggle": true, - "width": 1.25 - }, - { - "keycode": "MENU", - "display": "Menu", - "width": 1.5 - }, - { - "keycode": "CONTROL", - "display": "Ctrl", - "toggle": true, - "width": 1.5 - } - ] - } - ] -} \ No newline at end of file diff --git a/src/overlay_resources/main_menu.gd b/src/overlay_resources/main_menu.gd deleted file mode 100644 index f0c93ff..0000000 --- a/src/overlay_resources/main_menu.gd +++ /dev/null @@ -1,52 +0,0 @@ -extends Control - -const OVERLAY_PROPERTIES = { - "allow_hide": false, - "allow_delete": false, - "clickable": true, -} - - -func _ready() -> void: - OverlayManager.connect("added_overlay", self, "_add_overlay_to_list") - OverlayManager.connect("removed_overlay", self, "_remove_overlay_from_list") - for o in Settings.s.overlays: - if o != "MainOverlay": - _add_overlay_to_list(o) - $MarginContainer/VSplitContainer/Control/Overlays.visible = false - - -func _add_overlay_to_list(name): - var new = preload("res://ui/ListOverlayItem.tscn").instance() - new.overlay_name = name - $MarginContainer/VSplitContainer/Control/Overlays.add_child(new) - - -func _remove_overlay_from_list(name): - $MarginContainer/VSplitContainer/Control/Overlays.get_node(name).queue_free() - - -func _on_GrabMode_toggled(state: bool) -> void: - Settings.s.grab_mode = state - OverlayManager.emit_signal("grab_mode_changed") - - -func _on_ShowOverlays_toggled(state: bool) -> void: - $MarginContainer/VSplitContainer/Control/Overlays.visible = state - - -func _on_AddOverlay_toggled(state: bool) -> void: - $MarginContainer/VSplitContainer/Control/AddMenu.visible = state - - -func _on_QuitToggle_toggled(state: bool) -> void: - $MarginContainer/VSplitContainer/MainBar/QuitToggle/Quit.visible = state - - -func _on_Quit_pressed() -> void: - Settings.force_save() - get_tree().quit() - - -func _on_add_menu_closed() -> void: - $MarginContainer/VSplitContainer/MainBar/AddOverlay.pressed = false diff --git a/src/overlay_resources/touch_stick/stick.png b/src/overlay_resources/touch_stick/stick.png deleted file mode 100644 index 6171580..0000000 Binary files a/src/overlay_resources/touch_stick/stick.png and /dev/null differ diff --git a/src/overlay_resources/touch_stick/stick.png.import b/src/overlay_resources/touch_stick/stick.png.import deleted file mode 100644 index 71c669a..0000000 --- a/src/overlay_resources/touch_stick/stick.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/stick.png-328b0dfe10d1d71101c4612bcd737746.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://overlay_resources/touch_stick/stick.png" -dest_files=[ "res://.import/stick.png-328b0dfe10d1d71101c4612bcd737746.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=false -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/src/overlay_resources/unknown_type.gd b/src/overlay_resources/unknown_type.gd deleted file mode 100644 index 70fd23d..0000000 --- a/src/overlay_resources/unknown_type.gd +++ /dev/null @@ -1,5 +0,0 @@ -extends Control - - -func _ready() -> void: - $Label.text += get_viewport().get_parent().path diff --git a/src/overlay_settings_sync.gd b/src/overlay_settings_sync.gd deleted file mode 100644 index d48b172..0000000 --- a/src/overlay_settings_sync.gd +++ /dev/null @@ -1,76 +0,0 @@ -extends Node - -signal loaded_settings - -onready var p = get_parent() -var loaded := false -var _needs_sync := true - - -func _ready() -> void: - p = get_parent() - call_deferred("load_all") - p.connect("overlay_visible_changed", self, "_prop_changed") - p.connect("width_changed", self, "_prop_changed") - p.connect("alpha_changed", self, "_prop_changed") - p.connect("target_changed", self, "_prop_changed") - p.connect("fallback_changed", self, "_prop_changed") - p.connect("offset_changed", self, "_prop_changed") - - -func _prop_changed(_val=null): - _needs_sync = true - - -func save_all() -> void: - if not loaded: - return - if not Settings.s.overlays.has(p.name): - Settings.s.overlays[p.name] = {} - _save_prop("path", p.path) - _save_prop("visible", p.overlay_visible) - _save_prop("width", p.width_meters) - _save_prop("alpha", p.alpha) - _save_prop("target", p.target) - _save_prop("fallback", p.fallback) - _save_prop("offsets", p._offsets.duplicate(true)) - _needs_sync = false - - -func _save_prop(prop_name: String, prop_value) -> void: - Settings.s.overlays[p.name][prop_name] = prop_value - - -func load_all() -> void: - if Settings.s.overlays.has(p.name): - var new = Settings.s.overlays[p.name] - - #if new.has("path"): - # p.path = new.path - if new.has("visible"): - p.overlay_visible = new.visible - if new.has("width"): - p.width_meters = new.width - if new.has("alpha"): - p.alpha = new.alpha - if new.has("target"): - p.target = new.target - if new.has("fallback"): - p.fallback = new.fallback - - if new.has("offsets"):# thorough in case some values are missing in file - for t_key in new.offsets: - var offset = new.offsets[t_key] - p.set_offset(t_key, offset.pos, offset.rot) - - else: - print("FAILED to load settings") - save_all() - loaded = true - emit_signal("loaded_settings") - - -func _on_SyncTimer_timeout() -> void: - if _needs_sync: - save_all() - diff --git a/src/overlays/Cross.tscn b/src/overlays/Cross.tscn deleted file mode 100644 index a16f82f..0000000 --- a/src/overlays/Cross.tscn +++ /dev/null @@ -1,19 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/openvr_overlay/interaction/cursor.png" type="Texture" id=1] - -[node name="Cursor" type="TextureRect"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -128.0 -margin_top = -128.0 -margin_right = 128.0 -margin_bottom = 128.0 -mouse_filter = 2 -texture = ExtResource( 1 ) -expand = true -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/src/overlays/ImageViewer.tscn b/src/overlays/ImageViewer.tscn deleted file mode 100644 index aa6ed7b..0000000 --- a/src/overlays/ImageViewer.tscn +++ /dev/null @@ -1,59 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://styles/menu.theme" type="Theme" id=1] -[ext_resource path="res://styles/file_menu.theme" type="Theme" id=2] -[ext_resource path="res://overlay_resources/image_viewer.gd" type="Script" id=3] - -[node name="ImageViewer" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Image" type="TextureRect" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -stretch_mode = 6 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="FileDialog" type="FileDialog" parent="."] -visible = true -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -1024.0 -margin_top = -768.0 -margin_right = -341.0 -margin_bottom = -256.0 -rect_scale = Vector2( 3, 3 ) -rect_clip_content = true -theme = ExtResource( 2 ) -window_title = "Open a File or Directory" -mode = 3 -access = 2 -current_dir = "/home/crispypin/proj/godot/ovr-utils/src" -current_path = "/home/crispypin/proj/godot/ovr-utils/src/" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Open" type="Button" parent="."] -modulate = Color( 1, 1, 1, 0.8 ) -anchor_top = 1.0 -anchor_bottom = 1.0 -margin_top = -191.0 -margin_right = 359.0 -theme = ExtResource( 1 ) -text = "Open" -__meta__ = { -"_edit_use_anchors_": false -} - -[connection signal="dir_selected" from="FileDialog" to="." method="_on_FileDialog_dir_selected"] -[connection signal="file_selected" from="FileDialog" to="." method="_on_FileDialog_file_selected"] -[connection signal="pressed" from="Open" to="." method="_on_Open_pressed"] diff --git a/src/overlays/KeyboardOverlay.tscn b/src/overlays/KeyboardOverlay.tscn deleted file mode 100644 index 1f03351..0000000 --- a/src/overlays/KeyboardOverlay.tscn +++ /dev/null @@ -1,55 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://overlay_resources/keyboard/keyboard.theme" type="Theme" id=1] -[ext_resource path="res://overlay_resources/keyboard/keyboard_overlay.gd" type="Script" id=2] -[ext_resource path="res://overlay_resources/keyboard/KeyRow.tscn" type="PackedScene" id=3] -[ext_resource path="res://overlay_resources/keyboard/KeyBtn.tscn" type="PackedScene" id=4] - -[node name="Overlay" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 1 ) -script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} -key_row = ExtResource( 3 ) -key_button = ExtResource( 4 ) -row_container_path = NodePath("CenterContainer/PanelContainer/RowContainer") - -[node name="CenterContainer" type="CenterContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 8.0 -margin_top = 8.0 -margin_right = 8.0 -margin_bottom = 8.0 -size_flags_horizontal = 0 -size_flags_vertical = 0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"] -margin_left = 1016.0 -margin_top = 1016.0 -margin_right = 1032.0 -margin_bottom = 1032.0 -size_flags_horizontal = 0 -size_flags_vertical = 0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="RowContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 8.0 -margin_bottom = 8.0 -size_flags_horizontal = 0 -size_flags_vertical = 0 -custom_constants/separation = 0 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/src/overlays/TouchStick.tscn b/src/overlays/TouchStick.tscn deleted file mode 100644 index 6f04011..0000000 --- a/src/overlays/TouchStick.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://overlay_resources/touch_stick/stick.png" type="Texture" id=1] - -[node name="stick" type="TextureRect"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -128.0 -margin_top = -128.0 -margin_right = -30.0 -margin_bottom = 128.0 -mouse_filter = 2 -texture = ExtResource( 1 ) -expand = true -stretch_mode = 5 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/src/settings_validator.gd b/src/settings_validator.gd deleted file mode 100644 index 4c311b1..0000000 --- a/src/settings_validator.gd +++ /dev/null @@ -1,7 +0,0 @@ -extends Node - - -static func is_valid(to_check: Dictionary) -> bool: - if not to_check.has("version"): - return false - return to_check.version == preload("res://settings_definition.gd").VERSION diff --git a/src/special_overlays/MainOverlay.tscn b/src/special_overlays/MainOverlay.tscn deleted file mode 100644 index c061397..0000000 --- a/src/special_overlays/MainOverlay.tscn +++ /dev/null @@ -1,120 +0,0 @@ -[gd_scene load_steps=9 format=2] - -[ext_resource path="res://overlay_resources/main_menu.gd" type="Script" id=1] -[ext_resource path="res://icons/move.svg" type="Texture" id=2] -[ext_resource path="res://icons/list.svg" type="Texture" id=3] -[ext_resource path="res://icons/close.svg" type="Texture" id=4] -[ext_resource path="res://icons/add.svg" type="Texture" id=5] -[ext_resource path="res://ui/ListOverlayItem.tscn" type="PackedScene" id=6] -[ext_resource path="res://styles/menu.theme" type="Theme" id=7] -[ext_resource path="res://ui/AddMenu.tscn" type="PackedScene" id=8] - -[node name="MainOverlay" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 7 ) -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MarginContainer" type="MarginContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -custom_constants/margin_right = 8 -custom_constants/margin_top = 8 -custom_constants/margin_left = 8 -custom_constants/margin_bottom = 8 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VSplitContainer" type="VSplitContainer" parent="MarginContainer"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 2040.0 -margin_bottom = 2040.0 -dragger_visibility = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Control" type="Control" parent="MarginContainer/VSplitContainer"] -margin_right = 2032.0 -margin_bottom = 1841.0 -size_flags_vertical = 3 - -[node name="Overlays" type="VBoxContainer" parent="MarginContainer/VSplitContainer/Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -size_flags_vertical = 3 -alignment = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ListOverlayItem" parent="MarginContainer/VSplitContainer/Control/Overlays" instance=ExtResource( 6 )] -margin_top = 1618.0 -margin_right = 2032.0 -margin_bottom = 1841.0 -overlay_name = "MainOverlay" - -[node name="AddMenu" parent="MarginContainer/VSplitContainer/Control" instance=ExtResource( 8 )] -visible = false - -[node name="MainBar" type="HBoxContainer" parent="MarginContainer/VSplitContainer"] -margin_top = 1841.0 -margin_right = 2032.0 -margin_bottom = 2032.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ShowOverlays" type="Button" parent="MarginContainer/VSplitContainer/MainBar"] -margin_right = 176.0 -margin_bottom = 191.0 -focus_mode = 0 -toggle_mode = true -icon = ExtResource( 3 ) - -[node name="AddOverlay" type="Button" parent="MarginContainer/VSplitContainer/MainBar"] -margin_left = 180.0 -margin_right = 356.0 -margin_bottom = 191.0 -focus_mode = 0 -toggle_mode = true -icon = ExtResource( 5 ) - -[node name="GrabMode" type="Button" parent="MarginContainer/VSplitContainer/MainBar"] -margin_left = 360.0 -margin_right = 536.0 -margin_bottom = 191.0 -focus_mode = 0 -toggle_mode = true -icon = ExtResource( 2 ) - -[node name="QuitToggle" type="Button" parent="MarginContainer/VSplitContainer/MainBar"] -margin_left = 540.0 -margin_right = 716.0 -margin_bottom = 191.0 -toggle_mode = true -icon = ExtResource( 4 ) - -[node name="Quit" type="Button" parent="MarginContainer/VSplitContainer/MainBar/QuitToggle"] -visible = false -margin_left = -4.0 -margin_top = -199.0 -margin_right = 915.0 -margin_bottom = -8.0 -text = "Really quit?" -icon = ExtResource( 4 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[connection signal="add_menu_closed" from="MarginContainer/VSplitContainer/Control/AddMenu" to="." method="_on_add_menu_closed"] -[connection signal="toggled" from="MarginContainer/VSplitContainer/MainBar/ShowOverlays" to="." method="_on_ShowOverlays_toggled"] -[connection signal="toggled" from="MarginContainer/VSplitContainer/MainBar/AddOverlay" to="." method="_on_AddOverlay_toggled"] -[connection signal="toggled" from="MarginContainer/VSplitContainer/MainBar/GrabMode" to="." method="_on_GrabMode_toggled"] -[connection signal="toggled" from="MarginContainer/VSplitContainer/MainBar/QuitToggle" to="." method="_on_QuitToggle_toggled"] -[connection signal="pressed" from="MarginContainer/VSplitContainer/MainBar/QuitToggle/Quit" to="." method="_on_Quit_pressed"] diff --git a/src/special_overlays/UnknownType.tscn b/src/special_overlays/UnknownType.tscn deleted file mode 100644 index c357bfd..0000000 --- a/src/special_overlays/UnknownType.tscn +++ /dev/null @@ -1,30 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://styles/menu.theme" type="Theme" id=1] -[ext_resource path="res://overlay_resources/unknown_type.gd" type="Script" id=2] - -[node name="UnknownType" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 1 ) -script = ExtResource( 2 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect" type="ColorRect" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -color = Color( 1, 0, 0, 0.501961 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Label" type="Label" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -text = "Missing overlay scene: -" -align = 1 -valign = 1 -autowrap = true diff --git a/src/styles/file_menu.theme b/src/styles/file_menu.theme deleted file mode 100644 index a28c221..0000000 Binary files a/src/styles/file_menu.theme and /dev/null differ diff --git a/src/styles/menu.theme b/src/styles/menu.theme deleted file mode 100644 index 7cb162d..0000000 Binary files a/src/styles/menu.theme and /dev/null differ diff --git a/src/styles/sliders/active.stylebox b/src/styles/sliders/active.stylebox deleted file mode 100644 index 07ccadc..0000000 Binary files a/src/styles/sliders/active.stylebox and /dev/null differ diff --git a/src/styles/sliders/normal.stylebox b/src/styles/sliders/normal.stylebox deleted file mode 100644 index 22f0d41..0000000 Binary files a/src/styles/sliders/normal.stylebox and /dev/null differ diff --git a/src/ui/AddMenu.tscn b/src/ui/AddMenu.tscn deleted file mode 100644 index 3ef9c2d..0000000 --- a/src/ui/AddMenu.tscn +++ /dev/null @@ -1,45 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://ui/add_menu.gd" type="Script" id=1] -[ext_resource path="res://styles/menu.theme" type="Theme" id=2] - -[node name="AddMenu" type="PanelContainer"] -anchor_top = 1.0 -anchor_bottom = 1.0 -margin_top = -271.0 -margin_right = 854.0 -grow_vertical = 0 -theme = ExtResource( 2 ) -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MarginContainer" type="MarginContainer" parent="."] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 846.0 -margin_bottom = 263.0 -custom_constants/margin_right = 32 -custom_constants/margin_top = 32 -custom_constants/margin_left = 32 -custom_constants/margin_bottom = 32 - -[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] -margin_left = 32.0 -margin_top = 32.0 -margin_right = 806.0 -margin_bottom = 223.0 -alignment = 2 - -[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/VBoxContainer"] -margin_right = 774.0 -margin_bottom = 191.0 - -[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/PanelContainer"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 766.0 -margin_bottom = 183.0 -text = "Add overlay" -align = 1 diff --git a/src/ui/AddOverlayButton.tscn b/src/ui/AddOverlayButton.tscn deleted file mode 100644 index 14d5aaf..0000000 --- a/src/ui/AddOverlayButton.tscn +++ /dev/null @@ -1,8 +0,0 @@ -[gd_scene format=2] - -[node name="Button" type="Button"] -margin_right = 12.0 -margin_bottom = 20.0 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/src/ui/add_menu.gd b/src/ui/add_menu.gd deleted file mode 100644 index 2dd88ac..0000000 --- a/src/ui/add_menu.gd +++ /dev/null @@ -1,41 +0,0 @@ -extends Control - -signal add_menu_closed - -var paths: Array - -func _ready() -> void: - visible = false - paths = get_overlay_paths() - for p in paths: - var btn = preload("res://ui/AddOverlayButton.tscn").instance() - btn.text = path_to_name(p) - btn.connect("pressed", self, "add_overlay", [p]) - $MarginContainer/VBoxContainer.add_child(btn) - - -func add_overlay(path): - OverlayManager.create_overlay(path, path_to_name(path) + " " + str(randi()%1000)) - visible = false - emit_signal("add_menu_closed") - - -func get_overlay_paths(root := "res://overlays/"): - var found = [] - var dir = Directory.new() - if dir.open(root) == OK: - dir.list_dir_begin(true) - var file_name = dir.get_next() - while file_name != "": - if dir.current_is_dir(): - # TODO make recursive - pass - else: - found.append(root + file_name) - file_name = dir.get_next() - else: - print("An error occurred when trying to access ", root) - return found - -func path_to_name(path: String) -> String: - return path.split("/")[-1].split(".")[0]