FNiagaraParameterMapHistory

Traverses a Niagara node graph to identify the variables that have been written and read from a parameter map.

Windows
MacOS
Linux

References

Module

NiagaraEditor

Header

/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/NiagaraParameterMapHistory.h

Include

#include "NiagaraParameterMapHistory.h"

Syntax

struct FNiagaraParameterMapHistory

Remarks

Traverses a Niagara node graph to identify the variables that have been written and read from a parameter map. This class is meant to aid in UI and compilation of the graph. There are several main script types and each one interacts slightly differently with the history depending on context.

Variables

Name Description

Public variable

TArray< FString...

 

EmitterNamespacesEncountered

List of emitter namespaces encountered as this parameter map was built.

Public variable

TArray< TTuple<...

 

MapNodeVariableMetaData

For each node in MapNodeVisitations, record the start index and end index of variables added within the body of the node, i.e. a Get node will record just the values it pulls out directly.

Public variable

TArray< const c...

 

MapNodeVisitations

List of nodes that manipulated the parameter map from input to output.

Public variable

TArray< const U...

 

MapPinHistory

List of pins that manipulated the parameter map from input to output.

Public variable

ENiagaraScriptU...

 

OriginatingScriptUsage

Public variable

TArray< FString...

 

ParameterCollectionNamespaces

Cached off contents of used parameter collections, in case they change during threaded compilation.

Public variable

TArray< UNiagar...

 

ParameterCollections

Used parameter collections identified during the traversal.

Public variable

TArray< TArray<...

 

ParameterCollectionVariables

Cached off contents of used parameter collections, in case they change during threaded compilation.

Public variable

TArray< TArray<...

 

PerVariableReadHistory

For each variable that was found, identify the pins that read them from the map in order from first to last read.

Public variable

TArray< FString...

 

PerVariableWarnings

Are there any warnings that were encountered during the traversal of the graph for a given variable?

Public variable

TArray< TArray<...

 

PerVariableWriteHistory

For each variable that was found, identify the pins that wrote to them in order from first to last write.

Public variable

TArray< FNiagar...

 

VariableMetaData

The metadata associated with each variable identified during the traversal.

Public variable

TArray< FNiagar...

 

Variables

The variables that have been identified during the traversal.

Public variable

TArray< FNiagar...

 

VariablesWithOriginalAliasesIntact

Constructors

Functions

Name Description

Public function

int32

 

AddExternalVariable

(
    const FNiagaraVariable& InVar
)

Add a variable outside the normal get/set node paradigm.

Public function

int32

 

AddVariable

(
    const FNiagaraVariable& InVar,
    const FNiagaraVariable& InAliasedV...,
    const UEdGraphPin* InPin,
    TOptional< FNiagaraVariableMetaData...
)

Helper to add a variable to the known list for a parameter map.

Public function Static

FNiagaraVari...

 

BasicAttributeToNamespacedAttribute

(
    const FNiagaraVariable& InVar,
    bool bSanitizeInput
)

Reverses ResolveAsBasicAttribute.

Public function

uint32

 

BeginNodeVisitation

(
    const UNiagaraNode* Node
)

Public function Static

FNiagaraVari...

 

ConvertVariableToRapidIterationConstantName

(
    FNiagaraVariable InVar,
    const TCHAR* InEmitterName,
    ENiagaraScriptUsage InUsage
)

Public function

void

 

EndNodeVisitation

(
    uint32 IndexFromBeginNode
)

Public function

int32

 

FindVariable

(
    const FName& VariableName,
    const FNiagaraTypeDefinition& Type
)

Find a variable by both name and type.

Public function

int32

 

FindVariableByName

(
    const FName& VariableName,
    bool bAllowPartialMatch
)

Find a variable by name with no concern for type.

Public function Const

const UEdGra...

 

GetDefaultValuePin

(
    int32 VarIdx
)

Get the default value for this variable.

Public function Const

const UNiaga...

 

GetFinalOutputNode()

Get the output node associated with this graph.

Public function Const

const UEdGra...

 

GetFinalPin()

Get the output pin that we traced to build this history object.

Public function Static

FString

 

GetNamespace

(
    const FNiagaraVariable& InVar,
    bool bIncludeDelimiter
)

Get the first namespace entry for this variable. Optionally includes the trailing period.

Public function Const

const UEdGra...

 

GetOriginalPin()

Get the pin that added the parameter map to the graph.

Public function Static

FNiagaraVari...

 

GetSourceForInitialValue

(
    const FNiagaraVariable& InVar
)

Does this parameter contain the "Initial" namespace as one of its intermediate namespaces? If so, remove the "Initial" namespace and return the original value.

Public function Static

void

 

GetValidNamespacesForReading

(
    ENiagaraScriptUsage InScriptUsage,
    int32 InUsageBitmask,
    TArray< FString >& OutputNamespace...
)

Public function Static

void

 

GetValidNamespacesForReading

(
    const UNiagaraScript* InScript,
    TArray< FString >& OutputNamespace...
)

Public function Static

bool

 

IsAliasedEmitterParameter

(
    const FString& InVarName
)

Does this parameter start with the "Emitter" namespace? Note that the emitter namespace is an alias for Emitter and System script types and will be specialized to the name of that specific emitter.

Public function Static

bool

 

IsAliasedEmitterParameter

(
    const FNiagaraVariable& InVar
)

Does this parameter start with the "Emitter" namespace? Note that the emitter namespace is an alias for Emitter and System script types and will be specialized to the name of that specific emitter.

