From 9136dde7fc67a1986a9e389b84cd0bdc7c316490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Fam=C3=A0?= Date: Mon, 23 Oct 2023 16:22:13 +0200 Subject: [PATCH] Enhancements, Bug Fixes, Cleanup - Improved the WwiseRuntimeManager to handle engine shutdown correctly. - Upgraded icons to utilize the latest SVG files from Wwise 2023.1 and introduced the AkEditorUtils singleton for centralized icon loading. - Fixed the display of AkEvent3D gizmo after integration import and initial project load. - Resolved several issues in register_types.cpp: - Set the minimum library initialization level to MODULE_INITIALIZATION_LEVEL_SERVERS, automating restart during initial integration loading. - Removed unnecessary de-registration of EditorPlugins, now handled automatically. - Fixed resource leaks of FileAccess instances during game shutdown and CookieWrapper issues in AkEvent nodes. - Fixed non-playing streaming sounds. - Removed unused Wwise settings. - Updated godot-cpp bindings and Wwise integration to 4.1.2 (latest patch release) --- .github/workflows/build_all.yml | 4 +- README.md | 2 +- .../editor/images/AcousticTexture_nor.svg | 36 +++ .../images/AcousticTexture_nor.svg.import | 38 +++ addons/Wwise/editor/images/AuxBus_nor.svg | 1 + .../{bus.svg.import => AuxBus_nor.svg.import} | 9 +- addons/Wwise/editor/images/BusSimple_nor.svg | 1 + ...er.svg.import => BusSimple_nor.svg.import} | 9 +- addons/Wwise/editor/images/Event_nor.svg | 45 ++++ .../{rtpc.svg.import => Event_nor.svg.import} | 9 +- addons/Wwise/editor/images/Folder_nor.svg | 23 ++ ...event.svg.import => Folder_nor.svg.import} | 9 +- .../Wwise/editor/images/GameParameter_nor.svg | 39 +++ .../images/GameParameter_nor.svg.import | 38 +++ addons/Wwise/editor/images/Project_nor.svg | 1 + ...tate.svg.import => Project_nor.svg.import} | 9 +- .../Wwise/editor/images/SoundbankInit_nor.svg | 1 + .../images/SoundbankInit_nor.svg.import | 38 +++ addons/Wwise/editor/images/Soundbank_nor.svg | 58 +++++ ...us.svg.import => Soundbank_nor.svg.import} | 9 +- addons/Wwise/editor/images/StateGroup_nor.svg | 27 ++ .../editor/images/StateGroup_nor.svg.import | 38 +++ addons/Wwise/editor/images/State_nor.svg | 21 ++ .../Wwise/editor/images/State_nor.svg.import | 38 +++ .../Wwise/editor/images/SwitchGroup_nor.svg | 33 +++ .../editor/images/SwitchGroup_nor.svg.import | 38 +++ addons/Wwise/editor/images/Switch_nor.svg | 19 ++ .../Wwise/editor/images/Switch_nor.svg.import | 38 +++ addons/Wwise/editor/images/Workunit_nor.svg | 18 ++ .../editor/images/Workunit_nor.svg.import | 38 +++ .../Wwise/editor/images/acoustictexture.svg | 3 - .../editor/images/acoustictexture.svg.import | 39 --- addons/Wwise/editor/images/auxbus.svg | 3 - addons/Wwise/editor/images/bus.svg | 3 - addons/Wwise/editor/images/event.svg | 3 - addons/Wwise/editor/images/folder.svg | 3 - addons/Wwise/editor/images/rtpc.svg | 3 - addons/Wwise/editor/images/search.svg | 3 - addons/Wwise/editor/images/search.svg.import | 39 --- addons/Wwise/editor/images/soundbank.svg | 3 - .../Wwise/editor/images/soundbank.svg.import | 39 --- addons/Wwise/editor/images/state.svg | 3 - addons/Wwise/editor/images/stategroup.svg | 3 - .../Wwise/editor/images/stategroup.svg.import | 39 --- addons/Wwise/editor/images/switch.svg | 3 - addons/Wwise/editor/images/switch.svg.import | 39 --- addons/Wwise/editor/images/switchgroup.svg | 3 - .../editor/images/switchgroup.svg.import | 39 --- addons/Wwise/editor/images/workunit.svg | 3 - .../Wwise/editor/images/workunit.svg.import | 39 --- .../images/wwise_audio_speaker.svg.import | 12 +- addons/Wwise/editor/images/wwise_node.svg | 3 - .../Wwise/editor/images/wwise_node.svg.import | 39 --- addons/Wwise/editor/images/wwise_project.svg | 3 - addons/Wwise/native/SConstruct | 1 + addons/Wwise/native/godot-cpp | 2 +- addons/Wwise/native/src/ak_utils.cpp | 13 +- addons/Wwise/native/src/ak_utils.h | 26 +- .../native/src/editor/ak_editor_utils.cpp | 46 ++++ .../Wwise/native/src/editor/ak_editor_utils.h | 126 ++++++++++ .../event_gizmo/ak_event_3d_gizmo_plugin.h | 23 +- .../inspector_plugin/ak_inspector_plugin.cpp | 235 ++++++------------ .../inspector_plugin/ak_inspector_plugin.h | 45 +++- .../src/editor/waapi_picker/waapi_picker.cpp | 37 ++- .../src/editor/waapi_picker/waapi_picker.h | 2 +- addons/Wwise/native/src/register_types.cpp | 37 ++- addons/Wwise/native/src/register_types.h | 1 + addons/Wwise/native/src/scene/ak_event.cpp | 24 +- addons/Wwise/native/src/scene/ak_event.h | 6 +- addons/Wwise/native/src/wwise_editor.h | 6 +- addons/Wwise/native/src/wwise_gdextension.cpp | 5 + addons/Wwise/native/src/wwise_gdextension.h | 3 + addons/Wwise/native/src/wwise_godot_io.cpp | 41 ++- addons/Wwise/native/src/wwise_settings.cpp | 7 - addons/Wwise/native/src/wwise_utils.h | 7 +- .../native/vs2022/wwise-gdextension.vcxproj | 3 + .../vs2022/wwise-gdextension.vcxproj.filters | 9 + addons/Wwise/native/wwise.gdextension | 32 +-- addons/Wwise/runtime/wwise_runtime_manager.gd | 12 +- 79 files changed, 1121 insertions(+), 684 deletions(-) create mode 100644 addons/Wwise/editor/images/AcousticTexture_nor.svg create mode 100644 addons/Wwise/editor/images/AcousticTexture_nor.svg.import create mode 100644 addons/Wwise/editor/images/AuxBus_nor.svg rename addons/Wwise/editor/images/{bus.svg.import => AuxBus_nor.svg.import} (71%) create mode 100644 addons/Wwise/editor/images/BusSimple_nor.svg rename addons/Wwise/editor/images/{folder.svg.import => BusSimple_nor.svg.import} (70%) create mode 100644 addons/Wwise/editor/images/Event_nor.svg rename addons/Wwise/editor/images/{rtpc.svg.import => Event_nor.svg.import} (71%) create mode 100644 addons/Wwise/editor/images/Folder_nor.svg rename addons/Wwise/editor/images/{event.svg.import => Folder_nor.svg.import} (71%) create mode 100644 addons/Wwise/editor/images/GameParameter_nor.svg create mode 100644 addons/Wwise/editor/images/GameParameter_nor.svg.import create mode 100644 addons/Wwise/editor/images/Project_nor.svg rename addons/Wwise/editor/images/{state.svg.import => Project_nor.svg.import} (71%) create mode 100644 addons/Wwise/editor/images/SoundbankInit_nor.svg create mode 100644 addons/Wwise/editor/images/SoundbankInit_nor.svg.import create mode 100644 addons/Wwise/editor/images/Soundbank_nor.svg rename addons/Wwise/editor/images/{auxbus.svg.import => Soundbank_nor.svg.import} (70%) create mode 100644 addons/Wwise/editor/images/StateGroup_nor.svg create mode 100644 addons/Wwise/editor/images/StateGroup_nor.svg.import create mode 100644 addons/Wwise/editor/images/State_nor.svg create mode 100644 addons/Wwise/editor/images/State_nor.svg.import create mode 100644 addons/Wwise/editor/images/SwitchGroup_nor.svg create mode 100644 addons/Wwise/editor/images/SwitchGroup_nor.svg.import create mode 100644 addons/Wwise/editor/images/Switch_nor.svg create mode 100644 addons/Wwise/editor/images/Switch_nor.svg.import create mode 100644 addons/Wwise/editor/images/Workunit_nor.svg create mode 100644 addons/Wwise/editor/images/Workunit_nor.svg.import delete mode 100644 addons/Wwise/editor/images/acoustictexture.svg delete mode 100644 addons/Wwise/editor/images/acoustictexture.svg.import delete mode 100644 addons/Wwise/editor/images/auxbus.svg delete mode 100644 addons/Wwise/editor/images/bus.svg delete mode 100644 addons/Wwise/editor/images/event.svg delete mode 100644 addons/Wwise/editor/images/folder.svg delete mode 100644 addons/Wwise/editor/images/rtpc.svg delete mode 100644 addons/Wwise/editor/images/search.svg delete mode 100644 addons/Wwise/editor/images/search.svg.import delete mode 100644 addons/Wwise/editor/images/soundbank.svg delete mode 100644 addons/Wwise/editor/images/soundbank.svg.import delete mode 100644 addons/Wwise/editor/images/state.svg delete mode 100644 addons/Wwise/editor/images/stategroup.svg delete mode 100644 addons/Wwise/editor/images/stategroup.svg.import delete mode 100644 addons/Wwise/editor/images/switch.svg delete mode 100644 addons/Wwise/editor/images/switch.svg.import delete mode 100644 addons/Wwise/editor/images/switchgroup.svg delete mode 100644 addons/Wwise/editor/images/switchgroup.svg.import delete mode 100644 addons/Wwise/editor/images/workunit.svg delete mode 100644 addons/Wwise/editor/images/workunit.svg.import delete mode 100644 addons/Wwise/editor/images/wwise_node.svg delete mode 100644 addons/Wwise/editor/images/wwise_node.svg.import delete mode 100644 addons/Wwise/editor/images/wwise_project.svg create mode 100644 addons/Wwise/native/src/editor/ak_editor_utils.cpp create mode 100644 addons/Wwise/native/src/editor/ak_editor_utils.h diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 6aef7ee0..175b6588 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -13,9 +13,9 @@ on: env: BASE_BRANCH: ci WWISE_VERSION: "2023.1.0-beta" - GODOT_ENGINE_VERSION: "4.1.1" + GODOT_ENGINE_VERSION: "4.1.2" GODOT_ENGINE_STAGE: "stable" - INTEGRATION_VERSION: "2.0" + INTEGRATION_VERSION: "2.0.3" jobs: build-all: diff --git a/README.md b/README.md index c96bad34..ab2947d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build](https://github.com/alessandrofama/wwise-godot-integration/workflows/Build/badge.svg)](https://github.com/alessandrofama/wwise-godot-integration/actions/workflows/build_all.yml) [![Discord](https://img.shields.io/discord/1128222869898416182?label=Discord&logo=discord&logoColor=ffffff&labelColor=5865F2&color=5865F2)](https://discord.gg/6tHrP3gaYf) -Welcome! This repository provides an integration of [Audiokinetic's Wwise audio middleware](https://www.audiokinetic.com/products/wwise/) into [Godot Engine](https://godotengine.org) 4.1.1. At the moment, Wwise version 2023.1 Beta is supported. Older versions can be downloaded in the releases section of the repository. +Welcome! This repository provides an integration of [Audiokinetic's Wwise audio middleware](https://www.audiokinetic.com/products/wwise/) into [Godot Engine](https://godotengine.org) 4.1.2 and 4.2 Beta. At the moment, Wwise version 2023.1 Beta is supported. Older versions can be downloaded in the releases section of the repository. ## Features diff --git a/addons/Wwise/editor/images/AcousticTexture_nor.svg b/addons/Wwise/editor/images/AcousticTexture_nor.svg new file mode 100644 index 00000000..b9b7375c --- /dev/null +++ b/addons/Wwise/editor/images/AcousticTexture_nor.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/AcousticTexture_nor.svg.import b/addons/Wwise/editor/images/AcousticTexture_nor.svg.import new file mode 100644 index 00000000..76e194ac --- /dev/null +++ b/addons/Wwise/editor/images/AcousticTexture_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtl5m1faegd7c" +path="res://.godot/imported/AcousticTexture_nor.svg-7052446467938c70bece44de02fa6583.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/AcousticTexture_nor.svg" +dest_files=["res://.godot/imported/AcousticTexture_nor.svg-7052446467938c70bece44de02fa6583.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/AuxBus_nor.svg b/addons/Wwise/editor/images/AuxBus_nor.svg new file mode 100644 index 00000000..e02ae9ee --- /dev/null +++ b/addons/Wwise/editor/images/AuxBus_nor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/Wwise/editor/images/bus.svg.import b/addons/Wwise/editor/images/AuxBus_nor.svg.import similarity index 71% rename from addons/Wwise/editor/images/bus.svg.import rename to addons/Wwise/editor/images/AuxBus_nor.svg.import index 6d2dd381..f432c085 100644 --- a/addons/Wwise/editor/images/bus.svg.import +++ b/addons/Wwise/editor/images/AuxBus_nor.svg.import @@ -2,18 +2,17 @@ importer="texture" type="CompressedTexture2D" -uid="uid://b8lhh0dkeqom2" -path="res://.godot/imported/bus.svg-4905dbba6ab6fe7842c20adf7713c12c.ctex" +uid="uid://brb20yxmqs8ns" +path="res://.godot/imported/AuxBus_nor.svg-1ed6d09f61a4b44ca5939327fb4d9f5c.ctex" metadata={ -"editor_scale": 1.0, "has_editor_variant": true, "vram_texture": false } [deps] -source_file="res://addons/Wwise/editor/images/bus.svg" -dest_files=["res://.godot/imported/bus.svg-4905dbba6ab6fe7842c20adf7713c12c.ctex"] +source_file="res://addons/Wwise/editor/images/AuxBus_nor.svg" +dest_files=["res://.godot/imported/AuxBus_nor.svg-1ed6d09f61a4b44ca5939327fb4d9f5c.ctex"] [params] diff --git a/addons/Wwise/editor/images/BusSimple_nor.svg b/addons/Wwise/editor/images/BusSimple_nor.svg new file mode 100644 index 00000000..a75c49a1 --- /dev/null +++ b/addons/Wwise/editor/images/BusSimple_nor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/Wwise/editor/images/folder.svg.import b/addons/Wwise/editor/images/BusSimple_nor.svg.import similarity index 70% rename from addons/Wwise/editor/images/folder.svg.import rename to addons/Wwise/editor/images/BusSimple_nor.svg.import index 1aa87193..5bd825f7 100644 --- a/addons/Wwise/editor/images/folder.svg.import +++ b/addons/Wwise/editor/images/BusSimple_nor.svg.import @@ -2,18 +2,17 @@ importer="texture" type="CompressedTexture2D" -uid="uid://d3x57gg1pn75g" -path="res://.godot/imported/folder.svg-65132fdd84bb0df78fdc4b9e9b4dfc03.ctex" +uid="uid://bberivmnwa7b7" +path="res://.godot/imported/BusSimple_nor.svg-2a7d7eb1bbea7edeae1f09d1fd0259dc.ctex" metadata={ -"editor_scale": 1.0, "has_editor_variant": true, "vram_texture": false } [deps] -source_file="res://addons/Wwise/editor/images/folder.svg" -dest_files=["res://.godot/imported/folder.svg-65132fdd84bb0df78fdc4b9e9b4dfc03.ctex"] +source_file="res://addons/Wwise/editor/images/BusSimple_nor.svg" +dest_files=["res://.godot/imported/BusSimple_nor.svg-2a7d7eb1bbea7edeae1f09d1fd0259dc.ctex"] [params] diff --git a/addons/Wwise/editor/images/Event_nor.svg b/addons/Wwise/editor/images/Event_nor.svg new file mode 100644 index 00000000..44064c02 --- /dev/null +++ b/addons/Wwise/editor/images/Event_nor.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/rtpc.svg.import b/addons/Wwise/editor/images/Event_nor.svg.import similarity index 71% rename from addons/Wwise/editor/images/rtpc.svg.import rename to addons/Wwise/editor/images/Event_nor.svg.import index 29adffee..132170b4 100644 --- a/addons/Wwise/editor/images/rtpc.svg.import +++ b/addons/Wwise/editor/images/Event_nor.svg.import @@ -2,18 +2,17 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dvo1ewp8imk38" -path="res://.godot/imported/rtpc.svg-6c1027ef707fbe753a86cd079bf10216.ctex" +uid="uid://c6320wx4uohhj" +path="res://.godot/imported/Event_nor.svg-cca1b541d543badefe73ca9210414ad3.ctex" metadata={ -"editor_scale": 1.0, "has_editor_variant": true, "vram_texture": false } [deps] -source_file="res://addons/Wwise/editor/images/rtpc.svg" -dest_files=["res://.godot/imported/rtpc.svg-6c1027ef707fbe753a86cd079bf10216.ctex"] +source_file="res://addons/Wwise/editor/images/Event_nor.svg" +dest_files=["res://.godot/imported/Event_nor.svg-cca1b541d543badefe73ca9210414ad3.ctex"] [params] diff --git a/addons/Wwise/editor/images/Folder_nor.svg b/addons/Wwise/editor/images/Folder_nor.svg new file mode 100644 index 00000000..c97b9f55 --- /dev/null +++ b/addons/Wwise/editor/images/Folder_nor.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/event.svg.import b/addons/Wwise/editor/images/Folder_nor.svg.import similarity index 71% rename from addons/Wwise/editor/images/event.svg.import rename to addons/Wwise/editor/images/Folder_nor.svg.import index aa7daed2..fbe5de41 100644 --- a/addons/Wwise/editor/images/event.svg.import +++ b/addons/Wwise/editor/images/Folder_nor.svg.import @@ -2,18 +2,17 @@ importer="texture" type="CompressedTexture2D" -uid="uid://lmbgnqlef5th" -path="res://.godot/imported/event.svg-b84e7609af6aa99a32c7fd796afd69a5.ctex" +uid="uid://ip6ktdm4yldl" +path="res://.godot/imported/Folder_nor.svg-bcc9eb4105339dfc40b4fabeac9d5ceb.ctex" metadata={ -"editor_scale": 1.0, "has_editor_variant": true, "vram_texture": false } [deps] -source_file="res://addons/Wwise/editor/images/event.svg" -dest_files=["res://.godot/imported/event.svg-b84e7609af6aa99a32c7fd796afd69a5.ctex"] +source_file="res://addons/Wwise/editor/images/Folder_nor.svg" +dest_files=["res://.godot/imported/Folder_nor.svg-bcc9eb4105339dfc40b4fabeac9d5ceb.ctex"] [params] diff --git a/addons/Wwise/editor/images/GameParameter_nor.svg b/addons/Wwise/editor/images/GameParameter_nor.svg new file mode 100644 index 00000000..1d6105be --- /dev/null +++ b/addons/Wwise/editor/images/GameParameter_nor.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/GameParameter_nor.svg.import b/addons/Wwise/editor/images/GameParameter_nor.svg.import new file mode 100644 index 00000000..90496d6c --- /dev/null +++ b/addons/Wwise/editor/images/GameParameter_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://tqoikjxbffrh" +path="res://.godot/imported/GameParameter_nor.svg-6a742992ddee792a08392182410a7099.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/GameParameter_nor.svg" +dest_files=["res://.godot/imported/GameParameter_nor.svg-6a742992ddee792a08392182410a7099.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/Project_nor.svg b/addons/Wwise/editor/images/Project_nor.svg new file mode 100644 index 00000000..2832fdac --- /dev/null +++ b/addons/Wwise/editor/images/Project_nor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/Wwise/editor/images/state.svg.import b/addons/Wwise/editor/images/Project_nor.svg.import similarity index 71% rename from addons/Wwise/editor/images/state.svg.import rename to addons/Wwise/editor/images/Project_nor.svg.import index b817736c..5afdb8b5 100644 --- a/addons/Wwise/editor/images/state.svg.import +++ b/addons/Wwise/editor/images/Project_nor.svg.import @@ -2,18 +2,17 @@ importer="texture" type="CompressedTexture2D" -uid="uid://cveolm2mcv0ja" -path="res://.godot/imported/state.svg-0702826e31675a03e01f82eab001d453.ctex" +uid="uid://5lleamn0de73" +path="res://.godot/imported/Project_nor.svg-58e5690f105d9fa4cc5677e77b09a4c1.ctex" metadata={ -"editor_scale": 1.0, "has_editor_variant": true, "vram_texture": false } [deps] -source_file="res://addons/Wwise/editor/images/state.svg" -dest_files=["res://.godot/imported/state.svg-0702826e31675a03e01f82eab001d453.ctex"] +source_file="res://addons/Wwise/editor/images/Project_nor.svg" +dest_files=["res://.godot/imported/Project_nor.svg-58e5690f105d9fa4cc5677e77b09a4c1.ctex"] [params] diff --git a/addons/Wwise/editor/images/SoundbankInit_nor.svg b/addons/Wwise/editor/images/SoundbankInit_nor.svg new file mode 100644 index 00000000..3200f73a --- /dev/null +++ b/addons/Wwise/editor/images/SoundbankInit_nor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/Wwise/editor/images/SoundbankInit_nor.svg.import b/addons/Wwise/editor/images/SoundbankInit_nor.svg.import new file mode 100644 index 00000000..164d2185 --- /dev/null +++ b/addons/Wwise/editor/images/SoundbankInit_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c6henbtgmply7" +path="res://.godot/imported/SoundbankInit_nor.svg-9fa97e168e627235d3e772b3183b27fd.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/SoundbankInit_nor.svg" +dest_files=["res://.godot/imported/SoundbankInit_nor.svg-9fa97e168e627235d3e772b3183b27fd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/Soundbank_nor.svg b/addons/Wwise/editor/images/Soundbank_nor.svg new file mode 100644 index 00000000..7062102e --- /dev/null +++ b/addons/Wwise/editor/images/Soundbank_nor.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/auxbus.svg.import b/addons/Wwise/editor/images/Soundbank_nor.svg.import similarity index 70% rename from addons/Wwise/editor/images/auxbus.svg.import rename to addons/Wwise/editor/images/Soundbank_nor.svg.import index dfeb52fc..f22068f3 100644 --- a/addons/Wwise/editor/images/auxbus.svg.import +++ b/addons/Wwise/editor/images/Soundbank_nor.svg.import @@ -2,18 +2,17 @@ importer="texture" type="CompressedTexture2D" -uid="uid://djx8bc0upxp4b" -path="res://.godot/imported/auxbus.svg-036d45ba66f2e5526c0629fd730b0d63.ctex" +uid="uid://bx6kmkkhf8uiu" +path="res://.godot/imported/Soundbank_nor.svg-4156d1b612ac06ebcfe2b9efac7ddcc1.ctex" metadata={ -"editor_scale": 1.0, "has_editor_variant": true, "vram_texture": false } [deps] -source_file="res://addons/Wwise/editor/images/auxbus.svg" -dest_files=["res://.godot/imported/auxbus.svg-036d45ba66f2e5526c0629fd730b0d63.ctex"] +source_file="res://addons/Wwise/editor/images/Soundbank_nor.svg" +dest_files=["res://.godot/imported/Soundbank_nor.svg-4156d1b612ac06ebcfe2b9efac7ddcc1.ctex"] [params] diff --git a/addons/Wwise/editor/images/StateGroup_nor.svg b/addons/Wwise/editor/images/StateGroup_nor.svg new file mode 100644 index 00000000..0d597c2b --- /dev/null +++ b/addons/Wwise/editor/images/StateGroup_nor.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/StateGroup_nor.svg.import b/addons/Wwise/editor/images/StateGroup_nor.svg.import new file mode 100644 index 00000000..d39dda16 --- /dev/null +++ b/addons/Wwise/editor/images/StateGroup_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ca0gg6latn4r3" +path="res://.godot/imported/StateGroup_nor.svg-08ec4b01a2266ce15e42db24ee690161.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/StateGroup_nor.svg" +dest_files=["res://.godot/imported/StateGroup_nor.svg-08ec4b01a2266ce15e42db24ee690161.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/State_nor.svg b/addons/Wwise/editor/images/State_nor.svg new file mode 100644 index 00000000..86b66b4d --- /dev/null +++ b/addons/Wwise/editor/images/State_nor.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/State_nor.svg.import b/addons/Wwise/editor/images/State_nor.svg.import new file mode 100644 index 00000000..943ff89c --- /dev/null +++ b/addons/Wwise/editor/images/State_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://billu2uub7dyo" +path="res://.godot/imported/State_nor.svg-367952294445cb37b2ffc0af50a35618.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/State_nor.svg" +dest_files=["res://.godot/imported/State_nor.svg-367952294445cb37b2ffc0af50a35618.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/SwitchGroup_nor.svg b/addons/Wwise/editor/images/SwitchGroup_nor.svg new file mode 100644 index 00000000..a26a74c4 --- /dev/null +++ b/addons/Wwise/editor/images/SwitchGroup_nor.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/SwitchGroup_nor.svg.import b/addons/Wwise/editor/images/SwitchGroup_nor.svg.import new file mode 100644 index 00000000..00ae074d --- /dev/null +++ b/addons/Wwise/editor/images/SwitchGroup_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://di2p281eymr6" +path="res://.godot/imported/SwitchGroup_nor.svg-4b8ec47f9b0f2d0ad35f4b4c39823197.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/SwitchGroup_nor.svg" +dest_files=["res://.godot/imported/SwitchGroup_nor.svg-4b8ec47f9b0f2d0ad35f4b4c39823197.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/Switch_nor.svg b/addons/Wwise/editor/images/Switch_nor.svg new file mode 100644 index 00000000..2ec6ab58 --- /dev/null +++ b/addons/Wwise/editor/images/Switch_nor.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/Switch_nor.svg.import b/addons/Wwise/editor/images/Switch_nor.svg.import new file mode 100644 index 00000000..bab2efa6 --- /dev/null +++ b/addons/Wwise/editor/images/Switch_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://1r1vuey5c32k" +path="res://.godot/imported/Switch_nor.svg-8d49f8fe707baf8c0ac91b5a53c494a7.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/Switch_nor.svg" +dest_files=["res://.godot/imported/Switch_nor.svg-8d49f8fe707baf8c0ac91b5a53c494a7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/Workunit_nor.svg b/addons/Wwise/editor/images/Workunit_nor.svg new file mode 100644 index 00000000..e0c9c946 --- /dev/null +++ b/addons/Wwise/editor/images/Workunit_nor.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/addons/Wwise/editor/images/Workunit_nor.svg.import b/addons/Wwise/editor/images/Workunit_nor.svg.import new file mode 100644 index 00000000..136619cc --- /dev/null +++ b/addons/Wwise/editor/images/Workunit_nor.svg.import @@ -0,0 +1,38 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://pc88x388tcsm" +path="res://.godot/imported/Workunit_nor.svg-e25848aba6a8174e5430bbb0701de596.ctex" +metadata={ +"has_editor_variant": true, +"vram_texture": false +} + +[deps] + +source_file="res://addons/Wwise/editor/images/Workunit_nor.svg" +dest_files=["res://.godot/imported/Workunit_nor.svg-e25848aba6a8174e5430bbb0701de596.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=true +editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/acoustictexture.svg b/addons/Wwise/editor/images/acoustictexture.svg deleted file mode 100644 index cdbf6e89..00000000 --- a/addons/Wwise/editor/images/acoustictexture.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/acoustictexture.svg.import b/addons/Wwise/editor/images/acoustictexture.svg.import deleted file mode 100644 index a0e11707..00000000 --- a/addons/Wwise/editor/images/acoustictexture.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cvrwo6i4k5l1t" -path="res://.godot/imported/acoustictexture.svg-8286feab45077f85ff844115bf6f662d.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/acoustictexture.svg" -dest_files=["res://.godot/imported/acoustictexture.svg-8286feab45077f85ff844115bf6f662d.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/auxbus.svg b/addons/Wwise/editor/images/auxbus.svg deleted file mode 100644 index e41bf89c..00000000 --- a/addons/Wwise/editor/images/auxbus.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/bus.svg b/addons/Wwise/editor/images/bus.svg deleted file mode 100644 index 52bbc609..00000000 --- a/addons/Wwise/editor/images/bus.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/event.svg b/addons/Wwise/editor/images/event.svg deleted file mode 100644 index 16d2a73c..00000000 --- a/addons/Wwise/editor/images/event.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/folder.svg b/addons/Wwise/editor/images/folder.svg deleted file mode 100644 index 3cc9816f..00000000 --- a/addons/Wwise/editor/images/folder.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/rtpc.svg b/addons/Wwise/editor/images/rtpc.svg deleted file mode 100644 index b270c179..00000000 --- a/addons/Wwise/editor/images/rtpc.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/search.svg b/addons/Wwise/editor/images/search.svg deleted file mode 100644 index 1386636f..00000000 --- a/addons/Wwise/editor/images/search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/search.svg.import b/addons/Wwise/editor/images/search.svg.import deleted file mode 100644 index 18412c0b..00000000 --- a/addons/Wwise/editor/images/search.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bt8lbvmk31aq0" -path="res://.godot/imported/search.svg-8adb9d7e54af033508ce14116fc05767.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/search.svg" -dest_files=["res://.godot/imported/search.svg-8adb9d7e54af033508ce14116fc05767.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/soundbank.svg b/addons/Wwise/editor/images/soundbank.svg deleted file mode 100644 index 93198e17..00000000 --- a/addons/Wwise/editor/images/soundbank.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/soundbank.svg.import b/addons/Wwise/editor/images/soundbank.svg.import deleted file mode 100644 index 1607fdd1..00000000 --- a/addons/Wwise/editor/images/soundbank.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cyqb2v4ugn5t4" -path="res://.godot/imported/soundbank.svg-bc648ad7ee626a8f7d773ed60f7284f7.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/soundbank.svg" -dest_files=["res://.godot/imported/soundbank.svg-bc648ad7ee626a8f7d773ed60f7284f7.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/state.svg b/addons/Wwise/editor/images/state.svg deleted file mode 100644 index 4483a07d..00000000 --- a/addons/Wwise/editor/images/state.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/stategroup.svg b/addons/Wwise/editor/images/stategroup.svg deleted file mode 100644 index 05932fc7..00000000 --- a/addons/Wwise/editor/images/stategroup.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/stategroup.svg.import b/addons/Wwise/editor/images/stategroup.svg.import deleted file mode 100644 index c7e957c6..00000000 --- a/addons/Wwise/editor/images/stategroup.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b6wpadbsn6pss" -path="res://.godot/imported/stategroup.svg-71b791dc5b634856f0c2e767c2be6c6e.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/stategroup.svg" -dest_files=["res://.godot/imported/stategroup.svg-71b791dc5b634856f0c2e767c2be6c6e.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/switch.svg b/addons/Wwise/editor/images/switch.svg deleted file mode 100644 index 70cbace4..00000000 --- a/addons/Wwise/editor/images/switch.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/switch.svg.import b/addons/Wwise/editor/images/switch.svg.import deleted file mode 100644 index cee76795..00000000 --- a/addons/Wwise/editor/images/switch.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://de1p4bs5p1w04" -path="res://.godot/imported/switch.svg-7a2d1b7ee349e44c79d3e5a8054a33a6.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/switch.svg" -dest_files=["res://.godot/imported/switch.svg-7a2d1b7ee349e44c79d3e5a8054a33a6.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/switchgroup.svg b/addons/Wwise/editor/images/switchgroup.svg deleted file mode 100644 index cf0dad7f..00000000 --- a/addons/Wwise/editor/images/switchgroup.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/switchgroup.svg.import b/addons/Wwise/editor/images/switchgroup.svg.import deleted file mode 100644 index 9f6638bf..00000000 --- a/addons/Wwise/editor/images/switchgroup.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dff0ayxsmdrft" -path="res://.godot/imported/switchgroup.svg-bd0e5780c7f20c4aa2e3be6df9cad75a.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/switchgroup.svg" -dest_files=["res://.godot/imported/switchgroup.svg-bd0e5780c7f20c4aa2e3be6df9cad75a.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/workunit.svg b/addons/Wwise/editor/images/workunit.svg deleted file mode 100644 index d3ab9a37..00000000 --- a/addons/Wwise/editor/images/workunit.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/workunit.svg.import b/addons/Wwise/editor/images/workunit.svg.import deleted file mode 100644 index f81d701c..00000000 --- a/addons/Wwise/editor/images/workunit.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://yjnalunt0di4" -path="res://.godot/imported/workunit.svg-04bb804cf90fb993f342197813d374f2.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/workunit.svg" -dest_files=["res://.godot/imported/workunit.svg-04bb804cf90fb993f342197813d374f2.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/wwise_audio_speaker.svg.import b/addons/Wwise/editor/images/wwise_audio_speaker.svg.import index 59c166a4..1d7eeea5 100644 --- a/addons/Wwise/editor/images/wwise_audio_speaker.svg.import +++ b/addons/Wwise/editor/images/wwise_audio_speaker.svg.import @@ -3,27 +3,25 @@ importer="texture" type="CompressedTexture2D" uid="uid://bvltdosfhfsrt" -path.s3tc="res://.godot/imported/wwise_audio_speaker.svg-c8bbeea5359204d3be2da0640c91add2.s3tc.ctex" -path.etc2="res://.godot/imported/wwise_audio_speaker.svg-c8bbeea5359204d3be2da0640c91add2.etc2.ctex" +path="res://.godot/imported/wwise_audio_speaker.svg-c8bbeea5359204d3be2da0640c91add2.ctex" metadata={ -"imported_formats": ["s3tc_bptc", "etc2_astc"], -"vram_texture": true +"vram_texture": false } [deps] source_file="res://addons/Wwise/editor/images/wwise_audio_speaker.svg" -dest_files=["res://.godot/imported/wwise_audio_speaker.svg-c8bbeea5359204d3be2da0640c91add2.s3tc.ctex", "res://.godot/imported/wwise_audio_speaker.svg-c8bbeea5359204d3be2da0640c91add2.etc2.ctex"] +dest_files=["res://.godot/imported/wwise_audio_speaker.svg-c8bbeea5359204d3be2da0640c91add2.ctex"] [params] -compress/mode=2 +compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=true +mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/addons/Wwise/editor/images/wwise_node.svg b/addons/Wwise/editor/images/wwise_node.svg deleted file mode 100644 index d75a1be6..00000000 --- a/addons/Wwise/editor/images/wwise_node.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/editor/images/wwise_node.svg.import b/addons/Wwise/editor/images/wwise_node.svg.import deleted file mode 100644 index fa32388e..00000000 --- a/addons/Wwise/editor/images/wwise_node.svg.import +++ /dev/null @@ -1,39 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://ctd43ksfu0g6r" -path="res://.godot/imported/wwise_node.svg-86d286b159a6af24aa53b65e31c72e40.ctex" -metadata={ -"editor_scale": 1.0, -"has_editor_variant": true, -"vram_texture": false -} - -[deps] - -source_file="res://addons/Wwise/editor/images/wwise_node.svg" -dest_files=["res://.godot/imported/wwise_node.svg-86d286b159a6af24aa53b65e31c72e40.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=true -editor/convert_colors_with_editor_theme=false diff --git a/addons/Wwise/editor/images/wwise_project.svg b/addons/Wwise/editor/images/wwise_project.svg deleted file mode 100644 index d75a1be6..00000000 --- a/addons/Wwise/editor/images/wwise_project.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/addons/Wwise/native/SConstruct b/addons/Wwise/native/SConstruct index cd16c398..51024245 100644 --- a/addons/Wwise/native/SConstruct +++ b/addons/Wwise/native/SConstruct @@ -354,6 +354,7 @@ sources.append(Glob("src/*.cpp")) sources.append(Glob("src/scene/*.cpp")) sources.append(Glob("src/editor/inspector_plugin/*.cpp")) sources.append(Glob("src/editor/wwise_editor_scale.cpp")) +sources.append(Glob("src/editor/ak_editor_utils.cpp")) if env["platform"] == "windows" or env["platform"] == "macos": env.Append(CPPPATH=["src/waapi/"]) diff --git a/addons/Wwise/native/godot-cpp b/addons/Wwise/native/godot-cpp index bc980b59..48b92acf 160000 --- a/addons/Wwise/native/godot-cpp +++ b/addons/Wwise/native/godot-cpp @@ -1 +1 @@ -Subproject commit bc980b59fff6d202150508db3f00c9440022620a +Subproject commit 48b92acf8c1de8ab39aab0d5f0f83b7fe4895ee9 diff --git a/addons/Wwise/native/src/ak_utils.cpp b/addons/Wwise/native/src/ak_utils.cpp index 95c2c69c..eb76459c 100644 --- a/addons/Wwise/native/src/ak_utils.cpp +++ b/addons/Wwise/native/src/ak_utils.cpp @@ -6,21 +6,14 @@ AkUtils* AkUtils::singleton = nullptr; void AkUtils::_bind_methods() { + BIND_ENUM_CONSTANT(AK_STATE_SHUTDOWN); + BIND_ENUM_CONSTANT(AK_STATE_INITIALIZED); + BIND_ENUM_CONSTANT(GAMEEVENT_NONE); BIND_ENUM_CONSTANT(GAMEEVENT_ENTER_TREE); BIND_ENUM_CONSTANT(GAMEEVENT_READY); BIND_ENUM_CONSTANT(GAMEEVENT_EXIT_TREE); - BIND_ENUM_CONSTANT(AKTYPE_EVENT); - BIND_ENUM_CONSTANT(AKTYPE_BANK); - BIND_ENUM_CONSTANT(AKTYPE_RTPC); - BIND_ENUM_CONSTANT(AKTYPE_STATE_GROUP); - BIND_ENUM_CONSTANT(AKTYPE_STATE); - BIND_ENUM_CONSTANT(AKTYPE_SWITCH_GROUP); - BIND_ENUM_CONSTANT(AKTYPE_SWITCH); - BIND_ENUM_CONSTANT(AKTYPE_BUS); - BIND_ENUM_CONSTANT(AKTYPE_AUX_BUS); - BIND_ENUM_CONSTANT(AK_CURVE_LOG3); BIND_ENUM_CONSTANT(AK_CURVE_SINE); BIND_ENUM_CONSTANT(AK_CURVE_LOG1); diff --git a/addons/Wwise/native/src/ak_utils.h b/addons/Wwise/native/src/ak_utils.h index 8c739ff1..9d6f4a8b 100644 --- a/addons/Wwise/native/src/ak_utils.h +++ b/addons/Wwise/native/src/ak_utils.h @@ -2,7 +2,6 @@ #define AK_UTILS_H #include -#include namespace godot { @@ -31,9 +30,9 @@ class CookieWrapper : public Object Callable get_cookie() const { return cookie; } }; -class AkUtils : public RefCounted +class AkUtils : public Object { - GDCLASS(AkUtils, RefCounted); + GDCLASS(AkUtils, Object); protected: static void _bind_methods(); @@ -42,6 +41,12 @@ class AkUtils : public RefCounted static AkUtils* singleton; public: + enum AkSoundEngineState + { + AK_STATE_SHUTDOWN, + AK_STATE_INITIALIZED, + }; + enum GameEvent { GAMEEVENT_NONE, @@ -50,19 +55,6 @@ class AkUtils : public RefCounted GAMEEVENT_EXIT_TREE }; - enum AkType - { - AKTYPE_EVENT, - AKTYPE_BANK, - AKTYPE_RTPC, - AKTYPE_STATE_GROUP, - AKTYPE_STATE, - AKTYPE_SWITCH_GROUP, - AKTYPE_SWITCH, - AKTYPE_BUS, - AKTYPE_AUX_BUS - }; - enum AkCurveInterpolation { AK_CURVE_LOG3 = 0, @@ -169,8 +161,8 @@ class AkUtils : public RefCounted }; } //namespace godot +VARIANT_ENUM_CAST(AkUtils::AkSoundEngineState); VARIANT_ENUM_CAST(AkUtils::GameEvent); -VARIANT_ENUM_CAST(AkUtils::AkType); VARIANT_ENUM_CAST(AkUtils::AkCurveInterpolation); VARIANT_ENUM_CAST(AkUtils::AkCallbackType); VARIANT_ENUM_CAST(AkUtils::MultiPositionType); diff --git a/addons/Wwise/native/src/editor/ak_editor_utils.cpp b/addons/Wwise/native/src/editor/ak_editor_utils.cpp new file mode 100644 index 00000000..83e27c62 --- /dev/null +++ b/addons/Wwise/native/src/editor/ak_editor_utils.cpp @@ -0,0 +1,46 @@ +#include "ak_editor_utils.h" + +using namespace godot; + +AkEditorUtils* AkEditorUtils::singleton = nullptr; + +AkEditorUtils::AkEditorUtils() +{ + ERR_FAIL_COND(singleton != nullptr); + singleton = this; +} + +AkEditorUtils::~AkEditorUtils() +{ + ERR_FAIL_COND(singleton != this); + singleton = nullptr; +} + +AkEditorUtils* AkEditorUtils::get_singleton() { return singleton; } + +Ref AkEditorUtils::get_editor_icon(const AkType ak_type) +{ + const AkEditorIconType icon_type = get_ak_editor_icon_type(ak_type); + return get_editor_icon(icon_type); +} + +Ref AkEditorUtils::get_editor_icon(const AkEditorIconType icon_type) +{ + std::unordered_map>::iterator it = cached_icons.find(icon_type); + + if (it != cached_icons.end()) + { + return it->second; + } + + const String icon_path = get_ak_editor_icon_path(icon_type); + Ref icon = ResourceLoader::get_singleton()->load(icon_path); + + if (icon.is_valid()) + { + it = cached_icons.emplace(icon_type, icon).first; + return it->second; + } + + return Ref(); +} \ No newline at end of file diff --git a/addons/Wwise/native/src/editor/ak_editor_utils.h b/addons/Wwise/native/src/editor/ak_editor_utils.h new file mode 100644 index 00000000..d9d5259b --- /dev/null +++ b/addons/Wwise/native/src/editor/ak_editor_utils.h @@ -0,0 +1,126 @@ +#ifndef AK_EDITOR_UTILS_H +#define AK_EDITOR_UTILS_H + +#include +#include + +namespace godot +{ + +class AkEditorUtils : public Object +{ + GDCLASS(AkEditorUtils, Object); + + enum AkType + { + AKTYPE_EVENT, + AKTYPE_BANK, + AKTYPE_RTPC, + AKTYPE_STATE_GROUP, + AKTYPE_STATE, + AKTYPE_SWITCH_GROUP, + AKTYPE_SWITCH, + AKTYPE_BUS, + AKTYPE_AUX_BUS + }; + + enum AkEditorIconType + { + AK_ICON_ACOUSTICTEXTURE, + AK_ICON_AUXBUS, + AK_ICON_BUS, + AK_ICON_EVENT, + AK_ICON_FOLDER, + AK_ICON_GAMEPARAMETER, + AK_ICON_PROJECT, + AK_ICON_SOUNDBANK, + AK_ICON_SOUNDBANK_INIT, + AK_ICON_STATE, + AK_ICON_STATEGROUP, + AK_ICON_SWITCH, + AK_ICON_SWITCHGROUP, + AK_ICON_WORKUNIT + }; + +protected: + static void _bind_methods() {} + +private: + static AkEditorUtils* singleton; + std::unordered_map> cached_icons; + +public: + static constexpr const char* get_ak_editor_icon_path(const AkEditorIconType icon_type) + { + switch (icon_type) + { + case AK_ICON_ACOUSTICTEXTURE: + return "res://addons/Wwise/editor/images/AcousticTexture_nor.svg"; + case AK_ICON_AUXBUS: + return "res://addons/Wwise/editor/images/AuxBus_nor.svg"; + case AK_ICON_BUS: + return "res://addons/Wwise/editor/images/BusSimple_nor.svg"; + case AK_ICON_EVENT: + return "res://addons/Wwise/editor/images/Event_nor.svg"; + case AK_ICON_FOLDER: + return "res://addons/Wwise/editor/images/Folder_nor.svg"; + case AK_ICON_GAMEPARAMETER: + return "res://addons/Wwise/editor/images/GameParameter_nor.svg"; + case AK_ICON_PROJECT: + return "res://addons/Wwise/editor/images/Project_nor.svg"; + case AK_ICON_SOUNDBANK: + return "res://addons/Wwise/editor/images/Soundbank_nor.svg"; + case AK_ICON_SOUNDBANK_INIT: + return "res://addons/Wwise/editor/images/SoundbankInit_nor.svg"; + case AK_ICON_STATE: + return "res://addons/Wwise/editor/images/State_nor.svg"; + case AK_ICON_STATEGROUP: + return "res://addons/Wwise/editor/images/StateGroup_nor.svg"; + case AK_ICON_SWITCH: + return "res://addons/Wwise/editor/images/Switch_nor.svg"; + case AK_ICON_SWITCHGROUP: + return "res://addons/Wwise/editor/images/SwitchGroup_nor.svg"; + case AK_ICON_WORKUNIT: + return "res://addons/Wwise/editor/images/Workunit_nor.svg"; + default: + return "res://addons/Wwise/editor/images/Project_nor.svg"; + } + } + + static constexpr AkEditorIconType get_ak_editor_icon_type(const AkType type) + { + switch (type) + { + case AKTYPE_EVENT: + return AK_ICON_EVENT; + case AKTYPE_BANK: + return AK_ICON_SOUNDBANK; + case AKTYPE_STATE_GROUP: + return AK_ICON_STATEGROUP; + case AKTYPE_STATE: + return AK_ICON_STATE; + case AKTYPE_SWITCH_GROUP: + return AK_ICON_SWITCHGROUP; + case AKTYPE_SWITCH: + return AK_ICON_SWITCH; + case AKTYPE_AUX_BUS: + return AK_ICON_AUXBUS; + case AKTYPE_RTPC: + return AK_ICON_GAMEPARAMETER; + default: + return AK_ICON_PROJECT; + } + } + + AkEditorUtils(); + ~AkEditorUtils(); + + static AkEditorUtils* get_singleton(); + + Ref get_editor_icon(const AkType ak_type); + Ref get_editor_icon(const AkEditorIconType icon_type); +}; + +} //namespace godot + +#endif \ No newline at end of file diff --git a/addons/Wwise/native/src/editor/event_gizmo/ak_event_3d_gizmo_plugin.h b/addons/Wwise/native/src/editor/event_gizmo/ak_event_3d_gizmo_plugin.h index eada403e..1d18745b 100644 --- a/addons/Wwise/native/src/editor/event_gizmo/ak_event_3d_gizmo_plugin.h +++ b/addons/Wwise/native/src/editor/event_gizmo/ak_event_3d_gizmo_plugin.h @@ -18,14 +18,9 @@ class AkEvent3DGizmoPlugin : public EditorNode3DGizmoPlugin private: const String ak_event_speaker_path = "res://addons/Wwise/editor/images/wwise_audio_speaker.svg"; + Ref texture; public: - AkEvent3DGizmoPlugin() - { - Ref icon = ResourceLoader::get_singleton()->load(ak_event_speaker_path); - create_icon_material("ak_event_3d_icon_material", icon); - } - virtual bool _has_gizmo(Node3D* for_node_3d) const override { if (for_node_3d) @@ -40,8 +35,20 @@ class AkEvent3DGizmoPlugin : public EditorNode3DGizmoPlugin { gizmo->clear(); - Ref icon = get_material("ak_event_3d_icon_material", gizmo); - gizmo->add_unscaled_billboard(icon, 0.05); + if (!texture.is_valid()) + { + texture = ResourceLoader::get_singleton()->load(ak_event_speaker_path); + + if (!texture.is_valid()) + { + return; + } + + create_icon_material("ak_event_3d_icon_material", texture); + } + + Ref material = get_material("ak_event_3d_icon_material", gizmo); + gizmo->add_unscaled_billboard(material, 0.05); } }; diff --git a/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.cpp b/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.cpp index fef39e95..977c2942 100644 --- a/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.cpp +++ b/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.cpp @@ -8,7 +8,7 @@ void AkInspectorTree::_bind_methods() ClassDB::bind_method(D_METHOD("_on_size_changed"), &AkInspectorTree::_on_size_changed); } -Dictionary AkInspectorTree::get_wwise_ids(const AkUtils::AkType ak_type) +Dictionary AkInspectorTree::get_wwise_ids(const AkEditorUtils::AkType ak_type) { Dictionary result{}; @@ -33,42 +33,42 @@ Dictionary AkInspectorTree::get_wwise_ids(const AkUtils::AkType ak_type) switch (ak_type) { - case AkUtils::AkType::AKTYPE_EVENT: + case AkEditorUtils::AkType::AKTYPE_EVENT: { type_constant = "EVENTS"; break; } - case AkUtils::AkType::AKTYPE_BANK: + case AkEditorUtils::AkType::AKTYPE_BANK: { type_constant = "BANKS"; break; } - case AkUtils::AkType::AKTYPE_RTPC: + case AkEditorUtils::AkType::AKTYPE_RTPC: { type_constant = "GAME_PARAMETERS"; break; } - case AkUtils::AkType::AKTYPE_STATE_GROUP: + case AkEditorUtils::AkType::AKTYPE_STATE_GROUP: { type_constant = "STATES"; break; } - case AkUtils::AkType::AKTYPE_STATE: + case AkEditorUtils::AkType::AKTYPE_STATE: { type_constant = "STATES"; break; } - case AkUtils::AkType::AKTYPE_SWITCH_GROUP: + case AkEditorUtils::AkType::AKTYPE_SWITCH_GROUP: { type_constant = "SWITCHES"; break; } - case AkUtils::AkType::AKTYPE_SWITCH: + case AkEditorUtils::AkType::AKTYPE_SWITCH: { type_constant = "SWITCHES"; break; } - case AkUtils::AkType::AKTYPE_AUX_BUS: + case AkEditorUtils::AkType::AKTYPE_AUX_BUS: { type_constant = "AUX_BUSSES"; break; @@ -81,7 +81,7 @@ Dictionary AkInspectorTree::get_wwise_ids(const AkUtils::AkType ak_type) Dictionary type_constants = type_script->get_script_constant_map(); Dictionary _dict = type_constants.get("_dict", ""); - if (ak_type == AkUtils::AKTYPE_STATE) + if (ak_type == AkEditorUtils::AkType::AKTYPE_STATE) { if (!user_data.is_empty()) { @@ -96,7 +96,7 @@ Dictionary AkInspectorTree::get_wwise_ids(const AkUtils::AkType ak_type) } } } - else if (ak_type == AkUtils::AKTYPE_SWITCH) + else if (ak_type == AkEditorUtils::AkType::AKTYPE_SWITCH) { if (!user_data.is_empty()) { @@ -119,7 +119,7 @@ Dictionary AkInspectorTree::get_wwise_ids(const AkUtils::AkType ak_type) return result; } -void AkInspectorTree::initialize(const AkUtils::AkType item_type, const Dictionary& user_data_) +void AkInspectorTree::initialize(const AkEditorUtils::AkType item_type, const Dictionary& user_data_) { ak_type = item_type; user_data = user_data_; @@ -148,81 +148,45 @@ void AkInspectorTree::populate_browser(const String& text_filter) Dictionary dict = get_wwise_ids(ak_type); + const Array keys = dict.keys(); + const Array values = dict.values(); + for (int64_t i = 0; i < dict.size(); i++) { - String name = dict.keys()[i]; + String name = keys[i]; + Variant id = values[i]; + if (name.findn(text_filter) == -1 && !text_filter.is_empty()) { continue; } TreeItem* item = create_item(root_item); + AkEditorUtils* editor_utils = AkEditorUtils::get_singleton(); - if (ak_type == AkUtils::AKTYPE_EVENT) - { - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/event.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i]); - } - else if (ak_type == AkUtils::AKTYPE_BANK) - { - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/soundbank.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i]); - } - else if (ak_type == AkUtils::AKTYPE_STATE_GROUP) - { - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/stategroup.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i].get("GROUP")); - } - else if (ak_type == AkUtils::AKTYPE_STATE) - { - if (user_data.is_empty()) - { - return; - } - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images//state.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i]); - } - else if (ak_type == AkUtils::AKTYPE_SWITCH_GROUP) - { - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/switchgroup.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i].get("GROUP")); - } - else if (ak_type == AkUtils::AKTYPE_SWITCH) + Ref icon; + + if (ak_type == AkEditorUtils::AkType::AKTYPE_BANK) { - if (user_data.is_empty()) - { - return; - } - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/switch.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i]); + AkEditorUtils::AkEditorIconType icon_type = (name == "Init") + ? AkEditorUtils::AkEditorIconType::AK_ICON_SOUNDBANK_INIT + : AkEditorUtils::AkEditorIconType::AK_ICON_SOUNDBANK; + icon = editor_utils->get_editor_icon(icon_type); } - else if (ak_type == AkUtils::AKTYPE_AUX_BUS) + else { - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/auxbus.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i]); + icon = editor_utils->get_editor_icon(ak_type); } - else if (ak_type == AkUtils::AKTYPE_RTPC) + + if ((ak_type == AkEditorUtils::AkType::AKTYPE_STATE_GROUP) || + (ak_type == AkEditorUtils::AkType::AKTYPE_SWITCH_GROUP)) { - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/rtpc.svg"); - item->set_text(0, dict.keys()[i]); - item->set_meta("name", dict.keys()[i]); - item->set_meta("id", dict.values()[i]); + id = values[i].get("GROUP"); } + item->set_text(0, name); + item->set_meta("name", name); + item->set_meta("id", id); item->set_icon(0, icon); } } @@ -275,7 +239,7 @@ void AkInspectorEditorProperty::_bind_methods() ClassDB::bind_method(D_METHOD("_on_item_selected"), &AkInspectorEditorProperty::_on_item_selected); } -void AkInspectorEditorProperty::init(const AkUtils::AkType type, const Dictionary& user_data_) +void AkInspectorEditorProperty::init(const AkEditorUtils::AkType type, const Dictionary& user_data_) { ak_type = type; user_data = user_data_; @@ -292,53 +256,12 @@ void AkInspectorEditorProperty::init(const AkUtils::AkType type, const Dictionar window->connect("confirmed", Callable(this, "reset")); AkInspectorTree* tree = window->tree; - tree->initialize(type, user_data); + tree->initialize(ak_type, user_data); - switch (type) - { - case AkUtils::AKTYPE_EVENT: - property_control->set_text("Select Event..."); - tree->search_text->set("placeholder_text", "Search Events..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/event.svg"); - break; - case AkUtils::AKTYPE_BANK: - property_control->set_text("Select Bank..."); - tree->search_text->set("placeholder_text", "Search Banks..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/soundbank.svg"); - break; - case AkUtils::AKTYPE_STATE_GROUP: - property_control->set_text("Select State Group..."); - tree->search_text->set("placeholder_text", "Search State Groups..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/stategroup.svg"); - break; - case AkUtils::AKTYPE_STATE: - property_control->set_text("Select State..."); - tree->search_text->set("placeholder_text", "Search State..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/state.svg"); - break; - case AkUtils::AKTYPE_SWITCH_GROUP: - property_control->set_text("Select Switch Group..."); - tree->search_text->set("placeholder_text", "Search Switch Groups..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/switchgroup.svg"); - break; - case AkUtils::AKTYPE_SWITCH: - property_control->set_text("Select Switch..."); - tree->search_text->set("placeholder_text", "Search Switches..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/switch.svg"); - break; - case AkUtils::AKTYPE_AUX_BUS: - property_control->set_text("Select Aux Bus..."); - tree->search_text->set("placeholder_text", "Search Aux Busses..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/auxbus.svg"); - break; - case AkUtils::AKTYPE_RTPC: - property_control->set_text("Select Game Parameter..."); - tree->search_text->set("placeholder_text", "Search Game Parameters..."); - icon = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/rtpc.svg"); - break; - default: - break; - } + const AkInspectorEditorPropertyInfo info = get_ak_inspector_property_info(ak_type); + property_control->set_text(info.text); + tree->search_text->set("placeholder_text", info.placeholder); + icon = AkEditorUtils::get_singleton()->get_editor_icon(ak_type); tree->connect("item_selected", Callable(this, "_on_item_selected")); property_control->connect("pressed", Callable(this, "_on_button_pressed")); @@ -391,51 +314,39 @@ void AkInspectorEditorProperty::_update_property() return; } - if (!current_value["name"].operator String().is_empty()) + String name = current_value["name"]; + if (!name.is_empty()) { - property_control->set_text(current_value["name"]); + if (ak_type == AkEditorUtils::AkType::AKTYPE_BANK) + { + if (name == "Init") + { + icon = AkEditorUtils::get_singleton()->get_editor_icon( + AkEditorUtils::AkEditorIconType::AK_ICON_SOUNDBANK_INIT); + } + else + { + icon = AkEditorUtils::get_singleton()->get_editor_icon( + AkEditorUtils::AkEditorIconType::AK_ICON_SOUNDBANK); + } + } + + property_control->set_text(name); property_control->set_button_icon(icon); } else { - switch (ak_type) - { - case AkUtils::AKTYPE_EVENT: - property_control->set_text("Select Event..."); - break; - case AkUtils::AKTYPE_BANK: - property_control->set_text("Select Bank..."); - break; - case AkUtils::AKTYPE_STATE_GROUP: - property_control->set_text("Select State Group..."); - break; - case AkUtils::AKTYPE_STATE: - property_control->set_text("Select State..."); - break; - case AkUtils::AKTYPE_SWITCH_GROUP: - property_control->set_text("Select Switch Group..."); - break; - case AkUtils::AKTYPE_SWITCH: - property_control->set_text("Select Switch..."); - break; - case AkUtils::AKTYPE_AUX_BUS: - property_control->set_text("Select Aux Bus..."); - break; - case AkUtils::AKTYPE_RTPC: - property_control->set_text("Select Game Parameter..."); - break; - default: - break; - } + const AkInspectorEditorPropertyInfo info = get_ak_inspector_property_info(ak_type); + property_control->set_text(info.text); property_control->set_button_icon(Ref()); } switch (ak_type) { - case AkUtils::AKTYPE_STATE: + case AkEditorUtils::AkType::AKTYPE_STATE: window->tree->user_data = get_edited_object()->get("state_group"); break; - case AkUtils::AKTYPE_SWITCH: + case AkEditorUtils::AkType::AKTYPE_SWITCH: window->tree->user_data = get_edited_object()->get("switch_group"); break; default: @@ -443,9 +354,7 @@ void AkInspectorEditorProperty::_update_property() } close_popup(); - get_edited_object()->notify_property_list_changed(); - updating = false; } @@ -487,14 +396,14 @@ void AkInspectorEditorProperty::_on_item_selected() if (new_value.get("id", 0) != current_value.get("id", 0)) { - if (ak_type == AkUtils::AKTYPE_STATE_GROUP) + if (ak_type == AkEditorUtils::AkType::AKTYPE_STATE_GROUP) { Dictionary default_value; default_value["name"] = ""; default_value["id"] = 0; emit_changed("state_value", default_value); } - if (ak_type == AkUtils::AKTYPE_SWITCH_GROUP) + if (ak_type == AkEditorUtils::AkType::AKTYPE_SWITCH_GROUP) { Dictionary default_value; default_value["name"] = ""; @@ -523,56 +432,56 @@ bool AkInspectorEditorInspectorPlugin::_parse_property(Object* object, Variant:: if (name == "event") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_EVENT); + property->init(AkEditorUtils::AkType::AKTYPE_EVENT); add_property_editor(name, property); return true; } else if (name == "bank") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_BANK); + property->init(AkEditorUtils::AkType::AKTYPE_BANK); add_property_editor(name, property); return true; } else if (name == "state_group") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_STATE_GROUP, object->get("state_group")); + property->init(AkEditorUtils::AkType::AKTYPE_STATE_GROUP, object->get("state_group")); add_property_editor(name, property); return true; } else if (name == "state_value") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_STATE, object->get("state_group")); + property->init(AkEditorUtils::AkType::AKTYPE_STATE, object->get("state_group")); add_property_editor(name, property); return true; } else if (name == "switch_group") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_SWITCH_GROUP, object->get("switch_group")); + property->init(AkEditorUtils::AkType::AKTYPE_SWITCH_GROUP, object->get("switch_group")); add_property_editor(name, property); return true; } else if (name == "switch_value") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_SWITCH, object->get("switch_group")); + property->init(AkEditorUtils::AkType::AKTYPE_SWITCH, object->get("switch_group")); add_property_editor(name, property); return true; } else if (name == "aux_bus") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_AUX_BUS); + property->init(AkEditorUtils::AkType::AKTYPE_AUX_BUS); add_property_editor(name, property); return true; } else if (name == "game_parameter") { AkInspectorEditorProperty* property = memnew(AkInspectorEditorProperty); - property->init(AkUtils::AKTYPE_RTPC); + property->init(AkEditorUtils::AkType::AKTYPE_RTPC); add_property_editor(name, property); return true; } diff --git a/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.h b/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.h index e7034cf2..e4a66482 100644 --- a/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.h +++ b/addons/Wwise/native/src/editor/inspector_plugin/ak_inspector_plugin.h @@ -1,7 +1,7 @@ #ifndef AK_INSPECTOR_PLUGIN_H #define AK_INSPECTOR_PLUGIN_H -#include "ak_utils.h" +#include "ak_editor_utils.h" #include "wwise_editor_scale.h" #include #include @@ -30,17 +30,17 @@ class AkInspectorTree : public Tree private: TreeItem* root_item{}; - AkUtils::AkType ak_type{ AkUtils::AkType::AKTYPE_EVENT }; + AkEditorUtils::AkType ak_type{ AkEditorUtils::AkType::AKTYPE_EVENT }; Ref icon{}; AkInspectorEditor* window{}; - Dictionary get_wwise_ids(const AkUtils::AkType ak_type); + Dictionary get_wwise_ids(const AkEditorUtils::AkType ak_type); public: LineEdit* search_text{}; Dictionary user_data{}; - void initialize(const AkUtils::AkType item_type, const Dictionary& user_data_ = Dictionary()); + void initialize(const AkEditorUtils::AkType item_type, const Dictionary& user_data_ = Dictionary()); void populate_browser(const String& text_filter); void _on_text_changed(const String& text_filter); void _on_size_changed(); @@ -69,12 +69,45 @@ class AkInspectorEditorProperty : public EditorProperty static void _bind_methods(); private: + struct AkInspectorEditorPropertyInfo + { + const char* text; + const char* placeholder; + }; + + static constexpr AkInspectorEditorPropertyInfo get_ak_inspector_property_info(const AkEditorUtils::AkType type) + { + switch (type) + { + case AkEditorUtils::AkType::AKTYPE_EVENT: + return AkInspectorEditorPropertyInfo{ "Select Event...", "Search Events..." }; + case AkEditorUtils::AkType::AKTYPE_BANK: + return AkInspectorEditorPropertyInfo{ "Select Bank...", "Search Banks..." }; + case AkEditorUtils::AkType::AKTYPE_RTPC: + return AkInspectorEditorPropertyInfo{ "Select Game Parameter...", "Search Game Parameters..." }; + case AkEditorUtils::AkType::AKTYPE_STATE_GROUP: + return AkInspectorEditorPropertyInfo{ "Select State Group...", "Search State Groups..." }; + case AkEditorUtils::AkType::AKTYPE_STATE: + return AkInspectorEditorPropertyInfo{ "Select State...", "Search States..." }; + case AkEditorUtils::AkType::AKTYPE_SWITCH_GROUP: + return AkInspectorEditorPropertyInfo{ "Select Switch Group...", "Search Switch Groups..." }; + case AkEditorUtils::AkType::AKTYPE_SWITCH: + return AkInspectorEditorPropertyInfo{ "Select Switch...", "Search Switches..." }; + case AkEditorUtils::AkType::AKTYPE_BUS: + return AkInspectorEditorPropertyInfo{ "Select Bus...", "Search Busses..." }; + case AkEditorUtils::AkType::AKTYPE_AUX_BUS: + return AkInspectorEditorPropertyInfo{ "Select Aux Bus...", "Search Aux Busses..." }; + default: + return AkInspectorEditorPropertyInfo{ "Default Select Label", "Default Search Label" }; + } + } + Button* property_control{}; Ref icon{}; Dictionary current_value{}; bool updating{}; AkInspectorEditor* window{}; - AkUtils::AkType ak_type{ AkUtils::AkType::AKTYPE_EVENT }; + AkEditorUtils::AkType ak_type{ AkEditorUtils::AkType::AKTYPE_EVENT }; PopupMenu* event_popup{}; Dictionary user_data{}; @@ -82,7 +115,7 @@ class AkInspectorEditorProperty : public EditorProperty void close_popup(); public: - void init(const AkUtils::AkType type, const Dictionary& user_data_ = Dictionary()); + void init(const AkEditorUtils::AkType type, const Dictionary& user_data_ = Dictionary()); virtual void _update_property() override; void reset(); void _on_button_pressed(); diff --git a/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.cpp b/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.cpp index 7f0e280a..70730aae 100644 --- a/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.cpp +++ b/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.cpp @@ -565,27 +565,21 @@ void WaapiPicker::_enter_tree() { json = memnew(JSON); - picker_data.icon_data.project = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/wwise_project.svg"); - picker_data.icon_data.folder = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/folder.svg"); - picker_data.icon_data.event = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/event.svg"); - picker_data.icon_data.switch_group = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/switchgroup.svg"); - picker_data.icon_data.switch_ = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/switch.svg"); - picker_data.icon_data.state_group = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/stategroup.svg"); - picker_data.icon_data.state = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/state.svg"); - picker_data.icon_data.soundbank = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/soundbank.svg"); - picker_data.icon_data.bus = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/bus.svg"); - picker_data.icon_data.aux_bus = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/auxbus.svg"); - picker_data.icon_data.acoustic_texture = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/acoustictexture.svg"); - picker_data.icon_data.work_unit = - ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/workunit.svg"); - picker_data.icon_data.search = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/images/search.svg"); + AkEditorUtils* editor_utils = AkEditorUtils::get_singleton(); + using IconType = AkEditorUtils::AkEditorIconType; + + WaapiPickerIconData icon_data{ editor_utils->get_editor_icon(IconType::AK_ICON_PROJECT), + editor_utils->get_editor_icon(IconType::AK_ICON_FOLDER), editor_utils->get_editor_icon(IconType::AK_ICON_EVENT), + editor_utils->get_editor_icon(IconType::AK_ICON_SWITCHGROUP), + editor_utils->get_editor_icon(IconType::AK_ICON_SWITCH), + editor_utils->get_editor_icon(IconType::AK_ICON_STATEGROUP), + editor_utils->get_editor_icon(IconType::AK_ICON_STATE), + editor_utils->get_editor_icon(IconType::AK_ICON_SOUNDBANK), + editor_utils->get_editor_icon(IconType::AK_ICON_BUS), editor_utils->get_editor_icon(IconType::AK_ICON_AUXBUS), + editor_utils->get_editor_icon(IconType::AK_ICON_ACOUSTICTEXTURE), + editor_utils->get_editor_icon(IconType::AK_ICON_WORKUNIT) }; + + picker_data.icon_data = icon_data; scene = ResourceLoader::get_singleton()->load("res://addons/Wwise/editor/waapi_picker/waapi_picker.tscn"); picker_data.scene_data.control = Object::cast_to(scene->instantiate(PackedScene::GEN_EDIT_STATE_INSTANCE)); @@ -625,7 +619,6 @@ void WaapiPicker::_enter_tree() AKASSERT(error == Error::OK); error = picker_data.scene_data.search_text->connect("text_changed", Callable(this, "_on_search_text_changed")); AKASSERT(error == Error::OK); - picker_data.scene_data.search_text->set_right_icon(picker_data.icon_data.search); Waapi::get_singleton()->connect_client("127.0.0.1", 8080); diff --git a/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.h b/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.h index 5e8fbecc..78659662 100644 --- a/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.h +++ b/addons/Wwise/native/src/editor/waapi_picker/waapi_picker.h @@ -1,6 +1,7 @@ #ifndef WAAPI_PICKER_H #define WAAPI_PICKER_H +#include "ak_editor_utils.h" #include "waapi/waapi_gdextension.h" #include #include @@ -38,7 +39,6 @@ struct WaapiPickerIconData Ref aux_bus; Ref acoustic_texture; Ref work_unit; - Ref search; }; struct WaapiPickerSceneData diff --git a/addons/Wwise/native/src/register_types.cpp b/addons/Wwise/native/src/register_types.cpp index 27160ca0..db085dfb 100644 --- a/addons/Wwise/native/src/register_types.cpp +++ b/addons/Wwise/native/src/register_types.cpp @@ -6,6 +6,7 @@ static Wwise* wwise_module; static Waapi* waapi_module; static WwiseSettings* wwise_settings; static AkUtils* ak_utils; +static AkEditorUtils* ak_editor_utils; void register_wwise_types(ModuleInitializationLevel p_level) { @@ -21,6 +22,9 @@ void register_wwise_types(ModuleInitializationLevel p_level) #endif #if defined(AK_WIN) || defined(AK_MAC_OS_X) || defined(AK_LINUX) + ClassDB::register_class(); + ak_editor_utils = memnew(AkEditorUtils); + Engine::get_singleton()->register_singleton("AkEditorUtils", AkEditorUtils::get_singleton()); ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); @@ -69,25 +73,36 @@ void unregister_wwise_types(ModuleInitializationLevel p_level) { if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) { - Engine::get_singleton()->unregister_singleton("Wwise"); - Engine::get_singleton()->unregister_singleton("AkUtils"); - memdelete(wwise_module); + if (Engine::get_singleton()->has_singleton("Wwise")) + { + Engine::get_singleton()->unregister_singleton("Wwise"); + memdelete(wwise_module); + } + if (Engine::get_singleton()->has_singleton("AkUtils")) + { + Engine::get_singleton()->unregister_singleton("AkUtils"); + memdelete(ak_utils); + } + memdelete(wwise_settings); - memdelete(ak_utils); } if (p_level == MODULE_INITIALIZATION_LEVEL_EDITOR) { #if defined(AK_WIN) || defined(AK_MAC_OS_X) - Engine::get_singleton()->unregister_singleton("Waapi"); - memdelete(waapi_module); - - EditorPlugins::remove_by_type(); + if (Engine::get_singleton()->has_singleton("Waapi")) + { + Engine::get_singleton()->unregister_singleton("Waapi"); + memdelete(waapi_module); + } #endif #if defined(AK_WIN) || defined(AK_MAC_OS_X) || defined(AK_LINUX) - EditorPlugins::remove_by_type(); - EditorPlugins::remove_by_type(); + if (Engine::get_singleton()->has_singleton("AkEditorUtils")) + { + Engine::get_singleton()->unregister_singleton("AkEditorUtils"); + memdelete(ak_editor_utils); + } #endif } } @@ -103,7 +118,7 @@ extern "C" init_obj.register_initializer(register_wwise_types); init_obj.register_terminator(unregister_wwise_types); - init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_EDITOR); + init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SERVERS); return init_obj.init(); } diff --git a/addons/Wwise/native/src/register_types.h b/addons/Wwise/native/src/register_types.h index 2ba6deac..4fab14f1 100644 --- a/addons/Wwise/native/src/register_types.h +++ b/addons/Wwise/native/src/register_types.h @@ -8,6 +8,7 @@ #include #include "ak_utils.h" +#include "editor/ak_editor_utils.h" #include "editor/event_gizmo/ak_event_3d_gizmo_plugin.h" #include "editor/export_plugin/ak_editor_export_plugin.h" #include "editor/inspector_plugin/ak_inspector_plugin.h" diff --git a/addons/Wwise/native/src/scene/ak_event.cpp b/addons/Wwise/native/src/scene/ak_event.cpp index a09d3357..085a4e46 100644 --- a/addons/Wwise/native/src/scene/ak_event.cpp +++ b/addons/Wwise/native/src/scene/ak_event.cpp @@ -33,6 +33,14 @@ void AkEvent2D::_bind_methods() ADD_ALL_AK_EVENT_SIGNALS; } +void AkEvent2D::_notification(int p_what) +{ + if (p_what == NOTIFICATION_PREDELETE) + { + memdelete(cookie); + } +} + void AkEvent2D::check_signal_connections() { for (const auto& entry : AkUtils::get_singleton()->event_callback_signals) @@ -53,6 +61,8 @@ AkEvent2D::AkEvent2D() { event["name"] = ""; event["id"] = 0; + + cookie = memnew(CookieWrapper(Callable(this, "callback_emitter"))); } void AkEvent2D::_enter_tree() @@ -114,7 +124,7 @@ void AkEvent2D::post_event() if (callback_type) { playing_id = soundengine->post_event_id_callback( - event.get("id", 0), (AkUtils::AkCallbackType)callback_type, this, &cookie); + event.get("id", 0), (AkUtils::AkCallbackType)callback_type, this, cookie); } else { @@ -200,6 +210,14 @@ void AkEvent3D::_bind_methods() ADD_ALL_AK_EVENT_SIGNALS; } +void AkEvent3D::_notification(int p_what) +{ + if (p_what == NOTIFICATION_PREDELETE) + { + memdelete(cookie); + } +} + void AkEvent3D::check_signal_connections() { for (const auto& entry : AkUtils::get_singleton()->event_callback_signals) @@ -220,6 +238,8 @@ AkEvent3D::AkEvent3D() { event["name"] = ""; event["id"] = 0; + + cookie = memnew(CookieWrapper(Callable(this, "callback_emitter"))); } void AkEvent3D::_enter_tree() @@ -303,7 +323,7 @@ void AkEvent3D::post_event() if (callback_type) { playing_id = soundengine->post_event_id_callback( - event.get("id", 0), (AkUtils::AkCallbackType)callback_type, this, &cookie); + event.get("id", 0), (AkUtils::AkCallbackType)callback_type, this, cookie); } else { diff --git a/addons/Wwise/native/src/scene/ak_event.h b/addons/Wwise/native/src/scene/ak_event.h index ab4c106e..1baeb95d 100644 --- a/addons/Wwise/native/src/scene/ak_event.h +++ b/addons/Wwise/native/src/scene/ak_event.h @@ -16,6 +16,7 @@ class AkEvent2D : public Node2D protected: static void _bind_methods(); + void _notification(int p_what); private: Dictionary event; @@ -23,7 +24,7 @@ class AkEvent2D : public Node2D unsigned int stop_fade_time{}; AkUtils::AkCurveInterpolation interpolation_mode = AkUtils::AkCurveInterpolation::AK_CURVE_LINEAR; int callback_type{}; - CookieWrapper cookie{ Callable(this, "callback_emitter") }; + CookieWrapper* cookie{ nullptr }; bool is_editor{}; AkUtils::GameEvent trigger_on = AkUtils::GameEvent::GAMEEVENT_NONE; @@ -67,6 +68,7 @@ class AkEvent3D : public Node3D protected: static void _bind_methods(); + void _notification(int p_what); private: Dictionary event; @@ -75,7 +77,7 @@ class AkEvent3D : public Node3D AkUtils::AkCurveInterpolation interpolation_mode = AkUtils::AkCurveInterpolation::AK_CURVE_LINEAR; bool is_environment_aware{}; int callback_type{}; - CookieWrapper cookie{ Callable(this, "callback_emitter") }; + CookieWrapper* cookie{ nullptr }; bool is_editor{}; AkUtils::GameEvent trigger_on = AkUtils::GameEvent::GAMEEVENT_NONE; diff --git a/addons/Wwise/native/src/wwise_editor.h b/addons/Wwise/native/src/wwise_editor.h index 0b0e1d6d..b8d2c1fb 100644 --- a/addons/Wwise/native/src/wwise_editor.h +++ b/addons/Wwise/native/src/wwise_editor.h @@ -41,10 +41,10 @@ class WwiseEditorPlugin : public EditorPlugin virtual void _exit_tree() override { - remove_autoload_singleton("WwiseRuntimeManager"); - remove_node_3d_gizmo_plugin(gizmo_plugin); - remove_export_plugin(export_plugin); remove_inspector_plugin(inspector_plugin); + remove_export_plugin(export_plugin); + remove_node_3d_gizmo_plugin(gizmo_plugin); + remove_autoload_singleton("WwiseRuntimeManager"); } }; diff --git a/addons/Wwise/native/src/wwise_gdextension.cpp b/addons/Wwise/native/src/wwise_gdextension.cpp index ff9e8a19..8e3948c3 100644 --- a/addons/Wwise/native/src/wwise_gdextension.cpp +++ b/addons/Wwise/native/src/wwise_gdextension.cpp @@ -168,6 +168,7 @@ void Wwise::_bind_methods() ClassDB::bind_method(D_METHOD("remove_output", "output_id"), &Wwise::remove_output); ClassDB::bind_method(D_METHOD("suspend", "render_anyway"), &Wwise::suspend); ClassDB::bind_method(D_METHOD("wakeup_from_suspend"), &Wwise::wakeup_from_suspend); + ClassDB::bind_method(D_METHOD("get_soundengine_state"), &Wwise::get_soundengine_state); } void Wwise::init() @@ -184,6 +185,7 @@ void Wwise::init() } else { + soundengine_state = AkUtils::AkSoundEngineState::AK_STATE_INITIALIZED; UtilityFunctions::print("[Wwise] Initialized Wwise systems"); } @@ -250,6 +252,7 @@ void Wwise::shutdown() { if (shutdown_wwise_system()) { + soundengine_state = AkUtils::AkSoundEngineState::AK_STATE_SHUTDOWN; UtilityFunctions::print("[Wwise] Shut down Wwise systems"); } } @@ -1133,6 +1136,8 @@ bool Wwise::suspend(bool render_anyway) { return ERROR_CHECK(AK::SoundEngine::Su bool Wwise::wakeup_from_suspend() { return ERROR_CHECK(AK::SoundEngine::WakeupFromSuspend()); } +AkUtils::AkSoundEngineState Wwise::get_soundengine_state() { return soundengine_state; } + void Wwise::event_callback(AkCallbackType callback_type, AkCallbackInfo* callback_info) { AkAutoLock scoped_lock(callback_data_lock); diff --git a/addons/Wwise/native/src/wwise_gdextension.h b/addons/Wwise/native/src/wwise_gdextension.h index cd4b921d..1ea64044 100644 --- a/addons/Wwise/native/src/wwise_gdextension.h +++ b/addons/Wwise/native/src/wwise_gdextension.h @@ -150,6 +150,7 @@ class Wwise : public Object bool remove_output(const unsigned int output_id); bool suspend(bool render_anyway); bool wakeup_from_suspend(); + AkUtils::AkSoundEngineState get_soundengine_state(); private: String GODOT_WINDOWS_SETTING_POSTFIX = ".Windows"; @@ -163,6 +164,8 @@ class Wwise : public Object String WWISE_SPATIAL_AUDIO_PATH = "spatial_audio/"; String WWISE_COMMUNICATION_SETTINGS_PATH = "wwise/communication_settings/"; + AkUtils::AkSoundEngineState soundengine_state{}; + static void event_callback(AkCallbackType callback_type, AkCallbackInfo* callback_info); static void bank_callback(AkUInt32 bank_id, const void* in_memory_bank_ptr, AKRESULT load_result, void* in_pCookie); diff --git a/addons/Wwise/native/src/wwise_godot_io.cpp b/addons/Wwise/native/src/wwise_godot_io.cpp index 0a9c896d..26e44055 100644 --- a/addons/Wwise/native/src/wwise_godot_io.cpp +++ b/addons/Wwise/native/src/wwise_godot_io.cpp @@ -57,31 +57,46 @@ AKRESULT AkIOHookGodot::open(const AkFileOpenData& in_file_open, AkFileDesc*& ou } bool use_names = in_file_open.fileID == AK_INVALID_FILE_ID; - - String final_file_path = banks_path; + String final_file_path{ banks_path }; String filename_format{}; - if (in_file_open.pFlags && in_file_open.eOpenMode == AK_OpenModeRead) + if (in_file_open.pFlags) { - if (in_file_open.pFlags->uCompanyID == AKCOMPANYID_AUDIOKINETIC && - in_file_open.pFlags->uCodecID == AKCODECID_BANK && in_file_open.pFlags->bIsLanguageSpecific) + if (in_file_open.eOpenMode == AK_OpenModeRead) { - final_file_path = final_file_path + language_folder + "/"; + if (in_file_open.pFlags->uCompanyID == AKCOMPANYID_AUDIOKINETIC) + { + if (in_file_open.pFlags->uCodecID == AKCODECID_BANK) + { + filename_format = ".bnk"; + } + else + { + final_file_path += "Media/"; + filename_format = ".wem"; + } + + if (in_file_open.pFlags->bIsLanguageSpecific) + { + final_file_path += language_folder + "/"; + } + } + else if (in_file_open.pFlags->uCompanyID == AKCOMPANYID_AUDIOKINETIC_EXTERNAL) + { + filename_format = ".wem"; + } } - - filename_format = in_file_open.pFlags->uCodecID == AKCODECID_BANK ? ".bnk" : ".wem"; } if (use_names) { char* filename; CONVERT_OSCHAR_TO_CHAR(in_file_open.pszFileName, filename); - - final_file_path = final_file_path + filename; + final_file_path += filename; } else { - final_file_path = final_file_path + String::num_int64(in_file_open.fileID) + filename_format; + final_file_path += String::num_int64(in_file_open.fileID) + filename_format; } FileHandle* const file_handle = memnew(FileHandle); @@ -99,6 +114,7 @@ AKRESULT AkIOHookGodot::open(const AkFileOpenData& in_file_open, AkFileDesc*& ou else { AkDelete(AkMemID_Streaming, out_p_file_desc); + memdelete(file_handle); out_p_file_desc = nullptr; } @@ -122,7 +138,7 @@ void AkIOHookGodot::read( } PackedByteArray file_buffer = file->get_buffer(io_transfer_info.uRequestedSize); - int size = file_buffer.size(); + int64_t size = file_buffer.size(); const uint8_t* data = file_buffer.ptr(); memcpy(io_transfer_info.pBuffer, data, size * sizeof(uint8_t)); @@ -248,6 +264,7 @@ AKRESULT AkIOHookGodot::Close(AkFileDesc* in_file_desc) if (file->get_error() == Error::OK) { AkDelete(AkMemID_Streaming, in_file_desc); + memdelete(file_handle); result = AK_Success; } } diff --git a/addons/Wwise/native/src/wwise_settings.cpp b/addons/Wwise/native/src/wwise_settings.cpp index 7b000320..3017aed9 100644 --- a/addons/Wwise/native/src/wwise_settings.cpp +++ b/addons/Wwise/native/src/wwise_settings.cpp @@ -30,7 +30,6 @@ void WwiseSettings::add_wwise_settings() add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "startup_language", String("English(US)"), Variant::Type::STRING); add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "load_init_bank_at_startup", false, Variant::Type::BOOL); add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "use_soundbank_names", true, Variant::Type::BOOL); - add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "suspend_at_focus_loss", true, Variant::Type::BOOL); add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "engine_logging", false, Variant::Type::BOOL); add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "maximum_number_of_positioning_paths", 255, Variant::Type::INT); add_setting(WWISE_COMMON_USER_SETTINGS_PATH + "command_queue_size", 262144, Variant::Type::INT); @@ -89,12 +88,6 @@ void WwiseSettings::add_wwise_settings() add_setting(WWISE_COMMON_ADVANCED_SETTINGS_PATH + "debug_out_of_range_check_enabled", false, Variant::Type::BOOL); add_setting(WWISE_COMMON_ADVANCED_SETTINGS_PATH + "debug_out_of_range_limit", 16.0f, Variant::Type::FLOAT); - // todo(alex): the following three settings are not yet implemented - add_setting(WWISE_COMMON_ADVANCED_SETTINGS_PATH + "render_during_focus_loss", false, Variant::Type::BOOL); - add_setting(WWISE_COMMON_ADVANCED_SETTINGS_PATH + "sound_bank_persistent_data_path", "", Variant::Type::STRING, - PROPERTY_HINT_DIR, ""); - add_setting(WWISE_COMMON_ADVANCED_SETTINGS_PATH + "use_async_open", false, Variant::Type::BOOL); - // communication settings add_setting(WWISE_COMMUNICATION_SETTINGS_PATH + "discovery_broadcast_port", 24024, Variant::Type::INT); add_setting(WWISE_COMMUNICATION_SETTINGS_PATH + "command_port", 0, Variant::Type::INT); diff --git a/addons/Wwise/native/src/wwise_utils.h b/addons/Wwise/native/src/wwise_utils.h index 4ed6d176..dfe1971e 100644 --- a/addons/Wwise/native/src/wwise_utils.h +++ b/addons/Wwise/native/src/wwise_utils.h @@ -1,10 +1,9 @@ #ifndef WWISE_UTILS_H #define WWISE_UTILS_H -#include "AK/SoundEngine/Common/AkCallback.h" -#include "AK/SoundEngine/Common/AkTypes.h" -#include "godot_cpp/classes/engine.hpp" -#include "godot_cpp/classes/file_access.hpp" +#include +#include +#include using namespace godot; diff --git a/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj b/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj index b95611be..4d73635f 100644 --- a/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj +++ b/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj @@ -159,6 +159,7 @@ + @@ -184,6 +185,7 @@ + @@ -197,6 +199,7 @@ + diff --git a/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj.filters b/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj.filters index 693fe4e3..4b7d96d2 100644 --- a/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj.filters +++ b/addons/Wwise/native/vs2022/wwise-gdextension.vcxproj.filters @@ -105,6 +105,9 @@ Source Files + + Source Files\editor + @@ -188,5 +191,11 @@ Source Files + + Source Files + + + Source Files\editor + \ No newline at end of file diff --git a/addons/Wwise/native/wwise.gdextension b/addons/Wwise/native/wwise.gdextension index 5a9e4598..fc9619f9 100644 --- a/addons/Wwise/native/wwise.gdextension +++ b/addons/Wwise/native/wwise.gdextension @@ -18,19 +18,19 @@ android.debug.arm64 = "res://addons/Wwise/native/lib/android/arm64/debug/libwwis android.release.arm64 = "res://addons/Wwise/native/lib/android/arm64/release/libwwise.android.template_release.arm64.so" [icons] -Wwise = "res://addons/Wwise/editor/images/wwise_node.svg" -Waapi = "res://addons/Wwise/editor/images/wwise_node.svg" -WwiseSettings = "res://addons/Wwise/editor/images/wwise_node.svg" -AkListener2D = "res://addons/Wwise/editor/images/wwise_node.svg" -AkListener3D = "res://addons/Wwise/editor/images/wwise_node.svg" -AkEvent2D = "res://addons/Wwise/editor/images/wwise_node.svg" -AkEvent3D = "res://addons/Wwise/editor/images/wwise_node.svg" -AkState = "res://addons/Wwise/editor/images/wwise_node.svg" -AkSwitch = "res://addons/Wwise/editor/images/wwise_node.svg" -AkBank = "res://addons/Wwise/editor/images/wwise_node.svg" -AkEnvironment = "res://addons/Wwise/editor/images/wwise_node.svg" -AkEnvironmentData = "res://addons/Wwise/editor/images/wwise_node.svg" -AkGeometry = "res://addons/Wwise/editor/images/wwise_node.svg" -AkPortal = "res://addons/Wwise/editor/images/wwise_node.svg" -AkRoom = "res://addons/Wwise/editor/images/wwise_node.svg" -AkEarlyReflections = "res://addons/Wwise/editor/images/wwise_node.svg" \ No newline at end of file +Wwise = "res://addons/Wwise/editor/images/Project_nor.svg" +Waapi = "res://addons/Wwise/editor/images/Project_nor.svg" +WwiseSettings = "res://addons/Wwise/editor/images/Project_nor.svg" +AkListener2D = "res://addons/Wwise/editor/images/Project_nor.svg" +AkListener3D = "res://addons/Wwise/editor/images/Project_nor.svg" +AkEvent2D = "res://addons/Wwise/editor/images/Project_nor.svg" +AkEvent3D = "res://addons/Wwise/editor/images/Project_nor.svg" +AkState = "res://addons/Wwise/editor/images/Project_nor.svg" +AkSwitch = "res://addons/Wwise/editor/images/Project_nor.svg" +AkBank = "res://addons/Wwise/editor/images/Project_nor.svg" +AkEnvironment = "res://addons/Wwise/editor/images/Project_nor.svg" +AkEnvironmentData = "res://addons/Wwise/editor/images/Project_nor.svg" +AkGeometry = "res://addons/Wwise/editor/images/Project_nor.svg" +AkPortal = "res://addons/Wwise/editor/images/Project_nor.svg" +AkRoom = "res://addons/Wwise/editor/images/Project_nor.svg" +AkEarlyReflections = "res://addons/Wwise/editor/images/Project_nor.svg" \ No newline at end of file diff --git a/addons/Wwise/runtime/wwise_runtime_manager.gd b/addons/Wwise/runtime/wwise_runtime_manager.gd index 282d0a5f..678ef7f0 100644 --- a/addons/Wwise/runtime/wwise_runtime_manager.gd +++ b/addons/Wwise/runtime/wwise_runtime_manager.gd @@ -1,14 +1,22 @@ extends Node +var render_callable = Callable(Wwise, &"render_audio") +var render_signal = &"process_frame" func _init(): Wwise.init() func _enter_tree(): - get_tree().connect("process_frame", Callable(Wwise, "render_audio")) + get_tree().connect(render_signal, render_callable) func _notification(what: int) -> void: - if what == NOTIFICATION_WM_CLOSE_REQUEST || what == NOTIFICATION_CRASH: + if what == NOTIFICATION_EXIT_TREE || what == NOTIFICATION_CRASH: + if Wwise.get_soundengine_state() == AkUtils.AK_STATE_SHUTDOWN: + return + + if get_tree().is_connected(render_signal, render_callable): + get_tree().disconnect(render_signal, render_callable) + Wwise.shutdown()