FNiagaraParameterMapHistoryBuilder

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FNiagaraParameterMapHistoryBuilder

FNiagaraParameterMapHistoryWithMetaDataBuilder

References

Module

NiagaraEditor

Header

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

Include

#include "NiagaraParameterMapHistory.h"

Syntax

class FNiagaraParameterMapHistoryBuilder

Variables

Name Description

Public variable

FGraphTraversal...

 

ActivePath

Protected variable

bool

 

bFilterByScriptAllowList

Whether or not the script allow list is active.

Protected variable

bool

 

bIgnoreDisabled

Whether or not to ignore disabled nodes.

Protected variable

bool

 

bIncludeParameterCollectionInfo

Whether we want to include ParameterCollection information

Public variable

bool

 

bShouldBuildSubHistories

Protected variable

TArray< const U...

 

CallingContext

Contains the hierarchy of nodes leading to the current graph being processed.

Protected variable

TArray< const U...

 

CallingGraphContext

Contains the hierarchy of graphs leading to and including the current graph being processed.

Public variable

FCompileConstan...

 

ConstantResolver

Protected variable

TArray< FString...

 

Constants

Protected variable

TArray< TArray<...

 

ContextuallyVisitedNodes

List of previously visited nodes per context.

Protected variable

TArray< FName >

 

EmitterNameContextStack

Contains the hierarchy of emitter node names leading to the current graph being processed.

Protected variable

TArray< FNiagar...

 

EncounterableExternalVariables

Protected variable

TArray< FString...

 

EncounteredEmitterNames

Protected variable

TArray< TArray<...

 

EncounteredFunctionNames

Protected variable

ENiagaraScriptU...

 

FilterScriptType

What the script type is that we should be filtering to if the allow list is enabled.

Protected variable

TArray< FName >

 

FunctionNameContextStack

Contains the hierarchy of function call node names leading to the current graph being processed.

Public variable

TArray< FNiagar...

 

Histories

Collection of the build histories from the graph traversal.

Protected variable

TArray< TMap< c...

 

PinToConstantIndices

Protected variable

TArray< TMap< c...

 

PinToParameterMapIndices

Tracker for each context level of the parameter map index associated with a given pin.

Protected variable

TArray< ENiagar...

 

RelevantScriptUsageContext

Keeps track of the script usage at the current context level.

Protected variable

FNiagaraAliasCo...

 

ResolveAliasContext

Resolved alias map for the current context level. Rebuilt by BuildCurrentAliases.

Protected variable

TArray< FName >

 

ScriptUsageContextNameStack

Public variable

TArray< FNiagar...

 

StaticVariables

Protected variable

TArray< TMap< F...

 

VariableToConstantIndices

Constructors

Name Description

Public function

FNiagaraParameterMapHistoryBuilder()

Constructor

Destructors

Functions

Name Description

Public function

int32

 

AddOrGetConstantFromValue

(
    const FString& Value
)

Public function Virtual

int32

 

AddVariableToHistory

(
    FNiagaraParameterMapHistory& Histo...,
    const FNiagaraVariable& InVar,
    const FNiagaraVariable& InAliasedV...,
    const UEdGraphPin* InPin
)

Virtual wrapper to call correct AddVariable method on the target ParameterMapHistory.

Public function

uint32

 

BeginNodeVisitation

(
    int32 WhichParameterMap,
    const UNiagaraNode* Node
)

Public function

void

 

BeginTranslation

(
    const UNiagaraEmitter* Emitter
)

Public function

void

 

BeginTranslation

(
    const FString& EmitterUniqueName
)

Public function

void

 

BeginTranslation

(
    const UNiagaraScript* Script
)

Public function

void

 

BeginUsage

(
    ENiagaraScriptUsage InUsage,
    FName InStageName
)

Protected function

void

 

BuildCurrentAliases()

Generate the internal alias map from the current traversal state.

Public function

void

 

BuildParameterMaps

(
    const UNiagaraNodeOutput* Outp...,
    bool bRecursive
)

Called in order to set up the correct initial context for an Output node and invokes the UNiagaraNodeOutput's BuildParameterMapHistory method.

Public function Const

bool

 

ContextContains

(
    ENiagaraScriptUsage InUsage
)

Public function

int32

 

CreateParameterMap()

Add a new parameter map to the array.

Public function

void

 

EnableScriptAllowList

(
    bool bInEnable,
    ENiagaraScriptUsage InScriptType
)

In some cases, we don't want all the variables encountered in a traversal.

Public function

void

 

EndNodeVisitation

(
    int32 WhichParameterMap,
    uint32 IndexFromBeginNode
)

Public function

void

 

EndTranslation

(
    const UNiagaraScript* Script
)

Public function

void

 

EndTranslation

(
    const UNiagaraEmitter* Emitter
)

Public function

void

 

EndTranslation

(
    const FString& EmitterUniqueName
)

Public function

void

 

EndUsage()

Public function

void

 

EnterEmitter

(
    const FString& InEmitterName,
    const UNiagaraGraph* InGraph,
    const UNiagaraNode* Node
)

Record that we have entered an emitter scope.

Public function

void

 

EnterFunction

(
    const FString& InNodeName,
    const UNiagaraScript* InScript,
    const UNiagaraGraph* InGraph,
    const UNiagaraNode* Node
)

Record that we have entered a new function scope.

Public function

void

 

ExitEmitter

(
    const FString& InEmitterName,
    const UNiagaraNode* Node
)

Record that we have exited an emitter scope.

Public function

void

 

ExitFunction

(
    const FString& InNodeName,
    const UNiagaraScript* InScript,
    const UNiagaraNode* Node
)

Record that we have exited a function scope.

Public function Const

int32

 

FindMatchingParameterMapFromContextInputs

