Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEngine/Private/Metasound.cpp
rob gay adb961b654 Rename Metasound to MetaSound (PascalCase) in all places in UX. (Code-side to be cleaned up post EA)
#rb trivial
#jira nojira
#preflight 6066ab3dc5a3a100016fc8a0

#ROBOMERGE-SOURCE: CL 15899490 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15899491 by rob gay in ue5-main branch]
2021-04-02 02:09:50 -04:00

75 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Metasound.h"
#include "CoreMinimal.h"
#include "HAL/FileManager.h"
#include "StructSerializer.h"
#include "UObject/UnrealType.h"
UMetaSound::UMetaSound(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
, FMetasoundAssetBase(FMetasoundFrontendArchetype())
{
}
#if WITH_EDITORONLY_DATA
UEdGraph* UMetaSound::GetGraph()
{
return Graph;
}
const UEdGraph* UMetaSound::GetGraph() const
{
return Graph;
}
UEdGraph& UMetaSound::GetGraphChecked()
{
check(Graph);
return *Graph;
}
const UEdGraph& UMetaSound::GetGraphChecked() const
{
check(Graph);
return *Graph;
}
void UMetaSound::SetGraph(UEdGraph* InGraph)
{
Graph = InGraph;
}
#endif // WITH_EDITORONLY_DATA
// Returns document object responsible for serializing asset
Metasound::Frontend::TAccessPtr<FMetasoundFrontendDocument> UMetaSound::GetDocument()
{
return Metasound::Frontend::MakeAccessPtr(MetasoundDocument.AccessPoint, MetasoundDocument);
}
// Returns document object responsible for serializing asset
Metasound::Frontend::TAccessPtr<const FMetasoundFrontendDocument> UMetaSound::GetDocument() const
{
return Metasound::Frontend::MakeAccessPtr<const FMetasoundFrontendDocument>(MetasoundDocument.AccessPoint, MetasoundDocument);
}
const TArray<FMetasoundFrontendArchetype>& UMetaSound::GetPreferredMetasoundArchetypes() const
{
// Not preferred archetypes for a basic UMetaSound.
static const TArray<FMetasoundFrontendArchetype> Preferred;
return Preferred;
}
bool UMetaSound::IsMetasoundArchetypeSupported(const FMetasoundFrontendArchetype& InArchetype) const
{
// All archetypes are supported.
return true;
}
const FMetasoundFrontendArchetype& UMetaSound::GetPreferredMetasoundArchetype(const FMetasoundFrontendDocument& InDocument) const
{
// Prefer to keep original archetype.
return InDocument.Archetype;
}