You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- FGuid IDs are used to identify unique verticies within an entire graph (currently may be duplicated if graph is duplicated). - FNames are used to be readible vertex identifiers that are only unique within a node's API. - FText is only for ***OPTIONAL*** DisplayNames that can be provided as a more descriptive, readible descriptor of a given vertex (But are not necessarily unique). Currently disabled until loc tool on FText property in MetaSoundDetailsCustomization is properly displayed. #rb phil.popp #jira UE-123982 #preflight 613f6ff892b32b00016cf188 #ROBOMERGE-AUTHOR: rob.gay #ROBOMERGE-SOURCE: CL 17494445 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530) [CL 17494469 by rob gay in ue5-release-engine-test branch]
56 lines
1.7 KiB
C++
56 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
/*
|
|
|
|
Macros to make parameter definitions a little easier
|
|
Use in a namespace
|
|
|
|
namespace Metasound
|
|
{
|
|
namespace MyNodeVertexNames
|
|
{
|
|
METASOUND_PARAM(InputParam1, "Param 1", "Tooltip for param1.");
|
|
METASOUND_PARAM(InputParam2, "Param 2", "Tooltip for param2.");
|
|
METASOUND_PARAM(OutputParam1, "Out Param1", "Tooltip for output param 2.");
|
|
METASOUND_PARAM(OutputParam2, "Out Param2", "Tooltip for output param 2.");
|
|
}
|
|
}
|
|
|
|
Then to retrieve just do when in a:
|
|
|
|
using namespace MyNodeVertexNames;
|
|
|
|
METASOUND_GET_PARAM_NAME(InputParam1)
|
|
METASOUND_GET_PARAM_TT(InputParam1)
|
|
|
|
For variable parameters (e.g. templated on number), do the following:
|
|
|
|
namespace TriggerAccumulatorVertexNames
|
|
{
|
|
METASOUND_PARAM(InputParam, "Param {0}", "Do {0} tooltip.");
|
|
}
|
|
|
|
Then to retrieve the name/tooltip use:
|
|
|
|
METASOUND_GET_VARIABLE_PARAM_NAME(InputParam, NUMBER);
|
|
|
|
Where NUMBER is a number (or whatever) to slot into the format specifier you defined in the param def.
|
|
|
|
*/
|
|
|
|
|
|
#define METASOUND_PARAM(NAME, NAME_TEXT, TOOLTIP_TEXT) \
|
|
static const TCHAR* NAME##Name = TEXT(NAME_TEXT); \
|
|
static const FText NAME##Tooltip = LOCTEXT(#NAME "Tooltip", TOOLTIP_TEXT); \
|
|
|
|
|
|
#define METASOUND_GET_PARAM_NAME(NAME) NAME##Name
|
|
#define METASOUND_GET_PARAM_TT(NAME) NAME##Tooltip
|
|
#define METASOUND_GET_PARAM_NAME_AND_TT(NAME) NAME##Name, NAME##Tooltip
|
|
|
|
#define METASOUND_GET_VARIABLE_PARAM_NAME(NAME, INDEX) *FString::Format(NAME##Name, {INDEX})
|
|
#define METASOUND_GET_VARIABLE_TT(NAME, INDEX) FText::Format(NAME##Tooltip, INDEX)
|
|
#define METASOUND_GET_VARIABLE_PARAM_NAME_AND_TT(NAME, INDEX) *FString::Format(NAME##Name, {INDEX}), FText::Format(NAME##Tooltip, INDEX)
|