(
    const FNiagaraVariable& InVar
)

Helper method to identify any matching input nodes from the calling context node to the input variable.

Public function Const

int32

 

FindMatchingStaticFromContextInputs

(
    const FNiagaraVariable& InVar
)

Public function Const

int32

 

FindStaticVariable

(
    const FNiagaraVariable& Var
)

Public function Const

ENiagaraScri...

 

GetBaseUsageContext()

Public function Const

const UNiaga...

 

GetCallingContext()

Get the node calling this sub-graph.

Public function

FString

 

GetConstant

(
    int32 InIndex
)

Public function Const

int32

 

GetConstantFromInputPin

(
    const UEdGraphPin* InputPin
)

Public function Const

int32

 

GetConstantFromOutputPin

(
    const UEdGraphPin* OutputPin
)

Public function

int32

 

GetConstantFromVariableRead

(
    const FNiagaraVariableBase& InVar
)

Public function Const

ENiagaraScri...

 

GetCurrentUsageContext()

Public function Const

const FStrin...

 

GetEmitterAlias()

Get the string that the "Emitter" namespace maps to currently (if it exists)

Public function Const

const TArray...

 

GetEncounterableVariables()

Public function Const

bool

 

GetIgnoreDisabled()

Public function Const

const FStrin...

 

GetModuleAlias()

Get the string that the "Module" namespace maps to currently (if it exists)

Public function Const

bool

 

GetNodePreviouslyVisited

(
    const UNiagaraNode* Node
)

Has RegisterNodeVisitation been called on the input node yet?

Public function Const

bool

 

GetPinPreviouslyVisited

(
    const UEdGraphPin* InPin
)

Has RegisterNodeVisitation been called yet on the owning node of this pin?

Public function

int32

 

HandleExternalVariableRead

(
    int32 ParamMapIdx,
    const FName& InVarName
)

Public function

int32

 

HandleVariableRead

(
    int32 ParameterMapIndex,
    const UEdGraphPin* InPin,
    bool RegisterReadsAsVariables,
    const UEdGraphPin* InDefaultPi...,
    bool bFilterForCompilation,
    bool& OutUsedDefault
)

Record that a pin reads from the parameter map.

Public function

int32

 

HandleVariableWrite

(
    int32 ParameterMapIndex,
    const UEdGraphPin* InPin
)

Record that a pin writes to the parameter map.

Public function

int32

 

HandleVariableWrite

(
    int32 ParameterMapIndex,
    const FNiagaraVariable& Var
)

Record that a variable write to the parameter map.

Public function Const

bool

 

HasCurrentUsageContext()

Public function Const

bool

 

InTopLevelFunctionCall

(
    ENiagaraScriptUsage InFilterScriptT...
)

Are we currently in a top-level function call context (ie a node in the main graph or an argument into a function for the main graph.)

Public function Const

bool

 

IsInEncounteredEmitterNamespace

(
    FNiagaraVariable& InVar
)

Public function Const

bool

 

IsInEncounteredFunctionNamespace

(
    FNiagaraVariable& InVar
)

Protected function

bool

 

IsNamespacedVariableRelevantToScriptType

(
    const FNiagaraVariable& InVar,
    ENiagaraScriptUsage ScriptType
)

Helper method used to take in input script type and determine if the passed in namespaced variable is worth tracking.

Public function

int32

 

RegisterConstantFromInputPin

(
    const UEdGraphPin* InputPin
)

Public function

int32

 

RegisterConstantPin

(
    int32 WhichConstant,
    const UEdGraphPin* Pin
)

Public function

int32

 

RegisterConstantVariableWrite

(
    int32 WhichParamMapIdx,
    int32 WhichConstant,
    int32 WhichVarIdx,
    bool bIsSettingDefault
)

Public function

void

 

RegisterDataSetWrite

(
    int32 WhichParameterMap,
    const FNiagaraDataSetID& DataSet
)

Records a write to a DataSet in the appropriate parameter map history

Public function

void

 

RegisterEncounterableVariables

(
    const TArray< FNiagaraVariable >& ...
)

Register any user or other external variables that could possibly be encountered but may not be declared explicitly.

Public function

void

 

RegisterExternalStaticVariables

(
    const TArray< FNiagaraVariable >& ...
)

Public function

void

 

RegisterNodeVisitation

(
    const UEdGraphNode* Node
)

Called first during a node's visitation during traversal to identify that a node has been visited.

Public function

int32

 

RegisterParameterMapPin

(
    int32 WhichParameterMap,
    const UEdGraphPin* Pin
)

Important.

Public function Const

FNiagaraVari...

 

ResolveAliases

(
    const FNiagaraVariable& InVar
)

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

Public function

void

 

SetConstantByStaticVariable

(
    int32& OutValue,
    const UEdGraphPin* InDefaultPi...
)

Public function

void

 

SetConstantByStaticVariable

(
    int32& OutValue,
    const FNiagaraVariable& Var
)

Public function

void

 

SetIgnoreDisabled

(
    bool bInIgnore
)

Protected function

bool

 

ShouldTrackVariable

(
    const FNiagaraVariable& InVar
)

Helper function called when variables are added to enable the filtering specified in EnableScriptAllowList.

Public function

int32

 

TraceParameterMapOutputPin

(
    const UEdGraphPin* OutputPin
)

Trace back a pin to whom it was connected to to find the current parameter map to use.

Public function

void

 

VisitInputPin

(
    const UEdGraphPin* Pin,
    const UNiagaraNode*,
    bool bFilterForCompilation
)

If we haven't already visited the owning node, do so.

Public function

void

 

VisitInputPins

(
    const UNiagaraNode*,
    bool bFilterForCompilation
)

If we haven't already visited the owning nodes, do so.