This commit is contained in:
Spencer Killen 2024-05-25 11:51:19 -06:00
parent 4d6af3d098
commit 6766c63abe
Signed by: sjkillen
GPG Key ID: 3AF3117BA6FBB75B
69 changed files with 1894 additions and 0 deletions

5
addons/fmod/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.dll
*.a
*.dylib
*.so
!libs/

View File

@ -0,0 +1,5 @@
# Here because gdextension does not support editor export plugin for now.
# https://github.com/godotengine/godot/issues/80593
@tool
class_name FmodEditorExportPluginProxy
extends FmodEditorExportPlugin

View File

@ -0,0 +1,11 @@
@tool
extends Node
func _ready():
process_mode = PROCESS_MODE_ALWAYS
func _process(delta):
FmodServer.update()
func _notification(what):
FmodServer.notification(what)

76
addons/fmod/FmodPlugin.gd Normal file
View File

@ -0,0 +1,76 @@
@tool
class_name FmodPlugin extends EditorPlugin
const ADDON_PATH = "res://addons/fmod"
@onready var theme = get_editor_interface().get_base_control().get_theme()
var fmod_bank_explorer_window: PackedScene = load("res://addons/fmod/tool/ui/FmodBankExplorer.tscn")
var bank_explorer: FmodBankExplorer
var fmod_button: Button
var export_plugin = FmodEditorExportPluginProxy.new()
var emitter_inspector_plugin = FmodEmitterPropertyInspectorPlugin.new(self)
var bank_loader_inspector_plugin = FmodBankLoaderPropertyInspectorPlugin.new(self)
func _init():
add_autoload_singleton("FmodManager", "res://addons/fmod/FmodManager.gd")
fmod_button = Button.new()
fmod_button.icon = load("res://addons/fmod/icons/fmod_icon.svg")
fmod_button.text = "Fmod Explorer"
fmod_button.pressed.connect(_on_project_explorer_button_clicked)
add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR, fmod_button)
bank_explorer = fmod_bank_explorer_window.instantiate()
bank_explorer.theme = get_editor_interface().get_base_control().get_theme()
bank_explorer.visible = false
add_child(bank_explorer)
add_inspector_plugin(bank_loader_inspector_plugin)
add_inspector_plugin(emitter_inspector_plugin)
func _on_project_explorer_button_clicked():
bank_explorer.should_display_copy_buttons = true
bank_explorer.should_display_select_button = false
_popup_project_explorer(FmodBankExplorer.ToDisplayFlags.BANKS | FmodBankExplorer.ToDisplayFlags.BUSES | FmodBankExplorer.ToDisplayFlags.VCA | FmodBankExplorer.ToDisplayFlags.EVENTS)
func open_project_explorer_events(on_select_callable: Callable):
_open_project_explorer(FmodBankExplorer.ToDisplayFlags.BANKS | FmodBankExplorer.ToDisplayFlags.EVENTS, on_select_callable)
func open_project_explorer_bank(on_select_callable: Callable):
_open_project_explorer(FmodBankExplorer.ToDisplayFlags.BANKS, on_select_callable)
func _open_project_explorer(display_flag: int, on_select_callable: Callable):
bank_explorer.should_display_copy_buttons = false
bank_explorer.should_display_select_button = true
_popup_project_explorer(display_flag, on_select_callable)
func _popup_project_explorer(to_display: int, callable: Callable = Callable()):
if bank_explorer.visible == true:
bank_explorer.close_window()
return
bank_explorer.regenerate_tree(to_display, callable)
bank_explorer.popup_centered()
func _enter_tree():
add_export_plugin(export_plugin)
func _exit_tree():
remove_inspector_plugin(emitter_inspector_plugin)
remove_inspector_plugin(bank_loader_inspector_plugin)
remove_control_from_container(EditorPlugin.CONTAINER_TOOLBAR, fmod_button)
fmod_button.queue_free()
remove_export_plugin(export_plugin)

View File

