FNiagaraSystemViewModel

A view model for viewing and editing a [UNiagaraSystem](API\Plugins\Niagara\UNiagaraSystem).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NiagaraEditor

Header

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

Include

#include "ViewModels/NiagaraSystemViewModel.h"

Syntax

class FNiagaraSystemViewModel :
    public TSharedFromThis< FNiagaraSystemViewModel >,
    public FGCObject,
    public FEditorUndoClient,
    public FTickableEditorObject,
    public TNiagaraViewModelManager< UNiagaraSystem, FNiagaraSystemViewModel >

Remarks

A view model for viewing and editing a UNiagaraSystem.

Constructors

Name Description

Public function

FNiagaraSystemViewModel()

Creates a new view model with the supplied System and System instance.

Destructors

Name Description

Public function

~FNiagaraSystemViewModel()

Functions

Name Description

Public function

TSharedPtr< ...

 

AddEmitter

(
    UNiagaraEmitter& Emitter
)

Adds a new emitter to the System.

Public function

TSharedPtr< ...

 

AddEmitterFromAssetData

(
    const FAssetData& AssetData
)

Adds a new emitter to the System from an emitter asset data.

Public function

void

 

Cleanup()

Act as if the system has been fully destroyed although references might persist.

Public function

void

 

CompileSystem

(
    bool bForce
)

Compiles the spawn and update scripts.

Public function

void

 

DeleteEmitters

(
    TSet< FGuid > EmitterHandleIdsToDel...
)

Deletes the emitters with the supplied ids from the system

Public function

void

 

DumpToText

(
    FString& ExportText
)

Export the current state of the system to text.

Public function

void

 

DuplicateEmitters

Duplicates a set of emitters and refreshes everything.

Public function

void

 

FocusTab

(
    FName TabName
)

Public function Const

bool

 

GetCanModifyEmittersFromTimeline()

Gets whether or not emitters can be added from the timeline.

Public function

FNiagaraCurv...

 

GetCurveOwner()

Gets the curve owner for the System represented by this view model, for use with the curve editor widget.

Public function Const

FText

 

GetDisplayName()

Public function Const

ENiagaraSyst...

 

GetEditMode()

Gets the current editing mode for this system view model.

Public function Const

UNiagaraSyst...

 

GetEditorData()

Gets editor specific data which can be stored per system.

Public function

TSharedPtr< ...

 

GetEmitterHandleViewModelById

(
    FGuid InEmitterHandleId
)

Gets an emitter handle view model by ID. Returns an invalid shared ptr if it can't be found.

Public function Const

TSharedPtr< ...

 

GetEmitterHandleViewModelForEmitter

(
    UNiagaraEmitter* InEmitter
)

Gets an emitter handle view model for the given emitter.

Public function

const TArray...

 

GetEmitterHandleViewModels()

Gets an array of the view models for the emitter handles owned by this System.

Public function

bool

 

GetIsEmitterPinned

Checks whether or not an emitter is pinned in the stack UI

Public function Const

ENiagaraScri...

 

GetLatestCompileStatus()

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

Public function Const

FGuid

 

GetMessageLogGuid()

Public function

FOnPinnedCur...

 

GetOnPinnedCurvesChanged()

Returns a multicast delegate that is broadcast when pinned curves (shown in curve editor) state has changed

Public function

FOnPinnedEmi...

 

GetOnPinnedEmittersChanged()

Returns a multicast delegate that is broadcast when an emitter pinned state has changed

Public function Const

TSharedPtr< ...

 

GetOverviewGraphViewModel()

Gets the ViewModel for the system overview graph.

Public function

TArray< TSha...

 

GetPinnedEmitterHandles()

Keeps track of the emitters that are pinned in the stack UI, for persistence

Public function

UNiagaraComp...

 

GetPreviewComponent()

Gets a niagara component for previewing the simulated System.

Public function

UNiagaraScra...

 

