Files
UnrealEngineUWP/Engine/Source/Editor/AudioEditor/Private/SoundSubmixEditorUtilities.cpp
ethan geller 1b9558d5fa Editgrate 4.25 audio features from project stream:
-Soundfield Submixes
-Endpoint Submixes
-Unreal Ambisonics Encoder/Decoder

[FYI] aaron.mcleran, maxwell.hayes, phil.popp, rob.gay, charles.egenbacher, kevin.neilson


#ROBOMERGE-OWNER: ethan.geller
#ROBOMERGE-AUTHOR: ethan.geller
#ROBOMERGE-SOURCE: CL 11302185 via CL 11302187
#ROBOMERGE-BOT: (v649-11301724)

[CL 11302191 by ethan geller in Main branch]
2020-02-09 18:57:53 -05:00

27 lines
933 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SoundSubmixEditorUtilities.h"
#include "AudioEditorModule.h"
#include "SoundSubmixEditorUtilities.h"
#include "Toolkits/ToolkitManager.h"
#include "SoundSubmixGraph/SoundSubmixGraph.h"
#include "Sound/SoundSubmix.h"
void FSoundSubmixEditorUtilities::CreateSoundSubmix(const UEdGraph* Graph, UEdGraphPin* FromPin, const FVector2D Location, const FString& Name)
{
check(Graph);
// Cast outer to SoundSubmix
USoundSubmixBase* SoundSubmix = CastChecked<USoundSubmixBase>(Graph->GetOuter());
if (SoundSubmix != nullptr)
{
TSharedPtr<ISoundSubmixEditor> SoundSubmixEditor;
TSharedPtr< IToolkit > FoundAssetEditor = FToolkitManager::Get().FindEditorForAsset(SoundSubmix);
if (FoundAssetEditor.IsValid())
{
SoundSubmixEditor = StaticCastSharedPtr<ISoundSubmixEditor>(FoundAssetEditor);
SoundSubmixEditor->CreateSoundSubmix(FromPin, Location, Name);
}
}
}