@ -0,0 +1,101 @@
[configuration]
entry_symbol = "fmod_library_init"
compatibility_minimum = 4.2
[libraries]
windows.editor.x86_64 = "res://addons/fmod/libs/windows/libGodotFmod.windows.editor.x86_64.dll"
windows.debug.x86_64 = "res://addons/fmod/libs/windows/libGodotFmod.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://addons/fmod/libs/windows/libGodotFmod.windows.template_release.x86_64.dll"
macos.editor = "res://addons/fmod/libs/macos/libGodotFmod.macos.editor.framework"
macos.debug = "res://addons/fmod/libs/macos/libGodotFmod.macos.template_debug.framework"
macos.release = "res://addons/fmod/libs/macos/libGodotFmod.macos.template_release.framework"
linux.editor.x86_64 = "res://addons/fmod/libs/linux/libGodotFmod.linux.editor.x86_64.so"
linux.debug.x86_64 = "res://addons/fmod/libs/linux/libGodotFmod.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/fmod/libs/linux/libGodotFmod.linux.template_release.x86_64.so"
android.debug.x86_64 = "res://addons/fmod/libs/android/x86_64/libGodotFmod.android.template_debug.x86_64.so"
android.release.x86_64 = "res://addons/fmod/libs/android/x86_64/libGodotFmod.android.template_release.x86_64.so"
android.debug.arm64 = "res://addons/fmod/libs/android/arm64/libGodotFmod.android.template_debug.arm64.so"
android.release.arm64 = "res://addons/fmod/libs/android/arm64/libGodotFmod.android.template_release.arm64.so"
ios.debug = "res://addons/fmod/libs/ios/libGodotFmod.ios.template_debug.universal.dylib"
ios.release = "res://addons/fmod/libs/ios/libGodotFmod.ios.template_release.universal.dylib"
[icons]
FmodEventEmitter2D = "res://addons/fmod/icons/fmod_icon.svg"
FmodEventEmitter3D = "res://addons/fmod/icons/fmod_icon.svg"
FmodListener2D = "res://addons/fmod/icons/fmod_icon.svg"
FmodListener3D = "res://addons/fmod/icons/fmod_icon.svg"
FmodBankLoader = "res://addons/fmod/icons/fmod_icon.svg"
[dependencies]
windows.editor.x86_64 = {
"libs/windows/fmodL.dll": "",
"libs/windows/fmodstudioL.dll": ""
}
windows.debug.x86_64 = {
"libs/windows/fmodL.dll": "",
"libs/windows/fmodstudioL.dll": ""
}
windows.release.x86_64 = {
"libs/windows/fmod.dll": "",
"libs/windows/fmodstudio.dll": ""
}
linux.editor.x86_64 = {
"libs/linux/libfmodL.so": "",
"libs/linux/libfmodL.so.13": "",
"libs/linux/libfmodL.so.13.12": "",
"libs/linux/libfmodstudioL.so": "",
"libs/linux/libfmodstudioL.so.13": "",
"libs/linux/libfmodstudioL.so.13.12": ""
}
linux.debug.x86_64 = {
"libs/linux/libfmodL.so": "",
"libs/linux/libfmodL.so.13": "",
"libs/linux/libfmodL.so.13.12": "",
"libs/linux/libfmodstudioL.so": "",
"libs/linux/libfmodstudioL.so.13": "",
"libs/linux/libfmodstudioL.so.13.12": ""
}
linux.release.x86_64 = {
"libs/linux/libfmod.so": "",
"libs/linux/libfmod.so.13": "",
"libs/linux/libfmod.so.13.12": "",
"libs/linux/libfmodstudio.so": "",
"libs/linux/libfmodstudio.so.13": "",
"libs/linux/libfmodstudio.so.13.12": ""
}
macos.editor = {
"libs/macos/libfmodL.dylib": "",
"libs/macos/libfmodstudioL.dylib": ""
}
macos.debug = {
"libs/macos/libfmodL.dylib": "",
"libs/macos/libfmodstudioL.dylib": ""
}
macos.release = {
"libs/macos/libfmod.dylib": "",
"libs/macos/libfmodstudio.dylib": ""
}
android.debug.x86_64 = {
"libs/android/x86_64/libfmodL.so": "",
"libs/android/x86_64/libfmodstudioL.so": "",
}
android.release.x86_64 = {
"libs/android/x86_64/libfmod.so": "",
"libs/android/x86_64/libfmodstudio.so": "",
}
android.debug.arm64 = {
"libs/android/arm64/libfmodL.so": "",
"libs/android/arm64/libfmodstudioL.so": "",
}
android.release.arm64 = {
"libs/android/arm64/libfmod.so": "",
"libs/android/arm64/libfmodstudio.so": "",
}
ios.debug = {
"libs/ios/libfmodL_iphoneos.a": "",
"libs/ios/libfmodstudioL_iphoneos.a": ""
}
ios.release = {
"libs/ios/libfmod_iphoneos.a": "",
"libs/ios/libfmodstudio_iphoneos.a": ""
}

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21" width="20" height="21">
<title>banks_icon</title>
<defs>
<image width="20" height="21" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAMAAABxCz6aAAAAAXNSR0IB2cksfwAAAapQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHR0dT09PUlJSWFhYV1dXUVFRS0tLKCgoAAAAAAAAAAAACgoKdnZ2kpKSjo6OjY2NkZGRh4eHAAAAAAAAAAAAAAAAGBgYVlZWUFBQMTExAAAAAAAABwcHKysrLCwsLi4uLS0tLy8vERERAAAAAAAAPDw8hoaGhYWFeXl5eHh4gYGBiYmJXFxcAAAAQUFBiIiIgICAhISEgoKCFRUVCAgIODg4dXV1YGBgAAAAQEBAg4ODe3t7ISEhEhISXV1dPz8/FhYWZmZmJCQkDAwMYmJiX19fIiIiJiYmf39/j4+PTU1NioqKCQkJbGxsMjIyd3d3fX19dHR0fn5+GhoaPj4+cnJyMzMzWlpaY2NjTk5OGxsbi4uLDQ0NZ2dnDg4OcXFxGRkZKioqZGRkfHx8EBAQW1tbAgICOzs7Q0NDHx8fCwsLREREcHBwR0dHaGhoSUlJFxcXJycnQkJCbm5uWVlZjIyMAAAAAAAAGhoaX19fMjIyAAAAAAAAAAAAAAAAnoaMsQAAAI50Uk5TABGKrbq9wcrJxa+THwrA///////////WGpv/////////wwlU//////+OxP/////////ly///////////6P/////////////n/////////////////////////////////////////////////////////////////////////////v///+a05vn2NoXh4LvdJzEAAAFmSURBVHicY2BgYGRiZmFlY+fgYOdkZeXi5mEAAl4+fgEBQSFhIBAREBAVE5cACkpKScvIykGArKy8Ar+iEoOyiqqaOhJQ01DRZNDS1tHVAQJdPT19EK1jYGjEYGwiZ2pqqiBnZm5hKWcFZMpZ2zBw2NrZ2zs4ijpJORu6uJra25u6uTNweNjZe3p5+/j6+QcEBgUr2JuGgAUtHUPDwiMi+aPsRKNjHKCCCoIqsXGm8QkKiYIqYaYQQSvLpORYj5RUg7T00IzMODuwYJZrdoqVY6CKSraXQ5RYjhVEMCE3L8ouX0UlOt7KtKAwCiwYVVQcUiJQEl1allMeV5FnBbUotjKoys612rTQKVfVXgEi6FDtXCZnF1zjIFuoIgq13c7etDbIILGu3rLOuRzueKDX8hpyg0p96oUULCGCjbLAUIiKamoWDjBtATJb0lsZ2to73EKAID0goBDC6ORk6Opm70EBvVrKAPo3aJSuHMDoAAAAAElFTkSuQmCC"/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://o2chsr07oeqs"
path="res://.godot/imported/bank_icon.svg-8de6c7bff09a67352e162b3c61b601de.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/bank_icon.svg"
dest_files=["res://.godot/imported/bank_icon.svg-8de6c7bff09a67352e162b3c61b601de.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=true

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21" width="20" height="21">
<title>bus_icon</title>
<defs>
<image width="20" height="21" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAMAAABxCz6aAAAAAXNSR0IB2cksfwAAAapQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHR0dT09PUlJSWFhYV1dXUVFRS0tLKCgoAAAAAAAAAAAACgoKdnZ2kpKSjo6OjY2NkZGRh4eHAAAAAAAAAAAAAAAAGBgYVlZWUFBQMTExAAAAAAAABwcHKysrLCwsLi4uLS0tLy8vERERAAAAAAAAPDw8hoaGhYWFeXl5eHh4gYGBiYmJXFxcAAAAQUFBiIiIgICAhISEgoKCFRUVCAgIODg4dXV1YGBgAAAAQEBAg4ODe3t7ISEhEhISXV1dPz8/FhYWZmZmJCQkDAwMYmJiX19fIiIiJiYmf39/j4+PTU1NioqKCQkJbGxsMjIyd3d3fX19dHR0fn5+GhoaPj4+cnJyMzMzWlpaY2NjTk5OGxsbi4uLDQ0NZ2dnDg4OcXFxGRkZKioqZGRkfHx8EBAQW1tbAgICOzs7Q0NDHx8fCwsLREREcHBwR0dHaGhoSUlJFxcXJycnQkJCbm5uWVlZjIyMAAAAAAAAGhoaX19fMjIyAAAAAAAAAAAAAAAAnoaMsQAAAI50Uk5TABGKrbq9wcrJxa+THwrA///////////WGpv/////////wwlU//////+OxP/////////ly///////////6P/////////////n/////////////////////////////////////////////////////////////////////////////v///+a05vn2NoXh4LvdJzEAAAFmSURBVHicY2BgYGRiZmFlY+fgYOdkZeXi5mEAAl4+fgEBQSFhIBAREBAVE5cACkpKScvIykGArKy8Ar+iEoOyiqqaOhJQ01DRZNDS1tHVAQJdPT19EK1jYGjEYGwiZ2pqqiBnZm5hKWcFZMpZ2zBw2NrZ2zs4ijpJORu6uJra25u6uTNweNjZe3p5+/j6+QcEBgUr2JuGgAUtHUPDwiMi+aPsRKNjHKCCCoIqsXGm8QkKiYIqYaYQQSvLpORYj5RUg7T00IzMODuwYJZrdoqVY6CKSraXQ5RYjhVEMCE3L8ouX0UlOt7KtKAwCiwYVVQcUiJQEl1allMeV5FnBbUotjKoys612rTQKVfVXgEi6FDtXCZnF1zjIFuoIgq13c7etDbIILGu3rLOuRzueKDX8hpyg0p96oUULCGCjbLAUIiKamoWDjBtATJb0lsZ2to73EKAID0goBDC6ORk6Opm70EBvVrKAPo3aJSuHMDoAAAAAElFTkSuQmCC"/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dj1kag4aeg58t"
path="res://.godot/imported/bus_icon.svg-f536ffd3c4893e79a9d3cb9a1b4fb50c.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/bus_icon.svg"
dest_files=["res://.godot/imported/bus_icon.svg-f536ffd3c4893e79a9d3cb9a1b4fb50c.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=true

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 21" width="18" height="21">
<title>c_parameter_icon</title>
<defs>
<image width="18" height="21" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAVCAMAAAB8FU7dAAAAAXNSR0IB2cksfwAAALdQTFRFAAAAAAAAAAAAAAAAAAAAHx8fTExMSEhIMTExAAAAAAAAOzs7jo6OiIiIj4+PXFxcAAAAODg4h4eHgICAb29vV1dXAAAAMDAwc3NzEBAQAAAAKCgoe3t7AAAACgoKNDQ0AAAAbW1tY2NjBAQEX19fMjIyQ0NDGRkZAAAAa2trDAwMDw8PPz8/U1NTICAgR0dHGxsbLCwsS0tLAAAAAAAAf39/enp6GBgYT09PPDw8fn5+AAAAFBQUHGvHAgAAAD10Uk5Ti+ztr93/////6NX//////+H//////9b////////7///+/////////9z/////////////5/P////////8/yfQ/xAAAADPSURBVHicbdDXEoIwEAXQ2BVUhIjlgjX2horY//+73CUyg2UfMpMzyezuFSKT/aycyBeKpVQVyxVhmNVaqupWQxi2I5NqSum4DdFqJ9TpwvOZev2EPAADpiFGWsZQE4URURZTTW3YcoY50QKqw+IrLKW/wow6rrFh2mJHZ4A9kYeVT5cDjtxVIaS55gjif/F/Eycii58FKEQR0RlDnv5CvS64skhnDyaayKaXmsyY5I3mPkb3mNyHXvv2tN9bOW74kYTUSRhm/TuvP6n+Zv8CeG0dU9iBm/oAAAAASUVORK5CYII="/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmvcqfsl167te"
path="res://.godot/imported/c_parameter_icon.svg-04115c2482c9a6874356ffdc09c41db0.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/c_parameter_icon.svg"
dest_files=["res://.godot/imported/c_parameter_icon.svg-04115c2482c9a6874356ffdc09c41db0.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=true

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 21" width="18" height="21">
<title>d_parameter_icon</title>
<defs>
<image width="18" height="21" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAVCAMAAAB8FU7dAAAAAXNSR0IB2cksfwAAAGxQTFRFAAAAAAAAAAAAAAAAAAAAHx8fTExMSEhIMTExAAAAAAAAOzs7jo6OiIiIj4+PXFxcAAAAODg4h4eHgICAV1dXPz8/Q0NDKysrAAAAX19fAAAANzc3NjY2VlZWf39/AAAAGxsbAwMDTk5OR0dHZLhzlQAAACR0Uk5Ti+ztr93/////6NX//////+H/////////8P///////+r/////RH/TkgAAAHVJREFUeJx1kNsSgjAMRAPSIlQrFsKlykX4/3/U6YwlbeA8ntnZSRYgSUMukAmZE+S1gFLd7gT9qKB8mppgGqLQ0Xa9V4P94xVaEafQou96cfXmSnEVdY2Bmk5SPzUvrTtb7Mof/VnjFG78bbKE0vFeB6vy7b+Cnhf2Pv5vKwAAAABJRU5ErkJggg=="/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 773 B

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dgna04txtwnyb"
path="res://.godot/imported/d_parameter_icon.svg-d339e4e3f950ae8593b999ef51579136.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/d_parameter_icon.svg"
dest_files=["res://.godot/imported/d_parameter_icon.svg-d339e4e3f950ae8593b999ef51579136.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=true

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 18" width="23" height="18">
<title>event_icon</title>
<defs>
<image width="23" height="18" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASCAMAAACHObUhAAAAAXNSR0IB2cksfwAAAQJQTFRFAAAAAAAAAAAAAQEBAQEBAAAAAQEBAAAAAQEBFBQUMjIyMzMzFBQUAQEBAAAAOTk5ZmZmfHx8gICAfn5+ODg4AAAAAQEBExMTHx8fGhoaVlZWf39/c3NzHBwcZGRkAQEBAAAALy8vHh4eAQEBEBAQQEBAPDw8dXV1MTExAwMDFBQUKioqcXFxBAQEFxcXREREDAwMGxsbWVlZdnZ2BgYGQ0NDcHBwEhISW1tbFhYWaGhoY2NjZWVlfX19ISEhJiYmbGxseHh4aWlpTk5OUVFReXl5FRUVYGBgAAAAEhISAQEBAAAANzc3AAAAAQEBExMTAAAAAAAAAQEBAQEBAQEBAAAAb2thKAAAAFZ0Uk5TAAFn1/r/1max/v///bBu////////a9r+/////////9n8////////////////////////////////////////////////////+/7YbP9qr/2uZdX51GPSbw3+AAAA00lEQVR4nG2R13LCQAxFtQEFYqp36RDAVJNQQichjd4htP//FbzYzHhNzpuORprRFQB5sNnRjP3RQQCIE58klxnJjR4CXvT5ZSrAAhiEUJhForE4rxPP0StJFk5BWqGZbC6S1Lyc93EKRaqkAVWaQSy9vJZNm1Q0PGKlWvvXv9UbtFnmJEy+VW3LtNPV6d185V1qatPxjz7n88vw3z+/4gGGH1Aruh+OBMYT7rW7lKnIjCpznsPdGrZYwgoD1gZb4wbIFneWnHf4xx+wP4h/OZ7OBC6I7CrbsYtaRQAAAABJRU5ErkJggg=="/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cmpgmbn3y4svl"
path="res://.godot/imported/event_icon.svg-4e6e2103d076f95b7bef82f079e433e6.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/event_icon.svg"
dest_files=["res://.godot/imported/event_icon.svg-4e6e2103d076f95b7bef82f079e433e6.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=true

BIN
addons/fmod/icons/fmod_emitter.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cotpb54utx6d6"
path="res://.godot/imported/fmod_emitter.png-6783a287e298e2a04e64a6deaa6fe366.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/fmod_emitter.png"
dest_files=["res://.godot/imported/fmod_emitter.png-6783a287e298e2a04e64a6deaa6fe366.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

View File

@ -0,0 +1 @@
<svg height="16" viewBox="0 0 512 512" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m257 8.7c7.4.2 17.8.8 23 1.4 5.2.5 13.8 1.8 19 2.9s14.2 3.3 20 4.9c5.8 1.7 15.2 4.9 21 7.1 5.8 2.3 15.7 6.7 22 9.9s15.3 8.2 20 11.1 11.6 7.7 15.5 10.6c3.9 2.8 10.8 8.5 15.5 12.6 4.6 4 12 11.3 16.3 16.3s11 13.7 14.9 19.5 9 14.5 11.4 19.5c2.4 4.9 5.8 13.3 7.5 18.5 2.3 6.7 3.3 12 3.7 18 .3 6.1-.1 10.3-1.3 15-1 3.6-2.8 8.8-4.1 11.5-1.2 2.8-4.2 7.7-6.7 11-2.4 3.3-7.1 8-16.4 15l6.1 10.5c3.4 5.8 8 15.2 10.2 21 2.3 5.8 5.3 15.2 6.8 21 1.4 5.8 3.3 16.1 4.2 23 1.1 8.5 1.4 16 1 23.5-.3 6.1-1.4 16.2-2.5 22.5s-3.1 15.3-4.5 20-4.7 13.9-7.5 20.5-7.9 16.7-11.4 22.5c-3.4 5.8-8.9 14.1-12.2 18.5s-11.1 13.3-17.5 19.9c-6.3 6.5-15.1 14.7-19.5 18.3-4.4 3.5-12.5 9.4-18 13.1-5.5 3.6-15.6 9.4-22.5 12.8s-16.8 7.8-22 9.7c-5.2 2-13.8 4.7-19 6-5.2 1.4-13.8 3.3-19 4.2s-17.4 2-27 2.5c-14.3.6-20 .4-31.5-1.1-7.7-1-18.5-2.7-24-4-5.5-1.2-14.7-3.6-20.5-5.5-5.8-1.8-15.4-5.4-21.5-7.9s-15.7-7.1-21.5-10.2c-5.8-3-14.8-8.4-20-11.8-5.2-3.5-13.1-9.2-17.5-12.8-4.4-3.5-13-11.6-19-17.9-6-6.2-14-15.6-17.8-20.8-3.7-5.2-9.4-14.9-12.7-21.5s-7.1-15.6-8.6-20c-1.5-4.6-2.8-11.4-3.1-16-.3-5.4 0-10.4 1.1-15.5.9-4.1 3.1-10.4 4.9-14 1.8-3.7 6-9.4 9.7-13.3 3.6-3.8 8-7.8 13-10.7l-2.2-3.7c-1.2-2.1-4.1-7.2-6.5-11.3s-6.1-12-8.2-17.5c-2.2-5.5-5.1-14.3-6.5-19.5-1.5-5.2-3.3-14.6-4.1-20.7-.8-6.2-1.5-16.2-1.5-22.3s.7-16.1 1.5-22.2c.8-6.2 2.6-15.4 3.9-20.3s4.1-13.5 6.1-19 6-14.5 8.9-20 8-14 11.3-19c3.3-4.9 9.4-13 13.5-18 4.1-4.9 11.3-12.6 15.9-17s12.7-11.4 17.9-15.4 13.6-9.8 18.5-12.9c4.9-3 14.8-8.4 22-11.8s17.7-7.8 23.5-9.7 15.9-4.7 22.5-6.1c6.6-1.5 16.5-3.2 22-3.9s16.1-1.1 23.5-1z"/><path d="m255.3 55.2c5.9-.1 15.8.5 21.9 1.3 6.2.8 16.7 2.8 23.3 4.5s17.2 5.1 23.5 7.6 15.8 6.9 21 9.6c5.2 2.8 14.2 8.2 19.9 12.2 5.8 3.9 15 11.4 20.4 16.6 5.5 5.2 12.9 13.3 16.4 18s9 13.7 12.1 20c4.3 8.7 5.7 12.8 6 17 .4 4.8.1 5.9-2.2 8.7-1.6 2-4.1 3.7-6.4 4.3-2 .5-5.1.6-6.7.2-1.6-.3-4-1.8-5.3-3.2s-3.9-6.3-5.8-11c-1.8-4.7-5.3-11.4-7.7-15s-6.6-9-9.3-12.1-8-8.5-11.9-11.9-11.3-9-16.5-12.5-14-8.6-19.5-11.3c-5.5-2.8-14.5-6.6-20-8.5s-14.1-4.4-19-5.5c-4.9-1.2-13.9-2.6-20-3.3-6.3-.6-15-.8-20.5-.5-5.2.4-13.8 1.6-19 2.6-5.2 1.1-13.6 3.3-18.5 5.1-4.9 1.7-12.6 4.8-17 6.9s-11.6 6.2-16 9c-4.4 2.9-11.8 8.5-16.5 12.4-4.6 3.9-11.8 11.2-16 16.2-4.1 5.1-9.6 12.7-12.2 17-2.5 4.4-6.1 11.5-7.8 15.9-1.8 4.4-4.1 11.4-5.2 15.5-1 4.1-2.2 12.2-2.5 18-.4 6.4-.1 13.8.7 19 .6 4.7 2.1 11.4 3.2 15s3.8 10.1 6 14.5 6 10.9 8.6 14.5c2.5 3.6 8.2 10.1 12.7 14.5 4.4 4.4 12.3 10.9 17.5 14.4s13.1 8.1 17.5 10.3 13.2 5.8 19.5 7.9 15.1 4.5 19.5 5.4 10.8 1.9 20.5 3v-148.5h11.5c6.3 0 15.9.5 21.2 1.1 5.4.6 14.1 2 19.3 3.1s14.2 3.5 20 5.4 16.8 6.6 24.5 10.4 18.3 10 23.5 13.7c5.2 3.8 13.5 10.9 18.5 15.9 4.9 4.9 11.5 12.6 14.7 17 3.1 4.3 7.6 12 10.1 16.9s5.7 12.7 7.1 17.2c1.4 4.6 3.3 12.2 4.1 17 .8 4.9 1.5 14 1.5 20.3s-.7 15.8-1.5 21c-.9 5.2-3.1 14-4.9 19.5-1.9 5.5-5.2 13.6-7.4 18s-6.8 12.3-10.3 17.5-10.9 14.2-16.4 19.9-14.1 13.5-19 17.4c-4.9 3.8-13.1 9.3-18 12.2-4.9 3-12.6 7-17 9s-12.5 5.2-18 7-14.9 4.3-21 5.4c-6.1 1.2-16.4 2.4-23 2.8-6.9.3-16.7.1-23-.6-6.1-.7-15.3-2.1-20.5-3.3-5.2-1.1-14-3.5-19.5-5.3s-14.9-5.4-21-8.1-15.1-7.4-20-10.3c-4.9-3-13.1-8.4-18-12.1s-13.5-11.4-19-17.2c-5.5-5.7-12.1-13.5-14.7-17.3-2.5-3.9-6.8-11.5-9.4-17s-5-12.1-5.3-14.6c-.6-4.5-.4-4.9 3.5-8.8 3.6-3.5 4.8-4.1 8.5-4.1 2.5 0 5.7.8 7.4 1.8 2.3 1.4 3.9 4 6.7 10.8 2.1 4.9 6.1 12.3 8.9 16.4s7.2 9.9 9.8 12.8c2.5 2.9 8 8.1 12.1 11.6s10.9 8.5 15 11.3 12.7 7.6 19 10.8 16.7 7.5 23 9.6 15 4.5 19.2 5.3c4.3.9 12.4 2.1 18 2.7 5.7.6 14.4.8 19.3.4s12.8-1.3 17.5-2.1 13.2-3.1 19-5 15-5.8 20.5-8.6c5.5-2.7 13.1-7.2 17-9.8 3.9-2.7 10.6-8 14.9-11.7 4.4-3.7 11.1-10.7 15-15.4 3.9-4.8 9.2-12.2 11.8-16.5 2.5-4.4 6.1-11.5 7.8-15.9 1.8-4.4 4.2-11.4 5.3-15.5 1.7-6.1 2-10.5 2-23.5s-.3-17.4-2-23.5c-1.1-4.1-3.5-10.9-5.3-15-1.7-4.1-5.7-11.3-8.8-16s-9.4-12.3-14.2-17c-4.7-4.7-12.8-11.4-18-15-5.2-3.5-14-8.5-19.5-11.1s-13.6-6-18-7.4c-4.4-1.5-11.9-3.6-16.8-4.6-4.8-1-11.9-2.2-22.7-3.4v148.5h-12c-6.6 0-17.3-.7-23.8-1.5-6.4-.9-16.4-2.7-22.2-4.1s-14.8-4.2-20-6.1-14.7-6.2-21-9.4c-6.3-3.3-15.7-9-20.9-12.7s-13.1-10.3-17.6-14.7-10.8-11.6-14.1-16-8.2-12.5-11.1-18c-2.8-5.5-6.3-13.7-7.7-18.3-1.4-4.5-3.3-12.1-4.1-17-.8-4.8-1.5-13.9-1.5-20.2s.7-15.8 1.5-21c.9-5.2 3.1-14 4.9-19.5 1.9-5.5 5.3-13.8 7.6-18.5s6.9-12.3 10.1-17 8.6-11.7 12.1-15.6c3.5-4 9-9.6 12.3-12.5 3.3-3 8.7-7.5 12-10 3.3-2.6 9.8-7 14.5-10 4.7-2.9 12.6-7.2 17.5-9.5s13.7-5.8 19.5-7.7 15.4-4.5 21.5-5.6 12.6-2.2 14.5-2.4 8.3-.5 14.2-.5z" fill="#6ccdf4"/></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bwqq5q7kodk40"
path="res://.godot/imported/fmod_icon.svg-cca7eb13231881fafaea0d598d407ea3.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/fmod_icon.svg"
dest_files=["res://.godot/imported/fmod_icon.svg-cca7eb13231881fafaea0d598d407ea3.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=true

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 18" width="23" height="18">
<title>snapshot_icon</title>
<defs>
<image width="23" height="18" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAASCAMAAACHObUhAAAAAXNSR0IB2cksfwAAAPxQTFRFAAAAAAAAAAAAAQEBAQEBAAAAAQEBAAAAAQEBFBQUMjIyMzMzFBQUAQEBAAAAOTk5ZmZmfHx8gICAfn5+ODg4AAAAAQEBExMTHx8fGhoaVVVVf39/R0dHFBQUdnZ2UlJSa2trAQEBAAAALy8vHh4eAQEBEBAQZGRkPDw8dHR0SUlJZ2dnMTExAwMDKioqcHBwBQUFCAgIBAQEFxcXQ0NDYmJiDAwMGxsbWVlZBgYGc3NzKCgoFhYWISEhJiYmbGxsWFhYeHh4VFRUCwsLbW1tRkZGAAAAEhISAQEBAAAANzc3AAAAAQEBExMTAAAAAAAAAQEBAQEBAQEBAAAAvMGz4gAAAFR0Uk5TAAFn1/r/1max/v///bBu////////a9r+////////////2fz///////////////////////////////////////////////v+2Gz/aq/9rmXV+dRjwdo0YQAAAN1JREFUeJxtkX1XAWEQxeeJGy3RznorlrClImUpL6GEUIny/b9L9gXPOu5fc35zzszcO0TiyOeHLP9xQBCJIE6UkCwljFNBEUTPVPZIiyFOiaSWOr9I2yCjZ5lz+qWWzFOhyMbVdapk8RvcMt+hzMUCocIGcK9XHxxeekSNK3A5YNYbNn9a12mJPzdbB3i73lCdOZ0XRDdzzK6S9ex1eK//ap/5ZkKX+cD18w4MZc6H+NrXRqMexq6vDyuHbWObw2RKM8R2DTe3T3yR+MZ8L+c5fqwHLJbev/z+rQT9A5sFJPmrtG2HAAAAAElFTkSuQmCC"/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b4jxbh86chubi"
path="res://.godot/imported/snapshot_icon.svg-7b517248819b3685844766808fbce2a5.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/snapshot_icon.svg"
dest_files=["res://.godot/imported/snapshot_icon.svg-7b517248819b3685844766808fbce2a5.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=true

View File

@ -0,0 +1,9 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21" width="20" height="21">
<title>vca_icon</title>
<defs>
<image width="20" height="21" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAMAAABxCz6aAAAAAXNSR0IB2cksfwAAAapQTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHR0dT09PUlJSWFhYV1dXUVFRS0tLKCgoAAAAAAAAAAAACgoKdnZ2kpKSjo6OjY2NkZGRh4eHAAAAAAAAAAAAAAAAGBgYVlZWUFBQMTExAAAAAAAABwcHKysrLCwsLi4uLS0tLy8vERERAAAAAAAAPDw8hoaGhYWFeXl5eHh4gYGBiYmJXFxcAAAAQUFBiIiIgICAhISEgoKCFRUVCAgIODg4dXV1YGBgAAAAQEBAg4ODe3t7ISEhEhISXV1dPz8/FhYWZmZmJCQkDAwMYmJiX19fIiIiJiYmf39/j4+PTU1NioqKCQkJbGxsMjIyd3d3fX19dHR0fn5+GhoaPj4+cnJyMzMzWlpaY2NjTk5OGxsbi4uLDQ0NZ2dnDg4OcXFxGRkZKioqZGRkfHx8EBAQW1tbAgICOzs7Q0NDHx8fCwsLREREcHBwR0dHaGhoSUlJFxcXJycnQkJCbm5uWVlZjIyMAAAAAAAAGhoaX19fMjIyAAAAAAAAAAAAAAAAnoaMsQAAAI50Uk5TABGKrbq9wcrJxa+THwrA///////////WGpv/////////wwlU//////+OxP/////////ly///////////6P/////////////n/////////////////////////////////////////////////////////////////////////////v///+a05vn2NoXh4LvdJzEAAAFmSURBVHicY2BgYGRiZmFlY+fgYOdkZeXi5mEAAl4+fgEBQSFhIBAREBAVE5cACkpKScvIykGArKy8Ar+iEoOyiqqaOhJQ01DRZNDS1tHVAQJdPT19EK1jYGjEYGwiZ2pqqiBnZm5hKWcFZMpZ2zBw2NrZ2zs4ijpJORu6uJra25u6uTNweNjZe3p5+/j6+QcEBgUr2JuGgAUtHUPDwiMi+aPsRKNjHKCCCoIqsXGm8QkKiYIqYaYQQSvLpORYj5RUg7T00IzMODuwYJZrdoqVY6CKSraXQ5RYjhVEMCE3L8ouX0UlOt7KtKAwCiwYVVQcUiJQEl1allMeV5FnBbUotjKoys612rTQKVfVXgEi6FDtXCZnF1zjIFuoIgq13c7etDbIILGu3rLOuRzueKDX8hpyg0p96oUULCGCjbLAUIiKamoWDjBtATJb0lsZ2to73EKAID0goBDC6ORk6Opm70EBvVrKAPo3aJSuHMDoAAAAAElFTkSuQmCC"/>
</defs>
<style>
</style>
<use id="Background" href="#img1" x="0" y="0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://crsj4jjaeq87a"
path="res://.godot/imported/vca_icon.svg-def43f27fe148a7a0b18c7dcaab20c79.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/fmod/icons/vca_icon.svg"
dest_files=["res://.godot/imported/vca_icon.svg-def43f27fe148a7a0b18c7dcaab20c79.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=true

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
addons/fmod/plugin.cfg Normal file
View File

@ -0,0 +1,7 @@
[plugin]
name="FMOD GDExtension"
description="FMOD GDExtension for Godot Engine 4.0"
author="Utopia-rise, Tristan Grespinet, Pierre-Thomas Meisels"
version="4.0.0"
script="FmodPlugin.gd"

View File

@ -0,0 +1,20 @@
class_name FmodBankLoaderPropertyInspectorPlugin extends EditorInspectorPlugin
static var bank_icon = load("res://addons/fmod/icons/bank_icon.svg")
var _open_project_explorer_callable: Callable
func _init(plugin: FmodPlugin):
_open_project_explorer_callable = plugin.open_project_explorer_bank
func _can_handle(object: Object):
return object is FmodBankLoader
func _parse_property(object: Object, type: Variant.Type, name: String, hint_type: PropertyHint, hint_string: String, usage_flags: int, wide: bool):
return name == "bank_paths"
func _parse_category(object: Object, category: String):
if category != "FmodBankLoader":
return
var editor_property := FmodBankPathEditorProperty.new(_open_project_explorer_callable)
add_property_editor_for_multiple_properties("Fmod banks", PackedStringArray(["bank_paths"]), editor_property)

View File

@ -0,0 +1,21 @@
class_name FmodEmitterPropertyInspectorPlugin extends EditorInspectorPlugin
var _open_project_explorer_callable: Callable
var _event_editor_property_scene: PackedScene = load("res://addons/fmod/tool/property_editors/FmodEventEditorProperty.tscn")
func _init(plugin: FmodPlugin):
_open_project_explorer_callable = plugin.open_project_explorer_events
func _can_handle(object: Object):
return object is FmodEventEmitter2D or \
object is FmodEventEmitter3D
func _parse_property(object: Object, type: Variant.Type, name: String, hint_type: PropertyHint, hint_string: String, usage_flags: int, wide: bool):
return name == "event_name" || name == "event_guid"
func _parse_category(object: Object, category: String):
if category != "FmodEventEmitter2D" and category != "FmodEventEmitter3D":
return
var editor_property := _event_editor_property_scene.instantiate()
editor_property.initialize(_open_project_explorer_callable, "event_name", "event_guid")
add_property_editor_for_multiple_properties("Fmod event", PackedStringArray(["event_name", "event_guid"]), editor_property)

View File

@ -0,0 +1,95 @@
class_name FmodBankPathEditorProperty extends EditorProperty
var path_property_name := "bank_paths"
var ui: Control
var last_selected_index := -1
func _init(open_project_explorer_callable: Callable):
ui = load("res://addons/fmod/tool/property_editors/FmodBankPathsPropertyEditorUi.tscn").instantiate()
add_child(ui)
var add_button: Button = ui.get_node("%AddButton")
var open_project_explorer_event = func open_project_explorer_event():
open_project_explorer_callable.call(self._set_path_and_guid)
add_button.pressed.connect(open_project_explorer_event)
var remove_button: Button = ui.get_node("%RemoveButton")
remove_button.pressed.connect(_on_remove_button)
var manual_add_button: Button = ui.get_node("%ManualAddButton")
manual_add_button.pressed.connect(_on_manual_add_button)
var up_button: Button = ui.get_node("%UpButton")
up_button.pressed.connect(_on_up_button)
var down_button: Button = ui.get_node("%DownButton")
down_button.pressed.connect(_on_down_button)
func _update_property():
var bank_list: ItemList = ui.get_node("%BankList")
bank_list.clear()
var bank_paths: Array = get_edited_object()[path_property_name]
for path in bank_paths:
bank_list.add_item(path)
if last_selected_index == -1:
return
bank_list.select(last_selected_index)
last_selected_index = -1
func _set_path_and_guid(path: String, _cancel: String):
var bank_list: ItemList = ui.get_node("%BankList")
var current_bank_paths: Array = get_edited_object()[path_property_name]
if current_bank_paths.has(path):
return
var bank_paths := Array(current_bank_paths)
bank_paths.append(path)
emit_changed(path_property_name, bank_paths)
func _on_remove_button():
var bank_list: ItemList = ui.get_node("%BankList")
var current_bank_paths: Array = get_edited_object()[path_property_name]
var bank_paths := Array(current_bank_paths)
var selected_items_indexes: PackedInt32Array = bank_list.get_selected_items()
if selected_items_indexes.is_empty():
return
var item = bank_list.get_item_text(selected_items_indexes[0])
var in_list_index = bank_paths.find(item)
bank_paths.remove_at(in_list_index)
last_selected_index = in_list_index if in_list_index < bank_paths.size() else in_list_index - 1
emit_changed(path_property_name, bank_paths)
func _on_manual_add_button():
var manual_add_line_edit: LineEdit = ui.get_node("%ManualAddLineEdit")
var to_add: String = manual_add_line_edit.text
if not to_add.begins_with("res://") || not to_add.ends_with(".bank"):
return
_set_path_and_guid(to_add, "")
manual_add_line_edit.text = ""
func _on_up_button():
_on_move_button(false)
func _on_down_button():
_on_move_button(true)
func _on_move_button(is_down: bool):
var bank_list: ItemList = ui.get_node("%BankList")
var current_bank_paths: Array = get_edited_object()[path_property_name]
var bank_paths := Array(current_bank_paths)
var selected_items_indexes: PackedInt32Array = bank_list.get_selected_items()
if selected_items_indexes.is_empty():
return
var item = bank_list.get_item_text(selected_items_indexes[0])
var in_list_index = bank_paths.find(item)
var boundary = current_bank_paths.size() - 1 if is_down else 0
if in_list_index == boundary:
return
var new_index = in_list_index + 1 if is_down else in_list_index - 1
bank_paths.remove_at(in_list_index)
bank_paths.insert(new_index, item)
last_selected_index = new_index
emit_changed(path_property_name, bank_paths)

View File

@ -0,0 +1,60 @@
[gd_scene load_steps=2 format=3 uid="uid://dtlwk8wdeal3h"]
[ext_resource type="Texture2D" uid="uid://bkqdeaojmbbaj" path="res://addons/fmod/icons/bank_icon.svg" id="1_11c48"]
[node name="FmodBankPathsPropertyEditorUi" type="VBoxContainer"]
offset_right = 92.0
offset_bottom = 43.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="AddButton" type="Button" parent="HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "+"
icon = ExtResource("1_11c48")
icon_alignment = 2
[node name="RemoveButton" type="Button" parent="HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "-"
[node name="VSeparator" type="VSeparator" parent="HBoxContainer"]
layout_mode = 2
[node name="UpButton" type="Button" parent="HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "↑"
[node name="DownButton" type="Button" parent="HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
text = "↓"
[node name="BankList" type="ItemList" parent="."]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
auto_height = true
[node name="HBoxContainer2" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="ManualAddLineEdit" type="LineEdit" parent="HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
[node name="ManualAddButton" type="Button" parent="HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
text = "+"

View File

@ -0,0 +1,80 @@
@tool class_name FmodEventEditorProperty extends FmodPathEditorProperty
static var EVENT_PARAMETER_PREFIX_FOR_PROPERTIES = "event_parameter"
var former_event_description: FmodEventDescription
func _update_property():
super()
if get_edited_object().event_name == "":
return
_update_parameters()
var event_description: FmodEventDescription = FmodServer.get_event_from_guid(get_edited_object().event_guid)
former_event_description = event_description
func _set_path_and_guid(path: String, guid: String):
super(path, guid)
if get_edited_object().event_name == "":
return
_update_parameters()
former_event_description = FmodServer.get_event_from_guid(get_edited_object().event_guid)
func _update_parameters():
var event_description: FmodEventDescription = FmodServer.get_event_from_guid(get_edited_object().event_guid)
if former_event_description != null and event_description != former_event_description:
get_edited_object().tool_remove_all_parameters()
var map_to_property_name = func map_to_property_name(dict: Dictionary):
return dict["name"]
var filter_fmod_parameter_property = func filter_fmod_parameter_property(parameter_name: String):
return parameter_name.begins_with(EVENT_PARAMETER_PREFIX_FOR_PROPERTIES)
var filter_property_id = func filter_property_id(property: String):
return property.ends_with("/id")
var existing_property_ids = get_edited_object().get_property_list().map(map_to_property_name).filter(filter_fmod_parameter_property).filter(filter_property_id)
var map_property_name_to_parameter_name = func map_property_name_to_parameter_name(parameter: String):
return parameter.split("/")[1]
var existing_parameter_names = existing_property_ids.map(map_property_name_to_parameter_name)
var map_property_id_to_parameter_id_value = func map_property_id_to_parameter_id_value(property: String):
return get_edited_object()[property]
var existing_parameter_ids = existing_property_ids.map(map_property_id_to_parameter_id_value)
var property_matching = existing_parameter_ids.map(func(id): return false)
for param in event_description.get_parameters():
var parameter_name = param.get_name()
var parameter_id_param = "%s/%s/id" % [EVENT_PARAMETER_PREFIX_FOR_PROPERTIES, parameter_name]
var parameter_value_param = "%s/%s/value" % [EVENT_PARAMETER_PREFIX_FOR_PROPERTIES, parameter_name]
var parameter_min_value_param = "%s/%s/min_value" % [EVENT_PARAMETER_PREFIX_FOR_PROPERTIES, parameter_name]
var parameter_max_value_param = "%s/%s/max_value" % [EVENT_PARAMETER_PREFIX_FOR_PROPERTIES, parameter_name]
var parameter_default_value_param = "%s/%s/default_value" % [EVENT_PARAMETER_PREFIX_FOR_PROPERTIES, parameter_name]
var existing_property_name_index = existing_property_ids.find(parameter_id_param)
var are_properties_already_in_node = existing_property_name_index != -1
var parameter_id = param.get_id()
if are_properties_already_in_node:
property_matching[existing_property_name_index] = existing_parameter_ids[existing_property_name_index] == parameter_id
if not are_properties_already_in_node or get_edited_object()[parameter_id_param] == null:
get_edited_object()[parameter_id_param] = parameter_id
if not are_properties_already_in_node or get_edited_object()[parameter_value_param] == null:
get_edited_object()[parameter_value_param] = param.get_default_value()
if not are_properties_already_in_node or get_edited_object()[parameter_min_value_param] == null:
get_edited_object()[parameter_min_value_param] = param.get_minimum()
if not are_properties_already_in_node or get_edited_object()[parameter_max_value_param] == null:
get_edited_object()[parameter_max_value_param] = param.get_maximum()
if not are_properties_already_in_node or get_edited_object()[parameter_default_value_param] == null:
get_edited_object()[parameter_default_value_param] = param.get_default_value()
for i in property_matching.size():
if not property_matching[i]:
get_edited_object().tool_remove_parameter(existing_parameter_ids[i])
pass
get_edited_object().notify_property_list_changed()

View File

@ -0,0 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://cowfthogh1n7i"]
[ext_resource type="PackedScene" uid="uid://cujo3xq0erren" path="res://addons/fmod/tool/property_editors/FmodPathEditorProperty.tscn" id="1_xvpec"]
[ext_resource type="Script" path="res://addons/fmod/tool/property_editors/FmodEventEditorProperty.gd" id="2_nkhkm"]
[node name="FmodEventEditorProperty" instance=ExtResource("1_xvpec")]
script = ExtResource("2_nkhkm")

View File

@ -0,0 +1,10 @@
@tool class_name FmodGuidAndPathPropertyEditorUi extends HBoxContainer
func set_callables(window_callable: Callable, path_callable: Callable, guid_callable: Callable):
%EventExplorerButton.pressed.connect(window_callable)
%PathLineEdit.text_changed.connect(path_callable)
%GuidLineEdit.text_changed.connect(guid_callable)
func set_icon(icon: Texture2D):
%EventExplorerButton.icon = icon

View File

@ -0,0 +1,28 @@
[gd_scene load_steps=3 format=3 uid="uid://hy04frgfhtgu"]
[ext_resource type="Script" path="res://addons/fmod/tool/property_editors/FmodGuidAndPathPropertyEditorUi.gd" id="1_eao7t"]
[ext_resource type="Texture2D" uid="uid://dca7c6jnnpl0f" path="res://addons/fmod/icons/event_icon.svg" id="1_kuu6i"]
[node name="FmodGuidAndPathPropertyEditorUi" type="HBoxContainer"]
offset_right = 1152.0
offset_bottom = 66.0
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_eao7t")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 3
[node name="PathLineEdit" type="LineEdit" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GuidLineEdit" type="LineEdit" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="EventExplorerButton" type="Button" parent="."]
unique_name_in_owner = true
layout_mode = 2
icon = ExtResource("1_kuu6i")

View File

@ -0,0 +1,40 @@
@tool class_name FmodPathEditorProperty extends EditorProperty
var ui: Control
var guid_property: String
var path_property: String
var regex := RegEx.new()
var default_line_edit_modulate: Color
func initialize(open_project_explorer_callable: Callable, path_prop: String, guid_prop: String):
regex.compile("{\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12}}")
guid_property = guid_prop
path_property = path_prop
var guid_and_path_ui: FmodGuidAndPathPropertyEditorUi = %FmodGuidAndPathPropertyEditorUi
default_line_edit_modulate = guid_and_path_ui.get_node("%GuidLineEdit").modulate
var open_project_explorer_event = func open_project_explorer_event():
open_project_explorer_callable.call(self._set_path_and_guid)
guid_and_path_ui.set_callables(open_project_explorer_event, _set_path, _set_guid)
func _update_property():
var guid_and_path_ui = %FmodGuidAndPathPropertyEditorUi
guid_and_path_ui.get_node("%PathLineEdit").text = get_edited_object()[path_property]
guid_and_path_ui.get_node("%GuidLineEdit").text = get_edited_object()[guid_property]
func _set_path(path: String):
emit_changed(path_property, path)
func _set_guid(guid: String):
var line_edit := %FmodGuidAndPathPropertyEditorUi.get_node("%GuidLineEdit") as LineEdit
if not regex.search(guid):
line_edit.modulate = Color.RED
return
line_edit.modulate = default_line_edit_modulate
emit_changed(guid_property, guid)
func _set_path_and_guid(path: String, guid: String):
_set_path(path)
_set_guid(guid)

View File

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://cujo3xq0erren"]
[ext_resource type="Script" path="res://addons/fmod/tool/property_editors/FmodPathEditorProperty.gd" id="1_4e4vx"]
[ext_resource type="PackedScene" uid="uid://hy04frgfhtgu" path="res://addons/fmod/tool/property_editors/FmodGuidAndPathPropertyEditorUi.tscn" id="2_nvtqg"]
[node name="FmodPathEditorProperty" type="EditorProperty"]
script = ExtResource("1_4e4vx")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="FmodGuidAndPathPropertyEditorUi" parent="VBoxContainer" instance=ExtResource("2_nvtqg")]
unique_name_in_owner = true
layout_mode = 2

View File

@ -0,0 +1,21 @@
@tool class_name EventParametersDisplay extends ScrollContainer
static var parameter_display_scene: PackedScene = load("res://addons/fmod/tool/ui/ParameterDisplay.tscn")
func set_fmod_event(event: FmodEventDescription) -> bool: # returns false if there were no parameters
for child in %ParameterDisplaysContainer.get_children():
%ParameterDisplaysContainer.remove_child(child)
child.queue_free()
var event_parameters: Array = event.get_parameters()
if event_parameters:
show()
for parameter : FmodParameterDescription in event_parameters:
var parameter_display: ParameterDisplay = parameter_display_scene.instantiate()
parameter_display.set_parameter(parameter)
if %ParameterDisplaysContainer.get_child_count() > 0:
%ParameterDisplaysContainer.add_child(HSeparator.new())
%ParameterDisplaysContainer.add_child(parameter_display)
return true # we had parameters to show!
else:
return false # no parameters to visualise

View File

@ -0,0 +1,19 @@
[gd_scene load_steps=2 format=3 uid="uid://cppeyr1ke5wre"]
[ext_resource type="Script" path="res://addons/fmod/tool/ui/EventParametersDisplay.gd" id="1_2l58q"]
[node name="EventParametersDisplay" type="ScrollContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_2l58q")
[node name="ParameterDisplaysContainer" type="VBoxContainer" parent="."]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3

View File

@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://skp8awewyl85"]
[ext_resource type="PackedScene" uid="uid://cppeyr1ke5wre" path="res://addons/fmod/tool/ui/EventParametersDisplay.tscn" id="1_clkxg"]
[node name="EventParametersWindow" type="Window"]
[node name="EventParametersDisplay" parent="." instance=ExtResource("1_clkxg")]

View File

@ -0,0 +1,52 @@
@tool
extends PanelContainer
@export var play_button : Button
@export var stop_button : Button
@export var fade_out_toggle : CheckButton
var event_instance : FmodEvent
func _ready() -> void:
hide()
play_button.icon = EditorInterface.get_editor_theme().get_icon("Play", "EditorIcons")
stop_button.icon = EditorInterface.get_editor_theme().get_icon("Stop", "EditorIcons")
play_button.pressed.connect(on_play_button_pressed)
stop_button.pressed.connect(on_stop_button_pressed)
func set_fmod_event(_event_description : FmodEventDescription) -> void:
stop_and_release_instance() # always stop and release if a previous one is active
event_instance = FmodServer.create_event_instance_with_guid(_event_description.get_guid())
show()
func play_event() -> void:
if event_instance:
event_instance.start()
func stop_event() -> void:
if event_instance:
var stop_mode : int = FmodServer.FMOD_STUDIO_STOP_IMMEDIATE
if fade_out_toggle.button_pressed:
stop_mode = FmodServer.FMOD_STUDIO_STOP_ALLOWFADEOUT
event_instance.stop(stop_mode)
func _exit_tree() -> void:
stop_and_release_instance()
func stop_and_release_instance() -> void:
if event_instance:
event_instance.stop(0)
event_instance.release()
func on_play_button_pressed() -> void:
play_event()
func on_stop_button_pressed() -> void:
stop_event()

View File

@ -0,0 +1,256 @@
@tool class_name FmodBankExplorer extends Window
enum ToDisplayFlags {
BANKS = 1,
BUSES = 2,
VCA = 4,
EVENTS = 8
}
static var _fmod_icon = load("res://addons/fmod/icons/fmod_icon.svg")
static var _vca_icon = load("res://addons/fmod/icons/vca_icon.svg")
static var _bank_icon = load("res://addons/fmod/icons/bank_icon.svg")
static var _event_icon = load("res://addons/fmod/icons/event_icon.svg")
static var _bus_icon = load("res://addons/fmod/icons/bus_icon.svg")
static var _snapshot_icon = load("res://addons/fmod/icons/snapshot_icon.svg")
signal emit_path_and_guid(path: String, guid: String)
var tree: Tree
@onready var copy_path_button := %PathLabel.get_child(0)
@onready var copy_guid_button := %GuidLabel.get_child(0)
var should_display_copy_buttons = true
var should_display_select_button = false
var _current_select_callable: Callable
var base_color: Color
var contrast: float
var background_color: Color
func _ready():
var main_window_size = get_parent().get_window().size
size = main_window_size * 0.5
var copy_texture : Texture = EditorInterface.get_editor_theme().get_icon("ActionCopy", "EditorIcons")
copy_guid_button.icon = copy_texture
copy_path_button.icon = copy_texture
copy_guid_button.visible = false
copy_path_button.visible = false
copy_path_button.pressed.connect(_on_copy_path_button)
copy_guid_button.pressed.connect(_on_copy_guid_button)
var emit_path_and_guid_callable = func emit_path_and_guid_callable():
var selected_item = tree.get_selected()
if selected_item == null:
return
var selected_fmod_element = selected_item.get_metadata(0)
if selected_fmod_element == null:
return
var path = selected_fmod_element.get_godot_res_path() if selected_fmod_element is FmodBank else selected_fmod_element.get_path()
emit_path_and_guid.emit(path, selected_fmod_element.get_guid())
%SelectButton.pressed.connect(emit_path_and_guid_callable)
%SelectButton.pressed.connect(close_window)
%CloseButton.pressed.connect(close_window)
close_requested.connect(close_window)
tree = %Tree
tree.item_selected.connect(_on_item_selected)
tree.columns = 1
regenerate_tree(ToDisplayFlags.BANKS | ToDisplayFlags.BUSES | ToDisplayFlags.VCA | ToDisplayFlags.EVENTS)
%RefreshBanksButton.pressed.connect(on_refresh_banks_button_pressed)
func regenerate_tree(to_display: int, callable: Callable = Callable()):
%SelectButton.visible = should_display_select_button
if _current_select_callable != Callable() && _current_select_callable.get_object() != null:
emit_path_and_guid.disconnect(_current_select_callable)
_current_select_callable = callable
tree.clear()
var root_item := tree.create_item()
root_item.set_text(0, "Fmod objects")
root_item.set_icon(0, _fmod_icon)
for bank in FmodServer.get_all_banks():
var fmod_bank := bank as FmodBank
var bank_item := tree.create_item(root_item)
bank_item.set_text(0, fmod_bank.get_godot_res_path())
bank_item.set_icon(0, _bank_icon)
bank_item.set_metadata(0, bank)
if to_display & ToDisplayFlags.BUSES:
var buses_item := tree.create_item(bank_item)
buses_item.set_text(0, "Buses")
buses_item.set_icon(0, _bus_icon)
var buses := fmod_bank.get_bus_list()
buses.sort_custom(sort_by_path)
_add_elements_as_tree(buses, buses_item)
if to_display & ToDisplayFlags.VCA:
var vca_item := tree.create_item(bank_item)
vca_item.set_text(0, "VCAs")
vca_item.set_icon(0, _vca_icon)
var vcas := fmod_bank.get_vca_list()
vcas.sort_custom(sort_by_path)
_add_elements_as_tree(vcas, vca_item)
if to_display & ToDisplayFlags.EVENTS:
var events_item := tree.create_item(bank_item)
events_item.set_text(0, "Events")
events_item.set_icon(0, _event_icon)
var events := fmod_bank.get_description_list()
events.sort_custom(sort_by_path)
_add_elements_as_tree(events, events_item)
if copy_path_button.visible:
copy_path_button.visible = should_display_copy_buttons
if copy_guid_button.visible:
copy_guid_button.visible = should_display_copy_buttons
if _current_select_callable != Callable():
print(_current_select_callable)
emit_path_and_guid.connect(_current_select_callable)
%SelectButton.visible = should_display_select_button and %GuidLabel.text != ""
func _add_elements_as_tree(elements: Array, parent: TreeItem):
var stack = Array()
for element in elements:
_add_element_to_stack(stack, parent, element)
func _add_element_to_stack(stack: Array, parent_root: TreeItem, path_element):
var fmod_path: String = path_element.get_path()
var path_parts := fmod_path.split("/")
if path_parts[path_parts.size() - 1] == "":
path_parts.remove_at(path_parts.size() - 1)
for i in range(0, path_parts.size()):
var path_part = path_parts[i]
path_part = path_part if path_part != "bus:" else "Master"
if i >= stack.size():
var parent_item = parent_root if stack.is_empty() else stack[stack.size() - 1]
var tree_item = tree.create_item(parent_item)
tree_item.set_text(0, path_part)
if i == path_parts.size() - 1:
tree_item.set_metadata(0, path_element)
tree_item.set_icon(0, _get_icon_for_fmod_path(fmod_path))
stack.append(tree_item)
continue
if stack[i].get_text(0) != path_part:
for j in range(stack.size() - 1, i - 1, -1):
stack.remove_at(j)
var parent_item = parent_root if stack.is_empty() else stack[stack.size() - 1]
var tree_item = tree.create_item(parent_item)
tree_item.set_text(0, path_part)
if i == path_parts.size() - 1:
tree_item.set_metadata(0, path_element)
tree_item.set_icon(0, _get_icon_for_fmod_path(fmod_path))
stack.append(tree_item)
func _on_item_selected():
var metadata = tree.get_selected().get_metadata(0)
if metadata == null or !metadata.get_guid():
%PathsBG.hide()
%EventPlayControls.hide()
copy_path_button.visible = false
copy_guid_button.visible = false
%SelectButton.visible = false
%ParametersLabel.visible = false
%ParametersContainer.visible = false
return
%GuidLabel.set_text(metadata.get_guid())
%PathLabel.set_text(metadata.get_path())
%PathsBG.show()
if should_display_copy_buttons:
copy_path_button.visible = true
copy_guid_button.visible = true
if should_display_select_button:
%SelectButton.visible = true
if metadata is FmodEventDescription:
%EventPlayControls.set_fmod_event(metadata)
var _show_parameter_controls : bool = %EventParametersDisplay.set_fmod_event(metadata)
%ParametersLabel.visible = _show_parameter_controls
%ParametersContainer.visible = _show_parameter_controls
return
%EventPlayControls.hide()
%EventParametersDisplay.hide()
%ParametersLabel.visible = false
%ParametersContainer.visible = false
func _on_copy_path_button():
DisplayServer.clipboard_set(%PathLabel.text)
func _on_copy_guid_button():
DisplayServer.clipboard_set(%GuidLabel.text)
func on_refresh_banks_button_pressed() -> void:
# unload banks
var current_banks : Array = FmodServer.get_all_banks()
for i : FmodBank in current_banks:
FmodServer.unload_bank(i.get_godot_res_path())
# get the banks to load
var path : String = ProjectSettings.get_setting("Fmod/General/banks_path", "")
if !path:
printerr("No banks path set in the project settings (Fmod/General/banks_path)")
return # no path set in the project settings
var bank_paths_to_load : Array[String]
var dir : DirAccess = DirAccess.open(path)
if dir:
dir.list_dir_begin()
var file_name : String = dir.get_next()
while file_name != "":
if dir.current_is_dir():
pass # the found item is a directory
else:
if file_name.ends_with(".bank"):
bank_paths_to_load.append(path + "/" + file_name)
file_name = dir.get_next()
if bank_paths_to_load:
# sort to first load the master bank and its strings
bank_paths_to_load.sort_custom(func(path1 : String, path2 : String) -> bool: return path1.contains("Master"))
else:
printerr("Could not find any banks in the specified directory")
for bank_path : String in bank_paths_to_load:
FmodServer.load_bank(bank_path, FmodServer.FMOD_STUDIO_LOAD_BANK_NORMAL)
else:
printerr("Couldn't access bank path, please make sure you specified a folder with the banks as direct children")
regenerate_tree(ToDisplayFlags.BANKS | ToDisplayFlags.BUSES | ToDisplayFlags.VCA | ToDisplayFlags.EVENTS)
func close_window():
%EventPlayControls.stop_event()
visible = false
static func _get_icon_for_fmod_path(fmod_path: String) -> Texture2D:
var icon: Texture2D = null
if fmod_path.begins_with("bus:/"):
icon = _bus_icon
elif fmod_path.begins_with("event:/"):
icon = _event_icon
elif fmod_path.begins_with("vca:/"):
icon = _vca_icon
elif fmod_path.begins_with("snapshot:/"):
icon = _snapshot_icon
return icon
static func sort_by_path(a, b):
return a.get_path().casecmp_to(b.get_path()) < 0

View File

@ -0,0 +1,348 @@
[gd_scene load_steps=17 format=3 uid="uid://nr38urn226al"]
[ext_resource type="Script" path="res://addons/fmod/tool/ui/FmodBankExplorer.gd" id="1_ekqus"]
[ext_resource type="Script" path="res://addons/fmod/tool/ui/EventPlayControls.gd" id="2_mleop"]
[ext_resource type="PackedScene" uid="uid://cppeyr1ke5wre" path="res://addons/fmod/tool/ui/EventParametersDisplay.tscn" id="2_uoyg8"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wrr0m"]
bg_color = Color(0, 0, 0, 0.247059)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(1, 1, 1, 0.207843)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2pbsy"]
[sub_resource type="LabelSettings" id="LabelSettings_3jkpq"]
font_size = 18
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0awfk"]
bg_color = Color(0, 0, 0, 0.14902)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.8, 0.8, 0.8, 0.145098)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="LabelSettings" id="LabelSettings_d4isr"]
[sub_resource type="Image" id="Image_bwsay"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 184, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 181, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 184, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 181, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 181, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 181, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 180, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_sxu7n"]
image = SubResource("Image_bwsay")
[sub_resource type="Image" id="Image_6755r"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 195, 224, 224, 224, 210, 224, 224, 224, 56, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 253, 224, 224, 224, 139, 224, 224, 224, 8, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 56, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 253, 224, 224, 224, 139, 224, 224, 224, 8, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 183, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 182, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 252, 225, 225, 225, 134, 255, 255, 255, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 212, 226, 226, 226, 52, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 252, 225, 225, 225, 134, 255, 255, 255, 6, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 191, 224, 224, 224, 206, 226, 226, 226, 52, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_hxrge"]
image = SubResource("Image_6755r")
[sub_resource type="Image" id="Image_05gpv"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 176, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 177, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 177, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 176, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_72iew"]
image = SubResource("Image_05gpv")
[sub_resource type="InputEventKey" id="InputEventKey_w47tf"]
device = -1
keycode = 4194305
[sub_resource type="Shortcut" id="Shortcut_rarey"]
events = [SubResource("InputEventKey_w47tf")]
[node name="FmodBankExplorer" type="Window"]
title = "Fmod banks explorer"
initial_position = 2
size = Vector2i(1720, 684)
script = ExtResource("1_ekqus")
[node name="BGPanel" type="Panel" parent="."]
unique_name_in_owner = true
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="WindowMargin" type="MarginContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="WindowMargin"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="TopPanel" type="PanelContainer" parent="WindowMargin/VBoxContainer"]
custom_minimum_size = Vector2(0, 42.315)
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="WindowMargin/VBoxContainer/TopPanel"]
layout_mode = 2
alignment = 2
[node name="RefreshBanksButton" type="Button" parent="WindowMargin/VBoxContainer/TopPanel/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Refresh Banks"
[node name="BaseColorPanel" type="PanelContainer" parent="WindowMargin/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_wrr0m")
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="HSplitContainer" type="HSplitContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer"]
layout_mode = 2
[node name="Tree" type="Tree" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_stretch_ratio = 0.54
theme_override_styles/panel = SubResource("StyleBoxEmpty_2pbsy")
hide_root = true
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="RightPanelContent" type="VBoxContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="PathsLabel" type="Label" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent"]
visible = false
layout_mode = 2
size_flags_vertical = 1
text = "ID:"
label_settings = SubResource("LabelSettings_3jkpq")
justification_flags = 35
[node name="PathsBG" type="PanelContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_0awfk")
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="PathContainer" type="HBoxContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer"]
layout_mode = 2
[node name="TitleLabelContainer" type="VBoxContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer"]
layout_mode = 2
[node name="PathTitleLabel" type="Label" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer/TitleLabelContainer"]
layout_mode = 2
size_flags_vertical = 6
text = "Path:"
label_settings = SubResource("LabelSettings_d4isr")
[node name="GuidTitleLabel" type="Label" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer/TitleLabelContainer"]
layout_mode = 2
size_flags_vertical = 6
text = "GUID: "
label_settings = SubResource("LabelSettings_d4isr")
[node name="ValueContainer" type="VBoxContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="PathLabel" type="Label" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer/ValueContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 6
text = "asdfasdfasdfasdf"
[node name="CopyPathLabel" type="Button" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer/ValueContainer/PathLabel"]
visible = false
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = 5.57001
offset_top = -15.5
offset_right = 36.57
offset_bottom = 15.5
grow_horizontal = 0
grow_vertical = 2
icon = SubResource("ImageTexture_sxu7n")
[node name="GuidLabel" type="Label" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer/ValueContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 6
text = "asdfasdf"
vertical_alignment = 1
[node name="CopyGuidLabel" type="Button" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/PathsBG/MarginContainer/PathContainer/ValueContainer/GuidLabel"]
visible = false
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = 6.095
offset_top = -15.5
offset_right = 37.095
offset_bottom = 15.5
grow_horizontal = 0
grow_vertical = 2
icon = SubResource("ImageTexture_sxu7n")
[node name="ParametersLabel" type="Label" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(0, 45)
layout_mode = 2
text = "Parameters:"
label_settings = SubResource("LabelSettings_3jkpq")
vertical_alignment = 2
[node name="ParametersContainer" type="PanelContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_0awfk")
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/ParametersContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="EventParametersDisplay" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/ParametersContainer/MarginContainer" instance=ExtResource("2_uoyg8")]
unique_name_in_owner = true
layout_mode = 2
[node name="EventPlayControls" type="PanelContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent" node_paths=PackedStringArray("play_button", "stop_button", "fade_out_toggle")]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(0, 55.44)
layout_mode = 2
size_flags_vertical = 10
size_flags_stretch_ratio = 0.1
theme_override_styles/panel = SubResource("StyleBoxFlat_0awfk")
script = ExtResource("2_mleop")
play_button = NodePath("MarginContainer/HBoxContainer/PlayEventButton")
stop_button = NodePath("MarginContainer/HBoxContainer/StopEventButton")
fade_out_toggle = NodePath("MarginContainer/HBoxContainer/FadeoutToggle")
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/EventPlayControls"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="HBoxContainer" type="HBoxContainer" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/EventPlayControls/MarginContainer"]
layout_mode = 2
[node name="PlayEventButton" type="Button" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/EventPlayControls/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Play"
icon = SubResource("ImageTexture_hxrge")
[node name="StopEventButton" type="Button" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/EventPlayControls/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Stop"
icon = SubResource("ImageTexture_72iew")
[node name="FadeoutToggle" type="CheckButton" parent="WindowMargin/VBoxContainer/BaseColorPanel/MarginContainer/HSplitContainer/MarginContainer/RightPanelContent/EventPlayControls/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Allow fade out"
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_top = 8
[node name="HBoxContainer" type="HBoxContainer" parent="WindowMargin/VBoxContainer/MarginContainer"]
layout_mode = 2
alignment = 1
[node name="MarginContainer2" type="MarginContainer" parent="WindowMargin/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_right = 8
[node name="SelectButton" type="Button" parent="WindowMargin/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer2"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_horizontal = 4
text = "Select"
[node name="MarginContainer" type="MarginContainer" parent="WindowMargin/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_right = 8
[node name="CloseButton" type="Button" parent="WindowMargin/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
shortcut = SubResource("Shortcut_rarey")
text = "Close"

View File

@ -0,0 +1,50 @@
@tool class_name ParameterDisplay extends MarginContainer
var parameter: FmodParameterDescription
func set_parameter(p_parameter: FmodParameterDescription):
show()
parameter = p_parameter
func display_value_selector(should: bool):
%ValueSetterContainer.visible = should
func _ready():
if parameter == null:
hide()
return
var minimum_value = parameter.get_minimum()
var maximum_value = parameter.get_maximum()
var default_value = parameter.get_default_value()
var copy_icon : Texture = EditorInterface.get_editor_theme().get_icon("ActionCopy", "EditorIcons")
%NameCopyButton.icon = copy_icon
%IdCopyButton.icon = copy_icon
%NameLabel.text = parameter.get_name()
%IdLabel.text = str(parameter.get_id())
%RangeLabel.text = "[%s, %s]" % [minimum_value, maximum_value]
%DefaultValueLabel.text = str(default_value)
%NameCopyButton.pressed.connect(_on_copy_name_button)
%IdCopyButton.pressed.connect(_on_copy_id_button)
%BackToDefaultButton.pressed.connect(_on_default_value_button)
%ValueSlider.min_value = minimum_value
%ValueSlider.max_value = maximum_value
%ValueSlider.value = default_value
_on_slider_value_changed(%ValueSlider.value)
%ValueSlider.value_changed.connect(_on_slider_value_changed)
func _on_copy_name_button():
DisplayServer.clipboard_set(%NameLabel.text)
func _on_copy_id_button():
DisplayServer.clipboard_set(%IdLabel.text)
func _on_default_value_button():
%ValueSlider.value = parameter.get_default_value()
func _on_slider_value_changed(value: float):
%CurrentValueLabel.text = str(value)

View File

@ -0,0 +1,144 @@
[gd_scene load_steps=2 format=3 uid="uid://bfdldojk5i6u3"]
[ext_resource type="Script" path="res://addons/fmod/tool/ui/ParameterDisplay.gd" id="1_fxyw8"]
[node name="ParameterDisplay" type="MarginContainer"]
offset_right = 168.0
offset_bottom = 160.0
size_flags_horizontal = 3
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
script = ExtResource("1_fxyw8")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="VBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="TitleContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 20
[node name="NameTitle" type="Label" parent="VBoxContainer/VBoxContainer/TitleContainer"]
layout_mode = 2
size_flags_vertical = 10
text = "Name: "
[node name="IdTitle" type="Label" parent="VBoxContainer/VBoxContainer/TitleContainer"]
layout_mode = 2
size_flags_vertical = 10
text = "ID: "
[node name="RangeTitle" type="Label" parent="VBoxContainer/VBoxContainer/TitleContainer"]
layout_mode = 2
size_flags_vertical = 10
text = "Range: "
[node name="DefaultValueTitle" type="Label" parent="VBoxContainer/VBoxContainer/TitleContainer"]
layout_mode = 2
size_flags_vertical = 10
text = "Default value: "
[node name="ContentContainer" type="VBoxContainer" parent="VBoxContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 20
[node name="NameLabel" type="Label" parent="VBoxContainer/VBoxContainer/ContentContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 10
[node name="NameCopyButton" type="Button" parent="VBoxContainer/VBoxContainer/ContentContainer/NameLabel"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = 9.0
offset_top = -15.5
offset_right = 40.0
offset_bottom = 15.5
grow_horizontal = 0
grow_vertical = 2
size_flags_vertical = 10
[node name="IdLabel" type="Label" parent="VBoxContainer/VBoxContainer/ContentContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 10
[node name="IdCopyButton" type="Button" parent="VBoxContainer/VBoxContainer/ContentContainer/IdLabel"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = 9.0
offset_top = -15.5
offset_right = 40.0
offset_bottom = 15.5
grow_horizontal = 0
grow_vertical = 2
size_flags_vertical = 10
[node name="RangeLabel" type="Label" parent="VBoxContainer/VBoxContainer/ContentContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 10
[node name="DefaultValueLabel" type="Label" parent="VBoxContainer/VBoxContainer/ContentContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 10
[node name="ValueSetterContainer" type="VBoxContainer" parent="VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/ValueSetterContainer"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/ValueSetterContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/ValueSetterContainer/HBoxContainer"]
layout_mode = 2
text = "Set value: "
[node name="ValueSlider" type="HSlider" parent="VBoxContainer/ValueSetterContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
[node name="BackToDefaultButton" type="Button" parent="VBoxContainer/ValueSetterContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Default"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/ValueSetterContainer"]
layout_mode = 2
[node name="CurrentValueTitleLabel" type="Label" parent="VBoxContainer/ValueSetterContainer/HBoxContainer2"]
layout_mode = 2
text = "Current value: "
[node name="CurrentValueLabel" type="Label" parent="VBoxContainer/ValueSetterContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
[node name="Button" type="Button" parent="VBoxContainer/ValueSetterContainer"]
layout_mode = 2
text = "Select"

View File

@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=3 uid="uid://f4i35731qm63"]
[ext_resource type="PackedScene" uid="uid://nr38urn226al" path="res://addons/fmod/tool/ui/FmodBankExplorer.tscn" id="1_0ul6h"]
[node name="TestFmodBankExplorer" type="Node2D"]
[node name="FmodBankLoader" type="FmodBankLoader" parent="."]
bank_paths = ["res://assets/Banks/Master.strings.bank", "res://assets/Banks/Master.bank", "res://assets/Banks/Music.bank", "res://assets/Banks/Vehicles.bank"]
[node name="FmodBankExplorer" parent="FmodBankLoader" instance=ExtResource("1_0ul6h")]
initial_position = 0
position = Vector2i(0, 36)