mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Files
777dffe8ff8d52d7eb7894deab386c816a48f80f
27 lines
943 B
C++
27 lines
943 B
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|||
|
|||
#include "SoundSubmixEditorUtilities.h"
|
|||
#include "AudioEditorModule.h"
|
|||
#include "SoundSubmixEditorUtilities.h"
|
|||
#include "Toolkits/ToolkitManager.h"
|
|||
#include "Classes/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);
|
|||
}
|
|||
}
|
|||
}
|