Files
UnrealEngineUWP/Engine/Source/Editor/AudioEditor/Private/SoundSubmixEditorUtilities.cpp
ben marsh 2b46ba7b94 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4662413 by ben marsh in Dev-Networking branch]
2018-12-14 13:44:01 -05:00

27 lines
935 B
C++

// Copyright 1998-2019 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
USoundSubmix* SoundSubmix = CastChecked<USoundSubmix>(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);
}
}
}