Files

996 lines
31 KiB
C++
Raw Permalink Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SMetasoundGraphNode.h"
#include "AudioParameterControllerInterface.h"
#include "Components/AudioComponent.h"
#include "GraphEditorSettings.h"
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
#include "IAudioParameterTransmitter.h"
#include "IDocumentation.h"
#include "Interfaces/MetasoundFrontendInterfaceRegistry.h"
#include "KismetPins/SGraphPinBool.h"
#include "KismetPins/SGraphPinExec.h"
#include "KismetPins/SGraphPinInteger.h"
#include "KismetPins/SGraphPinNum.h"
#include "KismetPins/SGraphPinObject.h"
#include "KismetPins/SGraphPinString.h"
#include "MetasoundEditorGraph.h"
#include "MetasoundEditorGraphBuilder.h"
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
#include "MetasoundEditorGraphInputNode.h"
#include "MetasoundEditorGraphMemberDefaults.h"
#include "MetasoundEditorGraphNode.h"
#include "MetasoundEditorGraphSchema.h"
#include "MetasoundEditorModule.h"
#include "MetasoundFrontendNodeTemplateRegistry.h"
#include "MetasoundFrontendRegistries.h"
#include "MetasoundTrace.h"
#include "MetasoundTrigger.h"
#include "NodeFactory.h"
#include "NodeTemplates/MetasoundFrontendNodeTemplateReroute.h"
#include "PropertyCustomizationHelpers.h"
#include "SAudioRadialSlider.h"
#include "SAudioSlider.h"
#include "SCommentBubble.h"
#include "ScopedTransaction.h"
#include "SGraphNode.h"
#include "SGraphPinComboBox.h"
#include "Styling/AppStyle.h"
#include "SLevelOfDetailBranchNode.h"
#include "SMetasoundGraphEnumPin.h"
#include "SMetasoundGraphPin.h"
#include "SMetasoundPinValueInspector.h"
#include "SPinTypeSelector.h"
#include "Styling/AppStyle.h"
#include "Styling/SlateColor.h"
#include "Styling/SlateStyleRegistry.h"
#include "TutorialMetaData.h"
#include "UObject/ScriptInterface.h"
#include "Widgets/Images/SImage.h"
#include "Widgets/Input/SButton.h"
#include "Widgets/Layout/SBox.h"
#include "Widgets/Layout/SSpacer.h"
#include "Widgets/SBoxPanel.h"
#include "Widgets/SOverlay.h"
#include "Widgets/SWidget.h"
#include "Widgets/Text/SInlineEditableTextBlock.h"
#define LOCTEXT_NAMESPACE "MetasoundEditor"
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
namespace Metasound
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
namespace Editor
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
SMetaSoundGraphNode::~SMetaSoundGraphNode()
{
// Clean up input widgets
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
UMetasoundEditorGraphNode& Node = GetMetaSoundNode();
if (UMetasoundEditorGraphMemberNode* MemberNode = Cast<UMetasoundEditorGraphMemberNode>(&Node))
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (UMetasoundEditorGraphMember* GraphMember = MemberNode->GetMember())
{
if (UMetasoundEditorGraphMemberDefaultFloat* DefaultFloat = Cast<UMetasoundEditorGraphMemberDefaultFloat>(GraphMember->GetLiteral()))
{
// This may hit if the asset editor is closed while interacting with a widget
// (ex. Ctrl-W is pressed mid drag before the value is committed)
if (bIsInputWidgetTransacting)
{
GEditor->EndTransaction();
if (UMetasoundEditorGraph* Graph = GraphMember->GetOwningGraph())
{
constexpr bool bPostTransaction = false;
GraphMember->UpdateFrontendDefaultLiteral(bPostTransaction);
Graph->GetModifyContext().AddMemberIDsModified({ GraphMember->GetMemberID() });
}
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
DefaultFloat->OnDefaultValueChanged.Remove(InputSliderOnValueChangedDelegateHandle);
DefaultFloat->OnRangeChanged.Remove(InputSliderOnRangeChangedDelegateHandle);
}
}
}
}
bool SMetaSoundGraphNode::IsVariableAccessor() const
{
return ClassType == EMetasoundFrontendClassType::VariableAccessor
|| ClassType == EMetasoundFrontendClassType::VariableDeferredAccessor;
}
bool SMetaSoundGraphNode::IsVariableMutator() const
{
return ClassType == EMetasoundFrontendClassType::VariableMutator;
}
const FSlateBrush* SMetaSoundGraphNode::GetShadowBrush(bool bSelected) const
{
if (IsVariableAccessor() || IsVariableMutator())
{
return bSelected ? FAppStyle::GetBrush(TEXT("Graph.VarNode.ShadowSelected")) : FAppStyle::GetBrush(TEXT("Graph.VarNode.Shadow"));
}
return SGraphNode::GetShadowBrush(bSelected);
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
void SMetaSoundGraphNode::Construct(const FArguments& InArgs, class UEdGraphNode* InNode)
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
GraphNode = InNode;
Frontend::FConstNodeHandle NodeHandle = GetMetaSoundNode().GetConstNodeHandle();
ClassType = NodeHandle->GetClassMetadata().GetType();
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
SetCursor(EMouseCursor::CardinalCross);
UpdateGraphNode();
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
void SMetaSoundGraphNode::ExecuteTrigger(UMetasoundEditorGraphMemberDefaultLiteral& Literal)
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
UMetasoundEditorGraphMember* Member = Cast<UMetasoundEditorGraphMember>(Literal.GetOuter());
if (!ensure(Member))
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
return;
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (UMetasoundEditorGraph* Graph = Member->GetOwningGraph())
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (!Graph->IsPreviewing())
{
TSharedPtr<FEditor> MetaSoundEditor = FGraphBuilder::GetEditorForMetasound(Graph->GetMetasoundChecked());
if (!MetaSoundEditor.IsValid())
{
return;
}
MetaSoundEditor->Play();
}
}
if (UAudioComponent* PreviewComponent = GEditor->GetPreviewAudioComponent())
{
PreviewComponent->SetTriggerParameter(Member->GetMemberName());
}
}
TAttribute<EVisibility> SMetaSoundGraphNode::GetSimulationVisibilityAttribute() const
{
return TAttribute<EVisibility>::CreateLambda([this]()
{
using namespace Frontend;
if (const UMetasoundEditorGraphMemberNode* Node = Cast<UMetasoundEditorGraphMemberNode>(&GetMetaSoundNode()))
{
if (const UMetasoundEditorGraphVertex* Vertex = Cast<UMetasoundEditorGraphVertex>(Node->GetMember()))
{
if (const UMetasoundEditorGraph* Graph = Vertex->GetOwningGraph())
{
if (!Graph->IsPreviewing())
{
return EVisibility::Hidden;
}
}
// Don't enable trigger simulation widget if its a trigger provided by an interface
// that does not support transmission.
const FInterfaceRegistryKey Key = GetInterfaceRegistryKey(Vertex->GetInterfaceVersion());
const IInterfaceRegistryEntry* Entry = IInterfaceRegistry::Get().FindInterfaceRegistryEntry(Key);
if (Entry && Entry->GetRouterName() != Audio::IParameterTransmitter::RouterName)
{
return EVisibility::Hidden;
}
else if (const UMetasoundEditorGraphMemberDefaultLiteral* Literal = Vertex->GetLiteral())
{
if (!Literal)
{
return EVisibility::Hidden;
}
}
}
}
return EVisibility::Visible;
});
}
TSharedRef<SWidget> SMetaSoundGraphNode::CreateTriggerSimulationWidget(UMetasoundEditorGraphMemberDefaultLiteral& InputLiteral, TAttribute<EVisibility>&& InVisibility, TAttribute<bool>&& InEnablement, const FText* InToolTip)
{
const FText ToolTip = InToolTip
? *InToolTip
: LOCTEXT("MetasoundGraphNode_TriggerTestToolTip", "Executes trigger if currently previewing MetaSound.");
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
TSharedPtr<SButton> SimulationButton;
TSharedRef<SWidget> SimulationWidget = SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.Padding(2.0f, 0.0f, 0.0f, 0.0f)
.HAlign(HAlign_Left)
.VAlign(VAlign_Center)
[
SAssignNew(SimulationButton, SButton)
.ButtonStyle(FAppStyle::Get(), "SimpleButton")
.OnClicked_Lambda([LiteralPtr = TWeakObjectPtr<UMetasoundEditorGraphMemberDefaultLiteral>(&InputLiteral)]()
{
if (LiteralPtr.IsValid())
{
ExecuteTrigger(*LiteralPtr.Get());
}
return FReply::Handled();
})
.ToolTipText(ToolTip)
.ForegroundColor(FSlateColor::UseForeground())
.ContentPadding(0)
.IsFocusable(false)
[
SNew(SImage)
.Image(FAppStyle::Get().GetBrush("Icons.CircleArrowDown"))
.ColorAndOpacity(FSlateColor::UseForeground())
]
.Visibility(MoveTemp(InVisibility))
];
SimulationButton->SetEnabled(MoveTemp(InEnablement));
return SimulationWidget;
}
void SMetaSoundGraphNode::CreateInputSideAddButton(TSharedPtr<SVerticalBox> InputBox)
{
TSharedRef<SWidget> AddPinButton = AddPinButtonContent(
LOCTEXT("MetasoundGraphNode_AddPinInputButton", "Add Input"),
LOCTEXT("MetasoundGraphNode_AddPinInputButton_Tooltip", "Add an input to the parent Metasound node.")
);
FMargin AddPinPadding = Settings->GetOutputPinPadding();
AddPinPadding.Top += 6.0f;
InputBox->AddSlot()
.AutoHeight()
.VAlign(VAlign_Center)
.Padding(AddPinPadding)
[
AddPinButton
];
}
void SMetaSoundGraphNode::CreateOutputSideAddButton(TSharedPtr<SVerticalBox> OutputBox)
{
TSharedRef<SWidget> AddPinButton = AddPinButtonContent(
LOCTEXT("MetasoundGraphNode_AddPinOutputButton", "Add Output"),
LOCTEXT("MetasoundGraphNode_AddPinOutputButton_Tooltip", "Add an output to the parent Metasound node.")
);
FMargin AddPinPadding = Settings->GetOutputPinPadding();
AddPinPadding.Top += 6.0f;
OutputBox->AddSlot()
.AutoHeight()
.VAlign(VAlign_Center)
.Padding(AddPinPadding)
[
AddPinButton
];
}
UMetasoundEditorGraphNode& SMetaSoundGraphNode::GetMetaSoundNode()
{
return *CastChecked<UMetasoundEditorGraphNode>(GraphNode);
}
const UMetasoundEditorGraphNode& SMetaSoundGraphNode::GetMetaSoundNode() const
{
check(GraphNode);
return *Cast<UMetasoundEditorGraphNode>(GraphNode);
}
TSharedPtr<SGraphPin> SMetaSoundGraphNode::CreatePinWidget(UEdGraphPin* InPin) const
{
using namespace Frontend;
TSharedPtr<SGraphPin> PinWidget;
if (const UMetasoundEditorGraphSchema* GraphSchema = Cast<const UMetasoundEditorGraphSchema>(InPin->GetSchema()))
{
// Don't show default value field for container types
if (InPin->PinType.ContainerType != EPinContainerType::None)
{
PinWidget = SNew(SMetasoundGraphPin, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryAudio)
{
PinWidget = SNew(SMetasoundGraphPin, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryBoolean)
{
PinWidget = SNew(SMetasoundGraphPinBool, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryFloat
|| InPin->PinType.PinCategory == FGraphBuilder::PinCategoryTime)
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
{
PinWidget = SNew(SMetasoundGraphPinFloat, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryInt32)
{
if (SMetasoundGraphEnumPin::FindEnumInterfaceFromPin(InPin))
{
PinWidget = SNew(SMetasoundGraphEnumPin, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else
{
PinWidget = SNew(SMetasoundGraphPinInteger, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryObject)
{
PinWidget = SNew(SMetasoundGraphPinObject, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryString)
{
PinWidget = SNew(SMetasoundGraphPinString, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (InPin->PinType.PinCategory == FGraphBuilder::PinCategoryTrigger)
{
PinWidget = SNew(SMetasoundGraphPin, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
const FSlateBrush& PinConnectedBrush = Editor::Style::GetSlateBrushSafe("MetasoundEditor.Graph.TriggerPin.Connected");
const FSlateBrush& PinDisconnectedBrush = Editor::Style::GetSlateBrushSafe("MetasoundEditor.Graph.TriggerPin.Disconnected");
PinWidget->SetCustomPinIcon(&PinConnectedBrush, &PinDisconnectedBrush);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
}
if (!PinWidget.IsValid())
{
PinWidget = SNew(SMetasoundGraphPin, InPin);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
IMetasoundEditorModule& EditorModule = FModuleManager::GetModuleChecked<IMetasoundEditorModule>("MetaSoundEditor");
const FSlateBrush* PinConnectedIcon = nullptr;
const FSlateBrush* PinDisconnectedIcon = nullptr;
if (EditorModule.GetCustomPinIcons(InPin, PinConnectedIcon, PinDisconnectedIcon))
{
PinWidget->SetCustomPinIcon(PinConnectedIcon, PinDisconnectedIcon);
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
return PinWidget;
}
void SMetaSoundGraphNode::CreateStandardPinWidget(UEdGraphPin* InPin)
{
const bool bShowPin = ShouldPinBeHidden(InPin);
if (bShowPin)
{
TSharedPtr<SGraphPin> NewPin = CreatePinWidget(InPin);
check(NewPin.IsValid());
Frontend::FConstNodeHandle NodeHandle = GetMetaSoundNode().GetConstNodeHandle();
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (InPin->Direction == EGPD_Input)
{
if (!NodeHandle->GetClassStyle().Display.bShowInputNames)
{
NewPin->SetShowLabel(false);
}
}
else if (InPin->Direction == EGPD_Output)
{
if (!NodeHandle->GetClassStyle().Display.bShowOutputNames)
{
NewPin->SetShowLabel(false);
}
}
AddPin(NewPin.ToSharedRef());
}
}
TSharedRef<SWidget> SMetaSoundGraphNode::CreateTitleWidget(TSharedPtr<SNodeTitle> NodeTitle)
{
Frontend::FConstNodeHandle NodeHandle = GetMetaSoundNode().GetConstNodeHandle();
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (!NodeHandle->GetClassStyle().Display.bShowName)
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
return SNullWidget::NullWidget;
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
TSharedPtr<SHorizontalBox> TitleBoxWidget = SNew(SHorizontalBox);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
FSlateIcon NodeIcon = GetMetaSoundNode().GetNodeTitleIcon();
if (const FSlateBrush* IconBrush = NodeIcon.GetIcon())
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (IconBrush != FStyleDefaults::GetNoBrush())
{
TSharedPtr<SImage> Image;
TitleBoxWidget->AddSlot()
.AutoWidth()
.VAlign(VAlign_Center)
.HAlign(HAlign_Right)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.Padding(0.0f, 0.0f, 4.0f, 0.0f)
.VAlign(VAlign_Center)
.HAlign(HAlign_Right)
[
SAssignNew(Image, SImage)
]
];
Image->SetColorAndOpacity(TAttribute<FSlateColor>::CreateLambda([this]() { return FSlateColor(GetNodeTitleColorOverride()); }));
Image->SetImage(IconBrush);
}
}
TitleBoxWidget->AddSlot()
.AutoWidth()
.VAlign(VAlign_Center)
[
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
SGraphNode::CreateTitleWidget(NodeTitle)
];
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
InlineEditableText->SetColorAndOpacity(TAttribute<FLinearColor>::Create(TAttribute<FLinearColor>::FGetter::CreateSP(this, &SMetaSoundGraphNode::GetNodeTitleColorOverride)));
return TitleBoxWidget.ToSharedRef();
}
void SMetaSoundGraphNode::GetOverlayBrushes(bool bSelected, const FVector2D WidgetSize, TArray<FOverlayBrushInfo>& Brushes) const
{
FName CornerIcon = GetMetaSoundNode().GetCornerIcon();
if (CornerIcon != NAME_None)
{
if (const FSlateBrush* Brush = FAppStyle::GetBrush(CornerIcon))
{
FOverlayBrushInfo OverlayInfo = { Brush };
// Logic copied from SGraphNodeK2Base
OverlayInfo.OverlayOffset.X = (WidgetSize.X - (OverlayInfo.Brush->ImageSize.X / 2.f)) - 3.f;
OverlayInfo.OverlayOffset.Y = (OverlayInfo.Brush->ImageSize.Y / -2.f) + 2.f;
Brushes.Add(MoveTemp(OverlayInfo));
}
}
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
FLinearColor SMetaSoundGraphNode::GetNodeTitleColorOverride() const
{
FLinearColor ReturnTitleColor = GraphNode->IsDeprecated() ? FLinearColor::Red : GetNodeObj()->GetNodeTitleColor();
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (!GraphNode->IsNodeEnabled() || GraphNode->IsDisplayAsDisabledForced() || GraphNode->IsNodeUnrelated())
{
ReturnTitleColor *= FLinearColor(0.5f, 0.5f, 0.5f, 0.4f);
}
else
{
ReturnTitleColor.A = FadeCurve.GetLerp();
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
return ReturnTitleColor;
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
void SMetaSoundGraphNode::SetDefaultTitleAreaWidget(TSharedRef<SOverlay> DefaultTitleAreaWidget)
{
SGraphNode::SetDefaultTitleAreaWidget(DefaultTitleAreaWidget);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
Metasound::Frontend::FNodeHandle NodeHandle = GetMetaSoundNode().GetNodeHandle();
if (NodeHandle->GetClassStyle().Display.bShowName)
{
DefaultTitleAreaWidget->ClearChildren();
TSharedPtr<SNodeTitle> NodeTitle = SNew(SNodeTitle, GraphNode);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
DefaultTitleAreaWidget->AddSlot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Center)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
.HAlign(HAlign_Fill)
[
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
SNew(SBorder)
.BorderImage(FAppStyle::GetBrush("NoBorder"))
[
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
.HAlign(HAlign_Center)
[
CreateTitleWidget(NodeTitle)
]
+ SVerticalBox::Slot()
.AutoHeight()
[
NodeTitle.ToSharedRef()
]
]
]
]
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
+ SHorizontalBox::Slot()
.HAlign(HAlign_Right)
.VAlign(VAlign_Center)
.Padding(0, 0, 5, 0)
.AutoWidth()
[
CreateTitleRightWidget()
]
];
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
DefaultTitleAreaWidget->AddSlot()
.VAlign(VAlign_Top)
[
SNew(SBorder)
.Visibility(EVisibility::HitTestInvisible)
.BorderImage( FAppStyle::GetBrush( "Graph.Node.TitleHighlight" ) )
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
.BorderBackgroundColor( this, &SGraphNode::GetNodeTitleIconColor )
[
SNew(SSpacer)
.Size(FVector2D(20,20))
]
];
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
DefaultTitleAreaWidget->SetVisibility(EVisibility::Collapsed);
}
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
void SMetaSoundGraphNode::MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter, bool bMarkDirty)
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
SGraphNode::MoveTo(NewPosition, NodeFilter, bMarkDirty);
UMetasoundEditorGraphNode& Node = GetMetaSoundNode();
Node.GetMetasoundChecked().Modify();
Node.SetNodeLocation(NewPosition);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
const FSlateBrush* SMetaSoundGraphNode::GetNodeBodyBrush() const
{
// TODO: Add tweak & add custom bodies
if (GraphNode)
{
switch (ClassType)
{
case EMetasoundFrontendClassType::Variable:
case EMetasoundFrontendClassType::VariableAccessor:
case EMetasoundFrontendClassType::VariableDeferredAccessor:
case EMetasoundFrontendClassType::VariableMutator:
{
return FAppStyle::GetBrush("Graph.VarNode.Body");
}
break;
case EMetasoundFrontendClassType::Input:
case EMetasoundFrontendClassType::Output:
default:
{
}
break;
}
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
return FAppStyle::GetBrush("Graph.Node.Body");
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
EVisibility SMetaSoundGraphNode::IsAddPinButtonVisible() const
{
EVisibility DefaultVisibility = SGraphNode::IsAddPinButtonVisible();
if (DefaultVisibility == EVisibility::Visible)
{
if (!GetMetaSoundNode().CanAddInputPin())
{
return EVisibility::Collapsed;
}
}
return DefaultVisibility;
}
FReply SMetaSoundGraphNode::OnAddPin()
{
GetMetaSoundNode().CreateInputPin();
return FReply::Handled();
}
FName SMetaSoundGraphNode::GetLiteralDataType() const
{
using namespace Frontend;
FName TypeName;
// Just take last type. If more than one, all types are the same.
const UMetasoundEditorGraphNode& Node = GetMetaSoundNode();
Node.GetNodeHandle()->IterateConstOutputs([InTypeName = &TypeName](FConstOutputHandle OutputHandle)
{
*InTypeName = OutputHandle->GetDataType();
});
return TypeName;
}
TSharedRef<SWidget> SMetaSoundGraphNode::CreateTitleRightWidget()
{
using namespace Frontend;
const FName TypeName = GetLiteralDataType();
if (TypeName == Metasound::GetMetasoundDataTypeName<Metasound::FTrigger>())
{
if (UMetasoundEditorGraphMemberNode* Node = Cast<UMetasoundEditorGraphMemberNode>(&GetMetaSoundNode()))
{
if (UMetasoundEditorGraphInput* Input = Cast<UMetasoundEditorGraphInput>(Node->GetMember()))
{
if (UMetasoundEditorGraphMemberDefaultLiteral* Literal = Input->GetLiteral())
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
TAttribute<EVisibility> SimVisibility = GetSimulationVisibilityAttribute();
TAttribute<bool> SimEnablement = true;
return CreateTriggerSimulationWidget(*Literal, MoveTemp(SimVisibility), MoveTemp(SimEnablement));
}
}
}
}
return SGraphNode::CreateTitleRightWidget();
}
UMetasoundEditorGraphMember* SMetaSoundGraphNode::GetMetaSoundMember()
{
if (UMetasoundEditorGraphMemberNode* MemberNode = GetMetaSoundMemberNode())
{
return MemberNode->GetMember();
}
return nullptr;
}
UMetasoundEditorGraphMemberNode* SMetaSoundGraphNode::GetMetaSoundMemberNode()
{
return Cast<UMetasoundEditorGraphMemberNode>(&GetMetaSoundNode());
}
TSharedRef<SWidget> SMetaSoundGraphNode::CreateNodeContentArea()
{
using namespace Frontend;
FConstNodeHandle NodeHandle = GetMetaSoundNode().GetConstNodeHandle();
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
const FMetasoundFrontendClassStyleDisplay& StyleDisplay = NodeHandle->GetClassStyle().Display;
TSharedPtr<SHorizontalBox> ContentBox = SNew(SHorizontalBox);
TSharedPtr<SWidget> OuterContentBox; // currently only used for input float nodes to accommodate the input widget
// If editable float input node and not constructor input, check if custom widget required
bool bShowInputWidget = false;
if (UMetasoundEditorGraphInput* GraphMember = Cast<UMetasoundEditorGraphInput>(GetMetaSoundMember()))
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
{
const UMetasoundEditorGraph* OwningGraph = GraphMember->GetOwningGraph();
if (OwningGraph && OwningGraph->IsEditable() && GraphMember->GetVertexAccessType() == EMetasoundFrontendVertexAccessType::Reference)
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
{
UMetasoundEditorGraphMemberDefaultFloat* DefaultFloat = Cast<UMetasoundEditorGraphMemberDefaultFloat>(GraphMember->GetLiteral());
if (DefaultFloat && DefaultFloat->WidgetType != EMetasoundMemberDefaultWidget::None)
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
{
constexpr float WidgetPadding = 3.0f;
static const FVector2D SliderDesiredSizeVertical = FVector2D(30.0f, 250.0f);
static const FVector2D RadialSliderDesiredSize = FVector2D(56.0f, 87.0f);
bShowInputWidget = true;
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
auto OnValueChangedLambda = [DefaultFloat, GraphMember, this](float Value)
{
if (InputWidget.IsValid())
{
if (!bIsInputWidgetTransacting)
{
GEditor->BeginTransaction(LOCTEXT("MetasoundGraphNode_MetasoundSetInputDefault", "Set MetaSound Input Default"));
bIsInputWidgetTransacting = true;
}
GraphMember->GetOwningGraph()->GetMetasound()->Modify();
DefaultFloat->Modify();
constexpr bool bPostTransaction = true;
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
float Output = InputWidget->GetOutputValue(Value);
DefaultFloat->SetDefault(Output);
GraphMember->UpdateFrontendDefaultLiteral(bPostTransaction);
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
};
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
auto OnValueCommittedLambda = [DefaultFloat, GraphMember, this](float Value)
{
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
if (InputWidget.IsValid())
{
bool bPostTransaction = false;
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
float Output = InputWidget->GetOutputValue(Value);
DefaultFloat->SetDefault(Output);
if (bIsInputWidgetTransacting)
{
GEditor->EndTransaction();
bIsInputWidgetTransacting = false;
}
else
{
bPostTransaction = true;
UE_LOG(LogMetaSound, Warning, TEXT("Unmatched MetaSound editor widget transaction."));
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
GraphMember->UpdateFrontendDefaultLiteral(bPostTransaction);
if (UMetasoundEditorGraph* Graph = GraphMember->GetOwningGraph())
{
Graph->GetModifyContext().AddMemberIDsModified({ GraphMember->GetMemberID() });
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
}
};
if (DefaultFloat->WidgetType == EMetasoundMemberDefaultWidget::Slider)
{
// Create slider
if (DefaultFloat->WidgetValueType == EMetasoundMemberDefaultWidgetValueType::Frequency)
{
SAssignNew(InputWidget, SAudioFrequencySlider)
.OnValueChanged_Lambda(OnValueChangedLambda)
.OnValueCommitted_Lambda(OnValueCommittedLambda);
}
else if (DefaultFloat->WidgetValueType == EMetasoundMemberDefaultWidgetValueType::Volume)
{
SAssignNew(InputWidget, SAudioVolumeSlider)
.OnValueChanged_Lambda(OnValueChangedLambda)
.OnValueCommitted_Lambda(OnValueCommittedLambda);
StaticCastSharedPtr<SAudioVolumeSlider>(InputWidget)->SetUseLinearOutput(DefaultFloat->VolumeWidgetUseLinearOutput);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else
{
SAssignNew(InputWidget, SAudioSlider)
.OnValueChanged_Lambda(OnValueChangedLambda)
.OnValueCommitted_Lambda(OnValueCommittedLambda);
InputWidget->SetShowUnitsText(false);
}
// Slider layout
if (DefaultFloat->WidgetOrientation == Orient_Vertical)
{
SAssignNew(OuterContentBox, SVerticalBox)
+ SVerticalBox::Slot()
.HAlign(HAlign_Right)
.VAlign(VAlign_Center)
.AutoHeight()
[
ContentBox.ToSharedRef()
]
+ SVerticalBox::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Top)
.Padding(WidgetPadding, 0.0f, WidgetPadding, WidgetPadding)
.AutoHeight()
[
InputWidget.ToSharedRef()
];
InputWidget->SetDesiredSizeOverride(SliderDesiredSizeVertical);
}
else // horizontal orientation
{
UMetasoundEditorGraphMemberNode* MemberNode = GetMetaSoundMemberNode();
TSharedPtr<SWidget> Slot1;
TSharedPtr<SWidget> Slot2;
if (MemberNode->IsA<UMetasoundEditorGraphInputNode>())
{
Slot1 = InputWidget;
Slot2 = ContentBox;
}
else
{
Slot1 = ContentBox;
Slot2 = InputWidget;
}
SAssignNew(OuterContentBox, SHorizontalBox)
+ SHorizontalBox::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Center)
.Padding(WidgetPadding, 0.0f, WidgetPadding, 0.0f)
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
.AutoWidth()
[
Slot1.ToSharedRef()
]
+ SHorizontalBox::Slot()
.HAlign(HAlign_Center)
.VAlign(VAlign_Fill)
.AutoWidth()
[
Slot2.ToSharedRef()
];
InputWidget->SetDesiredSizeOverride(FVector2D(SliderDesiredSizeVertical.Y, SliderDesiredSizeVertical.X));
}
// safe downcast because the ptr was just assigned above
StaticCastSharedPtr<SAudioSliderBase>(InputWidget)->SetOrientation(DefaultFloat->WidgetOrientation);
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
else if (DefaultFloat->WidgetType == EMetasoundMemberDefaultWidget::RadialSlider)
{
auto OnRadialSliderMouseCaptureBeginLambda = [this]()
{
if (!bIsInputWidgetTransacting)
{
GEditor->BeginTransaction(LOCTEXT("MetasoundSetRadialSliderInputDefault", "Set MetaSound Input Default"));
bIsInputWidgetTransacting = true;
}
};
auto OnRadialSliderMouseCaptureEndLambda = [this]()
{
if (bIsInputWidgetTransacting)
{
GEditor->EndTransaction();
bIsInputWidgetTransacting = false;
}
else
{
UE_LOG(LogMetaSound, Warning, TEXT("Unmatched MetaSound editor widget transaction."));
}
};
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
// Create slider
if (DefaultFloat->WidgetValueType == EMetasoundMemberDefaultWidgetValueType::Frequency)
{
SAssignNew(InputWidget, SAudioFrequencyRadialSlider)
.OnValueChanged_Lambda(OnValueChangedLambda)
.OnMouseCaptureBegin_Lambda(OnRadialSliderMouseCaptureBeginLambda)
.OnMouseCaptureEnd_Lambda(OnRadialSliderMouseCaptureEndLambda);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else if (DefaultFloat->WidgetValueType == EMetasoundMemberDefaultWidgetValueType::Volume)
{
SAssignNew(InputWidget, SAudioVolumeRadialSlider)
.OnValueChanged_Lambda(OnValueChangedLambda)
.OnMouseCaptureBegin_Lambda(OnRadialSliderMouseCaptureBeginLambda)
.OnMouseCaptureEnd_Lambda(OnRadialSliderMouseCaptureEndLambda);
StaticCastSharedPtr<SAudioVolumeRadialSlider>(InputWidget)->SetUseLinearOutput(DefaultFloat->VolumeWidgetUseLinearOutput);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
else
{
SAssignNew(InputWidget, SAudioRadialSlider)
.OnValueChanged_Lambda(OnValueChangedLambda)
.OnMouseCaptureBegin_Lambda(OnRadialSliderMouseCaptureBeginLambda)
.OnMouseCaptureEnd_Lambda(OnRadialSliderMouseCaptureEndLambda);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
InputWidget->SetShowUnitsText(false);
}
// Only vertical layout for radial slider
SAssignNew(OuterContentBox, SVerticalBox)
+ SVerticalBox::Slot()
.HAlign(HAlign_Right)
.VAlign(VAlign_Center)
.AutoHeight()
[
ContentBox.ToSharedRef()
]
+ SVerticalBox::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Top)
.Padding(WidgetPadding, 0.0f, WidgetPadding, WidgetPadding)
.AutoHeight()
[
InputWidget.ToSharedRef()
];
InputWidget->SetDesiredSizeOverride(RadialSliderDesiredSize);
}
InputWidget->SetOutputRange(DefaultFloat->GetRange());
InputWidget->SetUnitsTextReadOnly(true);
InputWidget->SetSliderValue(InputWidget->GetSliderValue(DefaultFloat->GetDefault()));
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
InputWidget->SetVisibility(TAttribute<EVisibility>::Create([this]()
{
if (UMetasoundEditorGraphMemberNode* Node = GetMetaSoundMemberNode())
{
return Node->EnableInteractWidgets() ? EVisibility::Visible : EVisibility::Collapsed;
}
return EVisibility::Collapsed;
}));
// Setup & clear delegate if necessary (ex. if was just saved)
if (InputSliderOnValueChangedDelegateHandle.IsValid())
{
DefaultFloat->OnDefaultValueChanged.Remove(InputSliderOnValueChangedDelegateHandle);
InputSliderOnValueChangedDelegateHandle.Reset();
}
InputSliderOnValueChangedDelegateHandle = DefaultFloat->OnDefaultValueChanged.AddLambda([Widget = InputWidget](float Value)
{
if (Widget.IsValid())
{
const float SliderValue = Widget->GetSliderValue(Value);
Widget->SetSliderValue(SliderValue);
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
});
if (InputSliderOnRangeChangedDelegateHandle.IsValid())
{
DefaultFloat->OnRangeChanged.Remove(InputSliderOnRangeChangedDelegateHandle);
InputSliderOnRangeChangedDelegateHandle.Reset();
}
InputSliderOnRangeChangedDelegateHandle = DefaultFloat->OnRangeChanged.AddLambda([Widget = InputWidget](FVector2D Range)
{
if (Widget.IsValid())
{
Widget->SetOutputRange(Range);
}
});
}
}
}
// Gives more space for user to grab a bit easier as variables do not have any title area nor icon
const float GrabPadding = IsVariableMutator() ? 28.0f : 0.0f;
const EVerticalAlignment PinNodeAlignInput = (!StyleDisplay.bShowInputNames && NodeHandle->GetNumInputs() == 1) ? VAlign_Center : VAlign_Top;
ContentBox->AddSlot()
.HAlign(HAlign_Left)
.VAlign(PinNodeAlignInput)
.FillWidth(1.0f)
.Padding(0.0f, 0.0f, GrabPadding, 0.0f)
[
SAssignNew(LeftNodeBox, SVerticalBox)
];
if (!StyleDisplay.ImageName.IsNone())
{
const FSlateBrush& ImageBrush = Metasound::Editor::Style::GetSlateBrushSafe(StyleDisplay.ImageName);
ContentBox->AddSlot()
.AutoWidth()
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
[
SNew(SImage)
.Image(&ImageBrush)
.ColorAndOpacity(FSlateColor::UseForeground())
.DesiredSizeOverride(FVector2D(20, 20))
];
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
}
const EVerticalAlignment PinNodeAlignOutput = (!StyleDisplay.bShowInputNames && NodeHandle->GetNumOutputs() == 1) ? VAlign_Center : VAlign_Top;
ContentBox->AddSlot()
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
.AutoWidth()
.HAlign(HAlign_Right)
.VAlign(PinNodeAlignOutput)
.Padding(GrabPadding, 0.0f, 0.0f, 0.0f)
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
[
SAssignNew(RightNodeBox, SVerticalBox)
];
return SNew(SBorder)
.BorderImage(FAppStyle::GetBrush("NoBorder"))
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.Padding(FMargin(0,3))
[
(bShowInputWidget ? OuterContentBox : ContentBox).ToSharedRef()
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
];
}
TSharedPtr<SGraphPin> SMetaSoundGraphNodeKnot::CreatePinWidget(UEdGraphPin* Pin) const
{
return SNew(SMetaSoundGraphPinKnot, Pin);
}
void SMetaSoundGraphNodeKnot::Construct(const FArguments& InArgs, class UEdGraphNode* InNode)
{
GraphNode = InNode;
SetCursor(EMouseCursor::CardinalCross);
UpdateGraphNode();
}
void SMetaSoundGraphNodeKnot::MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter, bool bMarkDirty)
{
SGraphNode::MoveTo(NewPosition, NodeFilter, bMarkDirty);
UMetasoundEditorGraphNode& Node = GetMetaSoundNode();
Node.GetMetasoundChecked().Modify();
Node.SetNodeLocation(NewPosition);
}
UMetasoundEditorGraphNode& SMetaSoundGraphNodeKnot::GetMetaSoundNode()
{
return *CastChecked<UMetasoundEditorGraphNode>(GraphNode);
}
const UMetasoundEditorGraphNode& SMetaSoundGraphNodeKnot::GetMetaSoundNode() const
{
check(GraphNode);
return *Cast<UMetasoundEditorGraphNode>(GraphNode);
}
- Rename & redirect MetaSoundEditorGraph<Input>Literals to MetaSoundEditorGraph<DefaultMember>Literals - First pass at consolidating editor code for API members/vertices where possible - Make Variables & Output now use default literal for input value (so user doesn't have to hunt down literal box in graph) Various bug fixes: - Fixes crash in post undo after updating a variable default - Fixes ':Array' flavor showing up in new SearchableComboBox when selecting `Is Array` for literal type - Synchronize variable setter default literal with variable interface default literal - Provide default literal field for outputs & variables for consistency - Added win is widget support for single input/output types (i.e. floats for now) - Don't show trigger simulate option on non-transmissible inputs (ex. OnPlay) - Set simulate button visibility to only show when parameter transmission is supported by input - Make simulate buttons in graph only visible when sound plays - Start sounds automatically when clicking simulate in inspector - Fixed initial condition "holding" trigger state for trigger routing now that Transmission System is only used inter-MetaSound (not intra-MetaSound) and we are deprecating Send/Receives #rb phil.popp #rnx #jira UE-135813 #jira UE-132900 #jira UE-135844 #jira UE-116867 #jira UE-135366 #jira UE-137310 #preflight 61b7afe4fc570891338fea08 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 18450046 in //UE5/Release-5.0/... via CL 18450065 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18450072 by rob gay in ue5-release-engine-test branch]
2021-12-13 18:15:01 -05:00
} // namespace Editor
} // namespace Metasound
#undef LOCTEXT_NAMESPACE // MetasoundEditor