MovieSceneAkAudioEventTrackEditor.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "MovieSceneTrackEditor.h"
  17. #include "MovieSceneAkAudioEventTrack.h"
  18. #include "AssetRegistry/AssetData.h"
  19. /**
  20. * Tools for AkAudioEvent tracks
  21. */
  22. class FMovieSceneAkAudioEventTrackEditor
  23. : public FMovieSceneTrackEditor
  24. {
  25. public:
  26. /**
  27. * Constructor
  28. *
  29. * @param InSequencer The sequencer instance to be used by this tool
  30. */
  31. FMovieSceneAkAudioEventTrackEditor(TSharedRef<ISequencer> InSequencer);
  32. /**
  33. * Creates an instance of this class. Called by a sequencer
  34. *
  35. * @param OwningSequencer The sequencer instance to be used by this tool
  36. * @return The new instance of this class
  37. */
  38. static TSharedRef<ISequencerTrackEditor> CreateTrackEditor(TSharedRef<ISequencer> OwningSequencer);
  39. public:
  40. // ISequencerTrackEditor interface
  41. virtual void BuildObjectBindingTrackMenu(FMenuBuilder& MenuBuilder, const TArray<FGuid>& ObjectBindings, const UClass* ObjectClass) override;
  42. virtual void BuildAddTrackMenu(FMenuBuilder& MenuBuilder) override;
  43. virtual TSharedPtr<SWidget> BuildOutlinerEditWidget(const FGuid& ObjectBinding, UMovieSceneTrack* Track, const FBuildEditWidgetParams& Params) override;
  44. virtual bool HandleAssetAdded(UObject* Asset, const FGuid& TargetObjectGuid) override;
  45. virtual TSharedRef<ISequencerSection> MakeSectionInterface(UMovieSceneSection& SectionObject, UMovieSceneTrack& Track, FGuid ObjectBinding) override;
  46. virtual bool SupportsType(TSubclassOf<UMovieSceneTrack> Type) const override;
  47. virtual bool SupportsSequence(UMovieSceneSequence* InSequence) const override;
  48. virtual void BuildTrackContextMenu(FMenuBuilder& MenuBuilder, UMovieSceneTrack* Track) override;
  49. virtual const FSlateBrush* GetIconBrush() const override;
  50. private:
  51. /** Audio sub menu */
  52. TSharedRef<SWidget> BuildAudioSubMenu(UMovieSceneTrack* Track);
  53. /** Audio asset selected */
  54. void OnAudioAssetSelected(const FAssetData& AssetData, UMovieSceneTrack* Track);
  55. /** Creates a soundbank generation window. Iterates through all of the sections in the track and adds their required banks to the selected banks in the window.*/
  56. static void CreateGenerateSoundBanksWindowForAllSections(UMovieSceneTrack* in_pTrack);
  57. };