2021-01-20 00:42:47 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
#pragma once
|
2021-11-18 14:37:34 -05:00
|
|
|
|
2021-01-27 00:58:56 -04:00
|
|
|
|
2021-01-20 00:42:47 -04:00
|
|
|
#include "Input/Reply.h"
|
|
|
|
|
#include "Layout/Visibility.h"
|
2022-10-22 14:43:51 -04:00
|
|
|
#include "MetasoundFrontendDocument.h"
|
2021-12-13 18:15:01 -05:00
|
|
|
#include "Misc/Attribute.h"
|
2021-01-20 00:42:47 -04:00
|
|
|
#include "SGraphNode.h"
|
2022-08-12 14:22:05 -04:00
|
|
|
#include "SGraphNodeKnot.h"
|
2021-01-20 00:42:47 -04:00
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
|
|
|
#include "Widgets/SOverlay.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Forward Declarations
|
2021-12-13 18:15:01 -05:00
|
|
|
class SAudioInputWidget;
|
2024-04-16 05:09:28 -04:00
|
|
|
class SAudioMaterialButton;
|
2021-01-27 00:58:56 -04:00
|
|
|
class SGraphPin;
|
2021-01-20 00:42:47 -04:00
|
|
|
class SVerticalBox;
|
2021-12-13 18:15:01 -05:00
|
|
|
class UMetasoundEditorGraphMember;
|
|
|
|
|
class UMetasoundEditorGraphMemberDefaultLiteral;
|
|
|
|
|
class UMetasoundEditorGraphMemberNode;
|
2021-01-20 00:42:47 -04:00
|
|
|
class UMetasoundEditorGraphNode;
|
|
|
|
|
|
|
|
|
|
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
namespace Metasound::Editor
|
2021-01-20 00:42:47 -04:00
|
|
|
{
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
class SMetaSoundGraphNode : public SGraphNode
|
2021-01-20 00:42:47 -04:00
|
|
|
{
|
2021-12-13 18:15:01 -05:00
|
|
|
public:
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
SLATE_BEGIN_ARGS(SMetaSoundGraphNode)
|
2022-08-12 14:22:05 -04:00
|
|
|
{
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
}
|
2022-08-12 14:22:05 -04:00
|
|
|
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
virtual ~SMetaSoundGraphNode();
|
2022-08-12 14:22:05 -04:00
|
|
|
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
void Construct(const FArguments& InArgs, class UEdGraphNode* InNode);
|
2022-08-12 14:22:05 -04:00
|
|
|
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
protected:
|
|
|
|
|
bool IsVariableAccessor() const;
|
|
|
|
|
bool IsVariableMutator() const;
|
2022-08-12 14:22:05 -04:00
|
|
|
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
// SGraphNode Interface
|
|
|
|
|
virtual const FSlateBrush* GetShadowBrush(bool bSelected) const override;
|
|
|
|
|
virtual void CreateInputSideAddButton(TSharedPtr<SVerticalBox> InputBox) override;
|
|
|
|
|
virtual void CreateOutputSideAddButton(TSharedPtr<SVerticalBox> OutputBox) override;
|
|
|
|
|
virtual TSharedPtr<SGraphPin> CreatePinWidget(UEdGraphPin* InPin) const override;
|
|
|
|
|
virtual void CreateStandardPinWidget(UEdGraphPin* InPin) override;
|
|
|
|
|
virtual TSharedRef<SWidget> CreateNodeContentArea() override;
|
|
|
|
|
virtual TSharedRef<SWidget> CreateTitleWidget(TSharedPtr<SNodeTitle> NodeTitle) override;
|
|
|
|
|
virtual const FSlateBrush* GetNodeBodyBrush() const override;
|
|
|
|
|
virtual TSharedRef<SWidget> CreateTitleRightWidget() override;
|
|
|
|
|
virtual EVisibility IsAddPinButtonVisible() const override;
|
|
|
|
|
virtual FReply OnAddPin() override;
|
|
|
|
|
virtual void MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter, bool bMarkDirty = true) override;
|
|
|
|
|
virtual void SetDefaultTitleAreaWidget(TSharedRef<SOverlay> DefaultTitleAreaWidget) override;
|
|
|
|
|
virtual void GetOverlayBrushes(bool bSelected, const FVector2D WidgetSize, TArray<FOverlayBrushInfo>& Brushes) const override;
|
|
|
|
|
virtual void OnCommentBubbleToggled(bool bInCommentBubbleVisible) override;
|
|
|
|
|
virtual void OnCommentTextCommitted(const FText& NewComment, ETextCommit::Type CommitInfo) override;
|
2024-06-18 04:15:33 -04:00
|
|
|
virtual void OnAdvancedViewChanged(const ECheckBoxState NewCheckedState) override;
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
|
|
|
|
|
FLinearColor GetNodeTitleColorOverride() const;
|
|
|
|
|
|
|
|
|
|
FName GetLiteralDataType() const;
|
|
|
|
|
UMetasoundEditorGraphNode& GetMetaSoundNode();
|
|
|
|
|
const UMetasoundEditorGraphNode& GetMetaSoundNode() const;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
static void ExecuteTrigger(UMetasoundEditorGraphMemberDefaultLiteral& Literal);
|
|
|
|
|
static TSharedRef<SWidget> CreateTriggerSimulationWidget(UMetasoundEditorGraphMemberDefaultLiteral& Literal, TAttribute<EVisibility>&& InVisibility, TAttribute<bool>&& InEnablement, const FText* InToolTip = nullptr);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// If this node represents a graph member node, returns corresponding member.
|
|
|
|
|
UMetasoundEditorGraphMember* GetMetaSoundMember();
|
|
|
|
|
|
|
|
|
|
// If this node represents a graph member node, returns cast node.
|
|
|
|
|
UMetasoundEditorGraphMemberNode* GetMetaSoundMemberNode();
|
|
|
|
|
|
|
|
|
|
TAttribute<EVisibility> GetSimulationVisibilityAttribute() const;
|
|
|
|
|
|
|
|
|
|
// Slider widget for float input
|
|
|
|
|
TSharedPtr<SAudioInputWidget> InputWidget;
|
|
|
|
|
|
|
|
|
|
//Button Widget for bool input.
|
2024-04-24 04:23:26 -04:00
|
|
|
TSharedPtr<SAudioMaterialButton> MaterialButtonWidget;
|
|
|
|
|
|
|
|
|
|
// Handle for on state changed delegate for Button
|
|
|
|
|
FDelegateHandle InputButtonOnStateChangedDelegateHandle;
|
- Fix for attempting to access EngineSubsystem during MetaSound versioning (serialization), which can assert when apparently certain commands in certain contexts can attempt to preload assets prior to the init phase.
- Minor Fix for LocText duplication
#tests BuildCookRun, -game, version MetaSounds assets in editor, PIE
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL33084850
[FYI] Rob.Gay
Original CL Desc
-----------------------------------------------------------------
Version Metasound Document to include all ed data and make all Metasound EdGraph data transient
- Add input template nodes
- Add comment node data to document
- Keep references to member literal data (i.e. knob/slider ranges) in document metadata to ensure continued serialization and flexibility to add more editor-only fields and literal metadata
- Misc builder API updates, bug fixes and migration of controllers to builder API in anticipation of pages
- Sunset non-deterministic guid cvar
#rb phil.popp, helen.yang
[FYI] sondra.moyls
#tests Standard Automated Audio Tests, EngineTests, Offline QA Smoke pass, CPR, etc., extensive MetaSound Editor use, -game MetaSound qa levels, AudioUnitTests
#jira UE-194159
[CL 33102023 by rob gay in ue5-main branch]
2024-04-19 10:09:04 -04:00
|
|
|
|
|
|
|
|
// Handle for on value changed delegate for input slider
|
|
|
|
|
FDelegateHandle InputSliderOnValueChangedDelegateHandle;
|
|
|
|
|
|
|
|
|
|
// Handle for on input slider range changed
|
|
|
|
|
FDelegateHandle InputSliderOnRangeChangedDelegateHandle;
|
|
|
|
|
|
|
|
|
|
// Whether the input widget is currently transacting
|
|
|
|
|
// for keeping track of transaction state across delegates to only commit transaction on value commit
|
|
|
|
|
bool bIsInputWidgetTransacting = false;
|
|
|
|
|
|
|
|
|
|
EMetasoundFrontendClassType ClassType;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class SMetaSoundGraphNodeKnot : public SGraphNodeKnot
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS(SMetaSoundGraphNode)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
void Construct(const FArguments& InArgs, class UEdGraphNode* InNode);
|
|
|
|
|
|
|
|
|
|
virtual TSharedPtr<SGraphPin> CreatePinWidget(UEdGraphPin* Pin) const override;
|
|
|
|
|
virtual void MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter, bool bMarkDirty) override;
|
|
|
|
|
|
|
|
|
|
UMetasoundEditorGraphNode& GetMetaSoundNode();
|
|
|
|
|
const UMetasoundEditorGraphNode& GetMetaSoundNode() const;
|
|
|
|
|
};
|
|
|
|
|
} // namespace Metasound::Editor
|