GetScriptScratchPadViewModel()

Public function

UNiagaraSyst...

 

GetSelectionViewModel()

Gets the a view model representing the selected entries in the overview.

Public function

TSharedPtr< ...

 

GetSequencer()

Gets the sequencer for this System for displaying the timeline.

Public function

const TArray...

 

GetStackModuleData

(
    UNiagaraStackEntry* ModuleEntr...
)

Gets the stack module data for the provided module, for use in determining dependencies.

Public function Const

UNiagaraSyst...

 

GetSystem()

Get access to the underlying system

Public function

TSharedPtr< ...

 

GetSystemScriptViewModel()

Gets the view model for the System script.

Public function

UNiagaraStac...

 

GetSystemStackViewModel()

Gets the stack view model representing this system.

Public function

TSharedPtr< ...

 

GetToolkitCommands()

Gets the system toolkit command list.

Public function

void

 

Initialize

(
    UNiagaraSystem& InSystem,
    FNiagaraSystemViewModelOptions InOp...
)

Initializes this system view model with the supplied system and options.

Public function

void

 

IsolateEmitters

(
    TArray< FGuid > EmitterHandlesIdsTo...
)

Isolates the supplied emitters. This will remove all other emitters from isolation.

Public function

void

 

NotifyDataObjectChanged

(
    UObject* ChangedObject
)

Called to notify the system view model that one of the data objects in the system was modified.

Public function

void

 

NotifyPreClose()

Public function

void

 

NotifyPreSave()

Public function

FOnCurveOwne...

 

OnCurveOwnerChanged()

Gets a delegate which is called any time the data in the curve owner is changed internally by this view model.

Public function

FOnEmitterHa...

 

OnEmitterHandleViewModelsChanged()

Gets a multicast delegate which is called any time the array of emitter handle view models changes.

Public function

FOnPostSeque...

 

OnPostSequencerTimeChanged()

Gets a multicast delegate which is called whenever we've received and handled a sequencer time update.

Public function

FOnPreClose ...

 

OnPreClose()

Public function

FOnRequestFo...

 

OnRequestFocusTab()

Public function

FOnSystemCom...

 

OnSystemCompiled()

Gets a multicast delegate which is called whenever the system has been compiled.

Public function

void

 

RefreshAll()

Reinitializes all System instances, and rebuilds emitter handle view models and tracks.

Public function

void

 

RequestResetSystem()

Resets the System instance to initial conditions on the next tick.

Public function

void

 

ResetSystem()

Resets the System instance to initial conditions.

Public function

void

 

ResetSystem

(
    ETimeResetMode TimeResetMode,
    EMultiResetMode MultiResetMode,
    EReinitMode ReinitMode
)

Resets the system instance to initial conditions.

Public function

void

 

SetEmitterPinnedState

(
    TSharedRef< FNiagaraEmitterHandleVi...,
    bool bPinnedState
)

Sets an internal state when an emitter was pinned/unpinned in the stack UI

Public function

void

 

SetToolkitCommands

(
    const TSharedRef< FUICommandList > ...
)

Set the system toolkit command list.

Public function

void

 

ToggleEmitterIsolation

Toggles the isolation state of a single emitter.

Public function

void

 

UpdateEmitterFixedBounds()

Updates all selected emitter's fixed bounds with their current dynamic bounds.

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Pure virtual that must be overloaded by the inheriting class.

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 FTickableObjectBase

Name Description

Public function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable

Public function Virtual Const

bool

 

IsTickable()

Virtual that can be overloaded by the inheriting class.

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

~ FTickableEditorObject

Classes

Name

Description

Public struct

FEmitterHandleToDuplicate

Enums

Name

Description

Public enum

EMultiResetMode

Defines different multi-system reset modes for this system view model

Public enum

EReinitMode

Defines different initialization modes when resetting for this system view model

Public enum

ETimeResetMode

Defines different time reset modes for this system view model

Typedefs

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