ReaWwise

REAPER extension
Log | Files | Refs | Submodules

commit d2b3f33ed902d67009a7c32ea9200049fbf9a79e
parent d20b67ada31c0c86be91c6f841980645fe933425
Author: Andrew Costa <[email protected]>
Date:   Thu, 25 Aug 2022 11:33:25 -0400

Various bug fixes, updates to Readme and EULA

Change-Id: Ibcb3b625336c604207af1ff45bd2e18378483f0e

Diffstat:
MLicense.txt | 235++++++++++++++++++++++++++++++++++++++++---------------------------------------
MReadme.md | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
Msrc/extension/CMakeLists.txt | 13++++++++++---
Msrc/extension/Extension.cpp | 7+++++--
Msrc/extension/ExtensionWindow.cpp | 2++
Asrc/extension/MacHelpers.h | 8++++++++
Asrc/extension/MacHelpers.mm | 16++++++++++++++++
Msrc/shared/CMakeLists.txt | 6++++++
Msrc/shared/Core/WaapiClient.cpp | 30+++++++++++++++---------------
Msrc/shared/Persistance/ApplicationState.h | 4++--
Msrc/shared/Persistance/PersistanceSupport.cpp | 43++++++++++++++++++-------------------------
Msrc/shared/UI/HierarchyMappingTable.cpp | 2+-
Msrc/shared/UI/ImportControlsComponent.cpp | 2+-
Msrc/shared/UI/MainComponent.cpp | 1+
Auser-interface.png | 0
15 files changed, 269 insertions(+), 181 deletions(-)

