FNiagaraScriptViewModel

A view model for Niagara scripts which manages other script related view models.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NiagaraEditor

Header

/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/ViewModels/NiagaraScriptViewModel.h

Include

#include "ViewModels/NiagaraScriptViewModel.h"

Syntax

Remarks

A view model for Niagara scripts which manages other script related view models.

Variables

Name Description

Protected variable

bool

 

bUpdatingSelectionInternally

A flag for preventing reentrancy when synchronizing selection.

Protected variable

TArray< FString...

 

CompileErrors

Protected variable

TArray< FString...

 

CompilePaths

Protected variable

TArray< ENiagar...

 

CompileStatuses

Protected variable

TArray< TPair< ...

 

CompileTypes

Protected variable

TSharedRef< FNi...

 

GraphViewModel

The view model for the graph.

Protected variable

TSharedRef< FNi...

 

InputCollectionViewModel

The view model for the input parameter collection.

Protected variable

ENiagaraScriptC...

 

LastCompileStatus

The stored latest compile status.

Protected variable

FDelegateHandle

 

OnGraphChangedHandle

The handle to the graph changed delegate needed for removing.

Protected variable

TSharedRef< FNi...

 

OutputCollectionViewModel

The view model for the output parameter collection .

Protected variable

TArray< TNiagar...

 

RegisteredHandles

Protected variable

TArray< FVersio...

 

Scripts

The script which provides the data for this view model.

Protected variable

TWeakObjectPtr<...

 

Source

Protected variable

TSharedRef< FNi...

 

VariableSelection

The set of variables currently selected in the graph or the parameters panel.

Constructors

Name Description

Public function

FNiagaraScriptViewModel

(
    TAttribute< FText > DisplayName,
    ENiagaraParameterEditMode InParamet...
)

Destructors

Name Description

Public function Virtual

~FNiagaraScriptViewModel()

Functions

Name Description

Public function

void

 

CompileStandaloneScript

(
    bool bForceCompile
)

Compiles a script that isn't part of an emitter or System.

Public function

UNiagaraScri...

 

GetContainerScript

(
    ENiagaraScriptUsage InUsage,
    FGuid InUsageId
)

Public function Const

FText

 

GetDisplayName()

Public function

TSharedRef< ...

 

GetGraphViewModel()

Gets the view model for the graph.

Public function

TSharedRef< ...

 

GetInputCollectionViewModel()

Gets the view model for the input parameter collection.

Public function Virtual

ENiagaraScri...

 

GetLatestCompileStatus

(
    FGuid VersionGuid
)

Get the latest status of this view-model's script compilation.

Public function

TSharedRef< ...

 

GetOutputCollectionViewModel()

Gets the view model for the output parameter collection.

Public function

UNiagaraScri...

 

GetScript

(
    ENiagaraScriptUsage InUsage,
    FGuid InUsageId
)

Implements a globally unique identifier.

Public function Const

ENiagaraScri...

 

GetScriptCompileStatus

(
    ENiagaraScriptUsage InUsage,
    FGuid InUsageId
)

Public function Const

FText

 

GetScriptErrors

(
    ENiagaraScriptUsage InUsage,
    FGuid InUsageId
)

Public function Const

const TArray...

 

GetScripts()

Public function Virtual

FVersionedNi...

 

GetStandaloneScript()

If this is editing a standalone script, returns the script being edited.

Public function

TSharedRef< ...

 

GetVariableSelection()

Gets the currently selected script variables.

Protected function Const

bool

 

IsGraphDirty

(
    FGuid VersionGuid
)

Protected function Virtual

void

 

OnGPUScriptCompiled

(
    UNiagaraScript* InScript,
    const FGuid& ScriptVersion
)

Protected function Virtual

void

 

OnVMScriptCompiled

(
    UNiagaraScript* InScript,
    const FGuid& ScriptVersion
)

Public function

void

 

RefreshNodes()

Refreshes the nodes in the script graph, updating the pins to match external changes.

Public function

void

 

SetScript

(
    FVersionedNiagaraScript InScript
)

Sets the view model to a different script.

Public function

void

 

SetScripts

(
    UNiagaraEmitter* InEmitter
)

Public function

void

 

UpdateCompileStatus

(
    ENiagaraScriptCompileStatus InAggre...,
    const FString& InAggregateCompileE...,
    const TArray< ENiagaraScriptCompile...,
    const TArray< FString >& InCompile...,
    const TArray< FString >& InCompile...,
    const TArray< UNiagaraScript* ...
)

Updates the script with the latest compile status.

Overridden from FEditorUndoClient

Name Description

Public function Virtual

void

 

PostRedo

(
    bool bSuccess
)

Signal that client should run any PostRedo code

Public function Virtual

void

 

PostUndo

(
    bool bSuccess
)

Signal that client should run any PostUndo code

Overridden from INiagaraParameterDefinitionsSubscriberViewModel

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