Public function Static

bool

 

IsAliasedModuleParameter

(
    const FNiagaraVariable& InVar
)

Does this parameter start with the "Module" namespace? Note that the emitter namespace is an alias for all non-funcion/module script types and will be specialized to the function call node's name using the module.

Public function Static

bool

 

IsAttribute

(
    const FNiagaraVariable& InVar
)

Does this parameter start with the "Particles" namespace?

Public function Static

bool

 

IsEmitterNamespaceReadOnly

(
    const UNiagaraScript* InScript
)

Given the script type and flags, should we treat the Emitter aliased namespace as read-only?

Public function Static

bool

 

IsEngineParameter

(
    const FNiagaraVariable& InVar
)

Is this parameter in the special "Engine" namespace?

Public function

bool

 

IsExportableExternalConstant

(
    const FNiagaraVariable& InVar,
    const UNiagaraScript* InScript
)

Are we required to export this variable as an external constant?

Public function Static

bool

 

IsExternalConstantNamespace

(
    const FNiagaraVariable& InVar,
    ENiagaraScriptUsage InUsage,
    int32 InUsageBitmask
)

Does this variable belong in a namespace that needs to come in as an external constant to this script?

Public function Static

bool

 

IsExternalConstantNamespace

(
    const FNiagaraVariable& InVar,
    const UNiagaraScript* InScript
)

Does this variable belong in a namespace that needs to come in as an external constant to this script?

Public function Static

bool

 

IsInitialValue

(
    const FNiagaraVariable& InVar
)

Does this parameter contain the "Initial" namespace as one of its intermediate namespaces?

Public function Static

bool

 

IsInNamespace

(
    const FNiagaraVariable& InVar,
    const FString& Namespace
)

Does the variable start with this namespace?

Public function

UNiagaraPara...

 

IsParameterCollectionParameter

(
    FNiagaraVariable& InVar,
    bool& bMissingParameter
)

If this is variable is a parameter in one of our tracked collections, return it.

Public function Static

bool

 

IsPerInstanceEngineParameter

(
    const FNiagaraVariable& InVar,
    const FString& EmitterAlias
)

Public function Const

bool

 

IsPrimaryDataSetOutput

(
    const FNiagaraVariable& InVar,
    ENiagaraScriptUsage InUsage,
    bool bAllowDataInterfaces
)

Called to determine if a given variable should be output from a script.

Public function Const

bool

 

IsPrimaryDataSetOutput

(
    const FNiagaraVariable& InVar,
    const UNiagaraScript* InScript,
    bool bAllowDataInterfaces
)

Called to determine if a given variable should be output from a script.

Public function Static

bool

 

IsRapidIterationParameter

(
    const FNiagaraVariable& InVar
)

Public function Static

bool

 

IsSystemNamespaceReadOnly

(
    const UNiagaraScript* InScript
)

Given the script type and flags, should we treat the System namespace as read-only?

Public function Static

bool

 

IsSystemParameter

(
    const FNiagaraVariable& InVar
)

Is this parameter in the special "System" namespace?

Public function Static

bool

 

IsUserParameter

(
    const FNiagaraVariable& InVar
)

Public function Static

bool

 

IsValidNamespaceForReading

(
    ENiagaraScriptUsage InScriptUsage,
    int32 InUsageBitmask,
    FString Namespace
)

Public function Static

FString

 

MakeSafeNamespaceString

(
    const FString& InStr
)

Take an input string and make it hlsl safe.

Public function Static

FNiagaraVari...

 

MoveToExternalConstantNamespaceVariable

(
    const FNiagaraVariable& InVar,
    const UNiagaraScript* InScript
)

Take a non-namespaced variable and move it to an appropriate external constant namespace for this script type.

Public function Static

FNiagaraVari...

 

MoveToExternalConstantNamespaceVariable

(
    const FNiagaraVariable& InVar,
    ENiagaraScriptUsage InUsage
)

Take a non-namespaced variable and move it to an appropriate external constant namespace for this script type.

Public function

int32

 

RegisterParameterMapPin

(
    const UEdGraphPin* Pin
)

Called in a depth-first traversal to identify a given Niagara Parameter Map pin that was touched during traversal.

Public function Static

FNiagaraVari...

 

ResolveAliases

(
    const FNiagaraVariable& InVar,
    const TMap< FString, FString >& In...,
    const TCHAR* InJoinSeparator
)

Use the input alias map to resolve any aliases in this input variable name.

Public function Static

FNiagaraVari...

 

ResolveAsBasicAttribute

(
    const FNiagaraVariable& InVar,
    bool bSanitizeInput
)

Remove the Particles namespace if it exists.

Public function Static

FName

 

ResolveEmitterAlias

(
    const FName& InName,
    const FString& InAlias
)

Public function Static

int32

 

SearchArrayForPartialNameMatch

(
    const TArray< FNiagaraVariable >& ...,
    const FName& VariableName
)

Public function Const

bool

 

ShouldIgnoreVariableDefault

(
    const FNiagaraVariable& Var
)

Public function Static

bool

 

SplitRapidIterationParameterName

(
    const FNiagaraVariable& InVar,
    FString& EmitterName,
    FString& FunctionCallName,
    FString& InputName
)

Public function Static

FNiagaraVari...

 

VariableToNamespacedVariable

(
    const FNiagaraVariable& InVar,
    FString Namespace
)

Prepends the namespace string to the variable name.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss