Files
o3de/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorPlugin.h
T
amzn-phist d6b268e84e Remove ResourceSelectorHost and clean up/refactor related bits (#3050)
* Sever dependency on legacy resource selector host

Audio resource selectors (browse dialogs) no longer need to be
registered with the legacy IResourceSelectorHost system.  Set up a new
EBus specifically to handle browse button presses and directly invokes
the dialog.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Hook up legacy audio control selector to new EBus

Remaining use of legacy audio selectors (trackview) need to be able to
bypass ResourceSelectorHost now.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Removes ResourceSelectorHost and legacy selectors

This removes various Variable types that were tied to resource
selectors, such as GeomCache, Model, Animation, File.  Removes the
ResourceSelectorHost completely.  The two things that still appeared to
have selectors in TrackView are Audio Controls and Texture.  Fixed the
audio control selector to work via EBus and the Texture selector didn't
seem to work at all, but left it in as it was.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Make the default audio selector return old value

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Fix some signed/unsigned comparison warnings

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Remove deleted function from Editor Mock

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Change audio selector api to use string_view

Per feedback.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
2021-08-16 12:41:24 -05:00

76 lines
2.5 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/std/containers/set.h>
#include <AzCore/std/string/string_view.h>
#include <ATLControlsModel.h>
#include <AudioResourceSelectors.h>
#include <IAudioInterfacesCommonData.h>
#include <IAudioSystemEditor.h>
#include <QATLControlsTreeModel.h>
#include <IEditor.h>
#include <Include/IPlugin.h>
#include <QStandardItem>
namespace Audio
{
struct IAudioProxy;
} // namespace Audio
class CImplementationManager;
//-------------------------------------------------------------------------------------------//
class CAudioControlsEditorPlugin
: public IPlugin
, public ISystemEventListener
{
public:
explicit CAudioControlsEditorPlugin(IEditor* editor);
~CAudioControlsEditorPlugin() override;
void Release() override;
void ShowAbout() override {}
const char* GetPluginGUID() override { return "{DDD96BF3-892E-4A75-ABF7-BBAE446972DA}"; }
DWORD GetPluginVersion() override { return 2; }
const char* GetPluginName() override { return "AudioControlsEditor"; }
bool CanExitNow() override { return true; }
void OnEditorNotify([[maybe_unused]] EEditorNotifyEvent aEventId) override {}
static void SaveModels();
static void ReloadModels();
static void ReloadScopes();
static AudioControls::CATLControlsModel* GetATLModel();
static AudioControls::QATLTreeModel* GetControlsTree();
static CImplementationManager* GetImplementationManager();
static AudioControls::IAudioSystemEditor* GetAudioSystemEditorImpl();
static void ExecuteTrigger(const AZStd::string_view sTriggerName);
static void StopTriggerExecution();
///////////////////////////////////////////////////////////////////////////
// ISystemEventListener
void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam) override;
///////////////////////////////////////////////////////////////////////////
private:
static AudioControls::CATLControlsModel ms_ATLModel;
static AudioControls::QATLTreeModel ms_layoutModel;
static AudioControls::FilepathSet ms_currentFilenames;
static Audio::IAudioProxy* ms_pIAudioProxy;
static Audio::TAudioControlID ms_nAudioTriggerID;
static CImplementationManager ms_implementationManager;
AudioControls::AudioControlSelectorHandler m_controlSelector;
};