You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Move deserialize/serialize utilities off of module and into own FileConversion namespace. Stub in landing place for export in Intermediates. #jira UEAU-527 #rb ethan.geller [CL 13886786 by Rob Gay in ue5-main branch]
58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#include "Metasound.h"
|
|
|
|
#include "Backends/JsonStructSerializerBackend.h"
|
|
#include "CoreMinimal.h"
|
|
#include "HAL/FileManager.h"
|
|
#include "StructSerializer.h"
|
|
|
|
UMetasound::UMetasound(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
, FMetasoundAssetBase()
|
|
{
|
|
}
|
|
|
|
#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
|
|
|
|
// This can be used to update the metadata (name, author, etc) for this metasound.
|
|
// @param InMetadata may be updated with any corrections we do to the input metadata.
|
|
void UMetasound::SetMetadata(FMetasoundClassMetadata& InMetadata)
|
|
{
|
|
FMetasoundAssetBase::SetMetadata(InMetadata);
|
|
MarkPackageDirty();
|
|
}
|
|
|
|
// delete this asset's current metasound document,
|
|
// and replace it with InClassDescription.
|
|
void UMetasound::SetMetasoundDocument(const FMetasoundDocument& InDocument)
|
|
{
|
|
RootMetasoundDocument = InDocument;
|
|
}
|