diff --git a/License.txt b/License.txt @@ -2,119 +2,121 @@ ReaWwise™ END USER LICENSE AGREEMENT (EULA) -1. License Grant. AUDIOKINETIC Inc. (“AUDIOKINETIC”) grants you a worldwide, - non-exclusive, revocable, non-sublicensable and non transferable license to: - (a) install, use and reproduce, by making a reasonable number of copies of, - ReaWwise on devices owned or controlled by you for the sole purpose of - facilitating integration between REAPER and AUDIOKINETIC Wwise Technology, and - (b) modify and create derivative works of ReaWwise and the ReaWwise source - code for the sole purpose of facilitating integration between REAPER and - AUDIOKINETIC Wwise Technology. - -2. Updates. After you have downloaded and installed ReaWwise, occasional prompts - will request to install updates. Although you will not have to run them - immediately, it is recommended to stay up to date. - -3. Exclusion of certain Open Source Components. If any portion of ReaWwise is - listed as a third party open source component in the ReaWwise documentation, - such portion of ReaWwise will be governed by and subject to the terms of the - relevant open source license reproduced in the documentation and not subject - to terms of this agreement. - -4. Other Software. ReaWwise is designed to work in conjunction with other third - party software. This agreement does not provide you with any rights to such - third party software, and you have the sole responsibility to acquire and - comply with any additional licenses to such third party software. - -5. Title. Title, ownership rights, and intellectual property rights in ReaWwise - shall remain with AUDIOKINETIC.  You are granted no rights in ReaWwise other - than the rights expressly set forth above.  ReaWwise is protected by - intellectual property rights include copyright and trade secret laws and - treaties. - -6. Restrictions. Except as provided herein, you may not (a) modify, translate, - or create derivative works based on ReaWwise; (b) rent, lease, grant a - security interest in, or otherwise transfer rights to ReaWwise; or (c) remove - any proprietary notices in ReaWwise or any software, documentation or other - materials in it or supplied with it. - -7. Support Services.  AUDIOKINETIC will not provide any technical support for - ReaWwise. - -8. Improvements to the Source Code. You will make reasonable efforts to share - information about the source code changes you make to the source code, in - order for AUDIOKINETIC to be able to improve ReaWwise. - -9. Title to the Source Code Changes. Title to your source code changes, and all - rights in and to any intellectual property right therein, shall at all times - remain with you. Delivery by you to AUDIOKINETIC of your source code changes - shall be deemed to include an assignment to AUDIOKINETIC of all of your - rights, title and interest therein, pursuant to which AUDIOKINETIC may - incorporate such changes in the public version of ReaWwise at its sole - discretion. Nothing herein shall affect or impair AUDIOKINETIC’s ownership - rights in the ReaWwise. - -10. No Patent or other Exclusive Rights. You may not file any patent - application (either standalone or as part of a broader application) or - otherwise seek protection for any source code change (including without - limitation any derivative works of the ReaWwise source code such as or - forming part of a plug-in application) which could prevent either - AUDIOKINETIC or another licensee of ReaWwise to use or, solely in case of - AUDIOKINETIC, commercialize changes made by AUDIOKINETIC or such other - licensee to the source code which are the same or similar to your source - code changes. - -11. Disclaimer of Warranty. ReaWwise is provided on an “AS IS” basis, without - warranty of any kind, including without limitation the warranties of - merchantability, fitness fora particular purpose and non-infringement. - AUDIOKINETIC does not warrant that ReaWwise will be error-free or that it - will work without interruption. The entire risk as to the quality, - performance and non-infringement of ReaWwise is borne by You. This - disclaimer of warranty constitutes an essential part of this agreement. SOME - JURISDICTIONS DO NOT ALLOW EXCLUSIONS OF AN IMPLIED WARRANTY, SO THIS - DISCLAIMER MAY NOT APPLY TO YOU AND YOU MAYHAVE OTHER LEGAL RIGHTS THAT VARY - BY JURISDICTION. - -12. Termination. AUDIOKINETIC, in its sole discretion, has the right to - terminate this license. This license will terminate automatically if you - fail to comply with the restrictions described herein. On termination, you - must destroy all copies of ReaWwise in your possession. - -13. Export and Sanctions. You agree to comply with all export laws, - restrictions, national security controls and regulations of the Canada, - United States, or other applicable national or foreign agency or authority, - and not to export or re-export, or allow the export or re-export of any - proprietary information or any copy or direct product thereof in violation - of any such restrictions, laws or regulations. If you are the subject of - economic sanctions of the Canadian or United States government, you cannot - use ReaWwise. If you become the subject of economic sanctions of the - Canadian or United States government during, we have the right to terminate - this license. - -14. LIMITATION OF LIABILITY. IN NO EVENT WILL AUDIOKINETIC'S LIABILITY ARISING - OUT OF OR RELATED TO THIS AGREEMENT OR REAWWISE EXCEED ONE HUNDRED DOLLARS. - IN NO EVENT WILL EITHER PARTY HAVE ANY LIABILITY FOR ANY INDIRECT, - INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND BASED ON - ANY THEORY OF LIABILITY, WHETHER FOR BREACH OF CONTRACT, - TORT (INCLUDING NEGLIGENCE) OR OTHERWISE, ARISING OUT OF OR RELATED TO THIS - AGREEMENT, INCLUDING BUT NOT LIMITED TO LOSS OF ANTICIPATED PROFITS OR - BUSINESS INTERRUPTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - THESE LIMITATIONS WILL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL - PURPOSE OF ANY LIMITED REMEDY. THE PARTIES AGREE THAT THE FOREGOING - LIMITATIONS REPRESENT A REASONABLE ALLOCATION OF RISK UNDER THIS AGREEMENT. - -15. Miscellaneous. This agreement represents the complete agreement concerning - this license and may be amended only by writing executed by both parties. - If any provision of this agreement is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. This agreement will be governed by and construed under the laws - of the province of Quebec and the laws of Canada applicable therein and the - parties hereto submit to the exclusive jurisdiction of the courts of Province - of Quebec, District of Montreal. - -16. Language. You confirm that a French version of this Agreement has been - remitted to you. It is the express wish of the parties to be bound only by - the English version of such agreement. Vous confirmez que la version - française de cette entente vous a été remise. Les parties expriment leur - volonté expresse d’être liées seulement par la version anglaise de cette - entente. + 1. License Grant. AUDIOKINETIC Inc. (“AUDIOKINETIC”) grants you a worldwide, + non-exclusive, revocable, non-sublicensable and non transferable license + to: (a) install, use and reproduce, by making a reasonable number of + copies of, ReaWwise on devices owned or controlled by you for the sole + purpose of facilitating integration between REAPER and AUDIOKINETIC Wwise + Technology, and (b) modify and create derivative works of ReaWwise and the + ReaWwise source code for the sole purpose of facilitating integration + between AUDIOKINETIC Wwise Technology and other software applications. + + 2. Updates. After you have downloaded and installed ReaWwise, occasional + prompts will request to install updates. Although you will not have to run + them immediately, it is recommended to stay up to date. + + 3. Exclusion of certain Open Source Components. If any portion of ReaWwise is + listed as a third party open source component in the ReaWwise + documentation, such portion of ReaWwise will be governed by and subject to + the terms of the relevant open source license reproduced in the + documentation and not subject to terms of this agreement. + + 4. Other Software. ReaWwise is designed to work in conjunction with other + third party software. This agreement does not provide you with any rights + to such third party software, and you have the sole responsibility to + acquire and comply with any additional licenses to such third party + software. + + 5. Title. Title, ownership rights, and intellectual property rights in + ReaWwise shall remain with AUDIOKINETIC.  You are granted no rights in + ReaWwise other than the rights expressly set forth above.  ReaWwise is + protected by intellectual property rights include copyright and trade + secret laws and treaties. + + 6. Restrictions. Except as provided herein, you may not (a) modify, + translate, or create derivative works based on ReaWwise; (b) rent, lease, + grant a security interest in, or otherwise transfer rights to ReaWwise; or + (c) remove any proprietary notices in ReaWwise or any software, + documentation or other materials in it or supplied with it. + + 7. Support Services. AUDIOKINETIC will not provide any technical support for + ReaWwise. + + 8. Improvements to the Source Code. You will make reasonable efforts to share + information about the source code changes you make to the source code, in + order for AUDIOKINETIC to be able to improve ReaWwise. + + 9. Title to the Source Code Changes. Title to your source code changes, and + all rights in and to any intellectual property right therein, shall at all + times remain with you. Delivery by you to AUDIOKINETIC of your source code + changes shall be deemed to include an assignment to AUDIOKINETIC of all of + your rights, title and interest therein, pursuant to which AUDIOKINETIC + may incorporate such changes in the public version of ReaWwise EULA (Aug + 2022) ReaWwise at its sole discretion. Nothing herein shall affect or + impair AUDIOKINETIC’s ownership rights in the ReaWwise. + + 10. No Patent or other Exclusive Rights. You may not file any patent + application (either standalone or as part of a broader application) or + otherwise seek protection for any source code change (including without + limitation any derivative works of the ReaWwise source code such as or + forming part of a plug-in application) which could prevent either + AUDIOKINETIC or another licensee of ReaWwise to use or, solely in case of + AUDIOKINETIC, commercialize changes made by AUDIOKINETIC or such other + licensee to the source code which are the same or similar to your source + code changes. + + 11. Disclaimer of Warranty. ReaWwise is provided on an “AS IS” basis, without + warranty of any kind, including without limitation the warranties of + merchantability, fitness for a particular purpose and non-infringement. + AUDIOKINETIC does not warrant that ReaWwise will be error-free or that it + will work without interruption. The entire risk as to the quality, + performance and non-infringement of ReaWwise is borne by You. This + disclaimer of warranty constitutes an essential part of this agreement. + SOME JURISDICTIONS DO NOT ALLOW EXCLUSIONS OF AN IMPLIED WARRANTY, SO THIS + DISCLAIMER MAY NOT APPLY TO YOU AND YOU MAY HAVE OTHER LEGAL RIGHTS THAT + VARY BY JURISDICTION. + + 12. Termination. AUDIOKINETIC, in its sole discretion, has the right to + terminate this license. This license will terminate automatically if you + fail to comply with the restrictions described herein. On termination, you + must destroy all copies of ReaWwise in your possession. + + 13. Export and Sanctions. You agree to comply with all export laws, + restrictions, national security controls and regulations of the Canada, + United States, or other applicable national or foreign agency or + authority, and not to export or re-export, or allow the export or + re-export of any proprietary information or any copy or direct product + thereof in violation of any such restrictions, laws or regulations. If you + are the subject of economic sanctions of the Canadian or United States + government, you cannot use ReaWwise. If you become the subject of economic + sanctions of the Canadian or United States government during, we have the + right to terminate this license. + + 14. LIMITATION OF LIABILITY. IN NO EVENT WILL AUDIOKINETIC'S LIABILITY + ARISING OUT OF OR RELATED TO THIS AGREEMENT OR REAWWISE EXCEED ONE HUNDRED + DOLLARS. IN NO EVENT WILL EITHER PARTY HAVE ANY LIABILITY FOR ANY + INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED + AND BASED ON ANY THEORY OF LIABILITY, WHETHER FOR BREACH OF CONTRACT, TORT + (INCLUDING NEGLIGENCE) OR OTHERWISE, ARISING OUT OF OR RELATED TO THIS + AGREEMENT, INCLUDING BUT NOT LIMITED TO LOSS OF ANTICIPATED PROFITS OR + BUSINESS INTERRUPTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + THESE LIMITATIONS WILL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL + PURPOSE OF ANY LIMITED REMEDY. THE PARTIES AGREE THAT THE FOREGOING + ReaWwise EULA (Aug 2022) LIMITATIONS REPRESENT A REASONABLE ALLOCATION OF + RISK UNDER THIS AGREEMENT. + + 15. Miscellaneous. This agreement represents the complete agreement + concerning this license and may be amended only by writing executed by + both parties. If any provision of this agreement is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This agreement will be governed by and + construed under the laws of the province of Quebec and the laws of Canada + applicable therein and the parties hereto submit to the exclusive + jurisdiction of the courts of Province of Quebec, District of Montreal. + + 16. Language. You confirm that a French version of this Agreement has been + remitted to you. It is the express wish of the parties to be bound only by + the English version of such agreement. Vous confirmez que la version + française de cette entente vous a été remise. Les parties expriment leur + volonté expresse d’être liées seulement par la version anglaise de cette + entente. +\ No newline at end of file diff --git a/Readme.md b/Readme.md @@ -1,17 +1,66 @@ -# ReaperWwiseTransfer - -## Pre-requisites -- cmake 3.22.0 -- git -- Wwise (with SDK source) - -## Building the project -- git clone {repo-url} -- cd ReaperWwiseTransfer -- git submodule update --init -- mkdir build -- cd build -- cmake .. - -<hr> +# ReaWwise + +ReaWwise is a REAPER extension that sound designers can use to transfer audio files from REAPER into Wwise projects. The transfer process creates Wwise objects in manually defined hierarchies, so that Wwise users can start working with the imported sounds immediately. ReaWwise supports all REAPER wildcards and is available through the ReaPack package manager and the [releases page](https://github.com/audiokinetic/ReaWwise/releases) of this repository. + +![example](user-interface.png) + +## Table of contents + +- [**Getting Started**](#getting-started) +- [Building from Source](#building-from-source) +- [Contributing](#contributing) +- [Legal](#legal) +- [Acknowledgments](#acknowledgements) + +## Getting Started + +### Supported Platforms +- Windows +- Mac + +### Manual installation +1. Go to the the [releases page](https://github.com/audiokinetic/ReaWwise/releases), then download the extension file (reaper_reawwise.dll for Windows or reaper_reawwise.dylib for Mac). + +2. Copy the extension to the REAPER UserPlugins directory. + +3. If REAPER is running, restart the application. The extension is available in the Extensions menu. + +### Installing ReaWwise through ReaPack +1. In the REAPER menu, go to **Extensions** > **ReaPack** > **Browse Packages**. A dialog opens, and displays a list of packages available for installation. + +2. Right-click on the ReaWwise package and select the version you want to install. + +3. Click **Apply** in the bottom-right corner of the dialog. The ReaWwise package is downloaded and moved to the UserPlugins directory. + +4. After the plugin installation is complete, restart REAPER. The extension is now available in the **Extensions** menu. + +## Building from Source + +### Requirements +- Git +- CMake (minimum version 3.22.0) +- Platform-specific build tools (Visual Studio or XCode) +- Wwise with SDK (minimum version 2021.1.1) +- WWISESDK environment variable set to the path of the installed Wwise SDK + +### Building +```cmd +git clone https://github.com/audiokinetic/ReaWwise.git +cd ReaWwise +git submodule update --init +mkdir build +cmake --build ./build --target ReaWwise --config Release +``` +After the binary is built, move it to the REAPER UserPlugins directory. If REAPER is open, restart the application. The extension is available in the **Extensions** menu. + +## Other Resources +Refer to the [ReaWwise User Guide](https://audiokinetic.com/library/reawwise) for more information regarding usage, installation and troubleshooting of the extension. + +## Contributing +The repository is not open to pull request but in the case of a bug report, bugfix or a suggestions, please feel free to [open an issue](https://github.com/this/ReaWwise/issues). + +## Legal +Copyright © 2020 [Audiokinetic Inc.](https://audiokinetic.com) All rights reserved. + +## Acknowledgements Inspired by the work of [Karl Davis](https://github.com/karltechno) \ No newline at end of file diff --git a/src/extension/CMakeLists.txt b/src/extension/CMakeLists.txt @@ -8,9 +8,16 @@ endif() project(ReaWwise) -file(GLOB_RECURSE EXTENSION_SOURCES - "${PROJECT_SOURCE_DIR}/*.h" - "${PROJECT_SOURCE_DIR}/*.cpp") +if(WIN32) + file(GLOB_RECURSE EXTENSION_SOURCES + "${PROJECT_SOURCE_DIR}/*.h" + "${PROJECT_SOURCE_DIR}/*.cpp") +else() + file(GLOB_RECURSE EXTENSION_SOURCES + "${PROJECT_SOURCE_DIR}/*.h" + "${PROJECT_SOURCE_DIR}/*.cpp" + "${PROJECT_SOURCE_DIR}/*.mm") +endif() add_library(${PROJECT_NAME} SHARED) diff --git a/src/extension/Extension.cpp b/src/extension/Extension.cpp @@ -10,6 +10,10 @@ #include <tuple> #include <variant> +#ifdef __APPLE__ +#include "MacHelpers.h" +#endif + namespace AK::ReaWwise { static bool juceInitialised = false; @@ -50,8 +54,7 @@ namespace AK::ReaWwise mainWindow->addToDesktop(mainWindow->getDesktopWindowStyleFlags(), reaperContext->getMainHwnd()); #else mainWindow->addToDesktop(mainWindow->getDesktopWindowStyleFlags(), 0); - juce::ComponentPeer* componentPeer = mainWindow->getPeer(); - componentPeer->setAlwaysOnTop(true); + MacHelpers::makeWindowFloatingPanel(dynamic_cast<juce::Component*>(mainWindow.get())); #endif } diff --git a/src/extension/ExtensionWindow.cpp b/src/extension/ExtensionWindow.cpp @@ -24,11 +24,13 @@ namespace AK::ReaWwise mainContentComponent.reset(new WwiseTransfer::MainComponent(dawContext, JUCE_APPLICATION_NAME_STRING)); +#ifdef WIN32 if(!mainContentComponent->hasScaleFactorOverride()) { auto scaleFactor = juce::Desktop::getInstance().getDisplays().getMainDisplay().dpi / standardDPI; juce::Desktop::getInstance().setGlobalScaleFactor(scaleFactor); } +#endif setContentNonOwned(mainContentComponent.get(), true); centreWithSize(width, height); diff --git a/src/extension/MacHelpers.h b/src/extension/MacHelpers.h @@ -0,0 +1,8 @@ +#pragma once + +#include <juce_gui_basics/juce_gui_basics.h> + +namespace AK::ReaWwise::MacHelpers +{ + void makeWindowFloatingPanel(juce::Component* component); +} diff --git a/src/extension/MacHelpers.mm b/src/extension/MacHelpers.mm @@ -0,0 +1,15 @@ +#include "MacHelpers.h" + +#include <Cocoa/Cocoa.h> + +namespace AK::ReaWwise::MacHelpers +{ + void makeWindowFloatingPanel(juce::Component* component) + { + juce::ComponentPeer* componentPeer = component->getPeer(); + componentPeer->setAlwaysOnTop(true); + NSView* const nativeHandle = (NSView*)(componentPeer->getNativeHandle()); + NSWindow *window = [nativeHandle window]; + [window setHidesOnDeactivate:YES]; + } +} +\ No newline at end of file diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt @@ -36,6 +36,12 @@ else() set(BUILD_NUMBER "Local") endif() +if(DEFINED ENV{BUILD_COMMIT_HASH}) + # Build machine builds in detached state + # Get branch name from build param (will be main for release builds) + set(BRANCH_NAME $ENV{BUILD_COMMIT_HASH}) +endif() + set(VERSION_STRING "${VERSION} ${COMMIT_HASH}") string(TIMESTAMP year "%Y") diff --git a/src/shared/Core/WaapiClient.cpp b/src/shared/Core/WaapiClient.cpp @@ -13,21 +13,21 @@ namespace AK::WwiseTransfer { namespace WaapiCommands { - static constexpr const char* const projectLoaded = "ak::wwise::core::project::loaded"; - static constexpr const char* const projectPostClosed = "ak::wwise::core::project::postClosed"; - static constexpr const char* const objectPostDeleted = "ak::wwise::core::object::postDeleted"; - static constexpr const char* const objectNameChanged = "ak::wwise::core::object::nameChanged"; - static constexpr const char* const objectCreated = "ak::wwise::core::object::created"; - static constexpr const char* const objectGet = "ak::wwise::core::object::get"; - static constexpr const char* const audioImport = "ak::wwise::core::audio::import"; - static constexpr const char* const getProjectInfo = "ak::wwise::core::getProjectInfo"; - static constexpr const char* const undoBeginGroup = "ak::wwise::core::undo::beginGroup"; - static constexpr const char* const undoCancelGroup = "ak::wwise::core::undo::cancelGroup"; - static constexpr const char* const undoEndGroup = "ak::wwise::core::undo::endGroup"; - static constexpr const char* const objectPasteProperties = "ak::wwise::core::object::pasteProperties"; - static constexpr const char* const getInfo = "ak::wwise::core::getInfo"; - static constexpr const char* const getSelectedObjects = "ak::wwise::ui::getSelectedObjects"; - static constexpr const char* const commandsExecute = "ak::wwise::ui::commands::execute"; + static constexpr const char* const projectLoaded = "ak.wwise.core.project.loaded"; + static constexpr const char* const projectPostClosed = "ak.wwise.core.project.postClosed"; + static constexpr const char* const objectPostDeleted = "ak.wwise.core.object.postDeleted"; + static constexpr const char* const objectNameChanged = "ak.wwise.core.object.nameChanged"; + static constexpr const char* const objectCreated = "ak.wwise.core.object.created"; + static constexpr const char* const objectGet = "ak.wwise.core.object.get"; + static constexpr const char* const audioImport = "ak.wwise.core.audio.import"; + static constexpr const char* const getProjectInfo = "ak.wwise.core.getProjectInfo"; + static constexpr const char* const undoBeginGroup = "ak.wwise.core.undo.beginGroup"; + static constexpr const char* const undoCancelGroup = "ak.wwise.core.undo.cancelGroup"; + static constexpr const char* const undoEndGroup = "ak.wwise.core.undo.endGroup"; + static constexpr const char* const objectPasteProperties = "ak.wwise.core.object.pasteProperties"; + static constexpr const char* const getInfo = "ak.wwise.core.getInfo"; + static constexpr const char* const getSelectedObjects = "ak.wwise.ui.getSelectedObjects"; + static constexpr const char* const commandsExecute = "ak.wwise.ui.commands.execute"; } // namespace WaapiCommands WaapiClientWatcher::WaapiClientWatcher(juce::ValueTree appState, WaapiClient& waapiClient, WaapiClientWatcherConfig waapiClientWatcherConfig) diff --git a/src/shared/Persistance/ApplicationState.h b/src/shared/Persistance/ApplicationState.h @@ -52,12 +52,12 @@ namespace AK::WwiseTransfer::ApplicationState auto previewItems = juce::ValueTree(IDs::previewItems); applicationState.appendChild(previewItems, nullptr); - auto physicalFolder = Import::HierarchyMappingNode("$project", Wwise::ObjectType::PhysicalFolder); + auto virtualFolder = Import::HierarchyMappingNode("$project", Wwise::ObjectType::VirtualFolder); auto soundSfx = Import::HierarchyMappingNode("$region", Wwise::ObjectType::SoundSFX); auto hierarchyMapping = juce::ValueTree(IDs::hierarchyMapping); hierarchyMapping.setProperty(IDs::selectedRow, 0, nullptr); - hierarchyMapping.appendChild(ImportHelper::hierarchyMappingNodeToValueTree(physicalFolder), nullptr); + hierarchyMapping.appendChild(ImportHelper::hierarchyMappingNodeToValueTree(virtualFolder), nullptr); hierarchyMapping.appendChild(ImportHelper::hierarchyMappingNodeToValueTree(soundSfx), nullptr); applicationState.appendChild(hierarchyMapping, nullptr); diff --git a/src/shared/Persistance/PersistanceSupport.cpp b/src/shared/Persistance/PersistanceSupport.cpp @@ -28,8 +28,6 @@ namespace AK::WwiseTransfer { using namespace PersistanceSupportConstants; - juce::String projectId = applicationState[IDs::projectId]; - auto treeType = treeWhosePropertyHasChanged.getType(); if(treeType == IDs::application && property == IDs::sessionName) @@ -115,37 +113,32 @@ namespace AK::WwiseTransfer // not provide much performance gain. using namespace PersistanceSupportConstants; - juce::String projectId = applicationState[IDs::projectId]; - - if(projectId.isNotEmpty()) - { - juce::ValueTree stateToBeSaved(IDs::application); + juce::ValueTree stateToBeSaved(IDs::application); - for(const auto& field : fieldsToPersist) - stateToBeSaved.setPropertyExcludingListener(this, field, applicationState[field], nullptr); + for(const auto& field : fieldsToPersist) + stateToBeSaved.setPropertyExcludingListener(this, field, applicationState[field], nullptr); - juce::ValueTree hierarchyMappingToBeSaved(IDs::hierarchyMapping); - auto hierarchyMapping = applicationState.getChildWithName(IDs::hierarchyMapping).createCopy(); + juce::ValueTree hierarchyMappingToBeSaved(IDs::hierarchyMapping); + auto hierarchyMapping = applicationState.getChildWithName(IDs::hierarchyMapping).createCopy(); - for(int i = 0; i < hierarchyMapping.getNumChildren(); ++i) - { - juce::ValueTree hierarchyMappingNodeToBeSaved(IDs::hierarchyMappingNode); + for(int i = 0; i < hierarchyMapping.getNumChildren(); ++i) + { + juce::ValueTree hierarchyMappingNodeToBeSaved(IDs::hierarchyMappingNode); - for(const auto& field : hierarchyMappingNodeFieldsToPersist) - hierarchyMappingNodeToBeSaved.setPropertyExcludingListener(this, field, hierarchyMapping.getChild(i)[field], nullptr); + for(const auto& field : hierarchyMappingNodeFieldsToPersist) + hierarchyMappingNodeToBeSaved.setPropertyExcludingListener(this, field, hierarchyMapping.getChild(i)[field], nullptr); - hierarchyMappingToBeSaved.addChild(hierarchyMappingNodeToBeSaved, i, nullptr); - } + hierarchyMappingToBeSaved.addChild(hierarchyMappingNodeToBeSaved, i, nullptr); + } - stateToBeSaved.appendChild(hierarchyMappingToBeSaved, nullptr); + stateToBeSaved.appendChild(hierarchyMappingToBeSaved, nullptr); - juce::ValueTree savedState = dawContext.retrieveState(); + juce::ValueTree savedState = dawContext.retrieveState(); - if(!stateToBeSaved.isEquivalentTo(savedState)) - { - dawContext.saveState(stateToBeSaved); - stateCache[dawContext.getSessionName()] = stateToBeSaved; - } + if(!stateToBeSaved.isEquivalentTo(savedState)) + { + dawContext.saveState(stateToBeSaved); + stateCache[dawContext.getSessionName()] = stateToBeSaved; } } } // namespace AK::WwiseTransfer diff --git a/src/shared/UI/HierarchyMappingTable.cpp b/src/shared/UI/HierarchyMappingTable.cpp @@ -196,7 +196,7 @@ namespace AK::WwiseTransfer if(cellEnabled && !validCell) { g.setColour(juce::Colour(juce::Colours::red).withAlpha(alpha)); - g.drawRect(0, 0, width, height); + g.drawRect(1, 1, width - 1, height - 1); } } diff --git a/src/shared/UI/ImportControlsComponent.cpp b/src/shared/UI/ImportControlsComponent.cpp @@ -181,7 +181,7 @@ namespace AK::WwiseTransfer .withTitle("Import Summary") .withMessage(message) .withButton("View Details") - .withButton("Dismiss"); + .withButton("Close"); auto onDialogBtnClicked = [this, summary = summary, importTaskOptions = importTaskOptions](int result) { diff --git a/src/shared/UI/MainComponent.cpp b/src/shared/UI/MainComponent.cpp @@ -38,6 +38,7 @@ namespace AK::WwiseTransfer , wwiseProjectSupport(applicationState, waapiClient) , collapsedUI(applicationState, IDs::collapsedUI, nullptr) , logger(applicationName) + , tooltipWindow(this) { using namespace MainComponentConstants; diff --git a/user-interface.png b/user-interface.png Binary files differ.