Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundFrontendTransform.h
rob gay 0e4f7a7c51 MetaSound UI/UX Composition/Preset Scaffolding
- Revive UMetaSound Asset type
- Revive MS Output generation
- Fix copy pasta'ed type name so MetaSound Source shows up properly in editor
- Clean-up to dynamic doc version reporting if required (show the new version number in log)
- Add versioning to update the RootGraphClass name & add DisplayName

MetaSound Registry Scaffolding Part 1 (From Phil Popp)

#rb phil.popp
#jira UE-117108
#jira UE-117109
#jira UE-117110
#preflight 60bf11780c76f90001db5f5f


#ROBOMERGE-SOURCE: CL 16587155
#ROBOMERGE-BOT: (v828-16531559)

[CL 16587204 by rob gay in ue5-main branch]
2021-06-08 10:52:31 -04:00

53 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MetasoundFrontendController.h"
#include "MetasoundFrontendDocument.h"
namespace Metasound
{
namespace Frontend
{
/** Interface for transforms applied to documents. */
class IDocumentTransform
{
public:
virtual ~IDocumentTransform() = default;
virtual bool Transform(FDocumentHandle InDocument) const = 0;
};
/** Adds or swaps root graph inputs and outputs to match the document's archetype. */
class METASOUNDFRONTEND_API FMatchRootGraphToArchetype : public IDocumentTransform
{
public:
FMatchRootGraphToArchetype(const FMetasoundFrontendArchetype& InArchetype)
: Archetype(InArchetype)
{
}
bool Transform(FDocumentHandle InDocument) const override;
private:
FMetasoundFrontendArchetype Archetype;
};
/** Base class for versioning a document. */
class METASOUNDFRONTEND_API FVersionDocument : public IDocumentTransform
{
const FName Name;
const FString& Path;
public:
static FMetasoundFrontendVersionNumber GetMaxVersion()
{
return FMetasoundFrontendVersionNumber { 1, 2 };
}
FVersionDocument(FName InName, const FString& InPath);
bool Transform(FDocumentHandle InDocument) const override;
};
}
}