Navigation
API > API/Plugins > API/Plugins/NiagaraEditor > API/Plugins/NiagaraEditor/ViewModels
Inheritance Hierarchy
- TSharedFromThis
- FGCObject
- FEditorUndoClient
- FTickableEditorObject
- TNiagaraViewModelManager
- INiagaraParameterDefinitionsSubscriberViewModel
- FNiagaraSystemViewModel
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 >,
public INiagaraParameterDefinitionsSubscriberViewModel
Remarks
A view model for viewing and editing a UNiagaraSystem.
Variables
| Type | Name | Description | |
|---|---|---|---|
| ENiagaraStatDisplayMode | StatDisplayMode | ||
| ENiagaraStatEvaluationType | StatEvaluationType |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Creates a new view model with the supplied System and System instance. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< FNiagaraEmitterHandleViewModel > | AddEmitter
(
UNiagaraEmitter& Emitter, |
Adds a new emitter to the System. | |
| TSharedPtr< FNiagaraEmitterHandleViewModel > | AddEmitter
(
const FVersionedNiagaraEmitter& Emitter |
Adds a new emitter to the System. | |
| TSharedPtr< FNiagaraEmitterHandleViewModel > | AddEmitterFromAssetData
(
const FAssetData& AssetData |
Adds a new emitter to the System from an emitter asset data. | |
| TSharedPtr< FNiagaraEmitterHandleViewModel > | Adds an empty emitter to the system. | ||
| FGuid | AddMessage
(
UNiagaraMessageData* NewMessage |
Add a serialized message to the Emitter/System this viewmodel is managing. | |
| FGuid | AddStackMessage
(
UNiagaraMessageData* NewMessage, |
Add a serialized message to the target function call node inside a script this viewmodel is managing. | |
| bool | ChangeEmitterVersion
(
const FVersionedNiagaraEmitter& Emitter, |
Changes the version of an existing emitter in the system | |
| void | Cleanup () |
Act as if the system has been fully destroyed although references might persist. | |
| void | Clear the captures stats for all the emitters in the current system. | ||
| void | CompileSystem
(
bool bForce |
Compiles the spawn and update scripts. | |
| void | DeleteEmitters
(
TSet< FGuid > EmitterHandleIdsToDelete |
Deletes the emitters with the supplied ids from the system | |
| void | DisableEmitters
(
TArray< FGuid > EmitterHandlesIdsToDisable |
Disable the supplied emitters. | |
| void | |||
| void | DismissMessageAndRefresh
(
FNiagaraMessageSourceAndStore MessageSourceAndStore, |
||
| void | DumpToText
(
FString& ExportText |
Export the current state of the system to text. | |
| void | DuplicateEmitters
(
TArray< FEmitterHandleToDuplicate > EmitterHandlesToDuplicate |
Duplicates a set of emitters and refreshes everything. | |
| void | |||
| TArray< UNiagaraGraph * > | GetAllGraphs () |
Utility method to gather all graphs. | |
| bool | Gets whether or not emitters can be added from the timeline. | ||
| UNiagaraCurveSelectionViewModel * | |||
| FText | |||
| UNiagaraSystemEditorDocumentsViewModel * | |||
| ENiagaraSystemViewModelEditMode | GetEditMode () |
Gets the current editing mode for this system view model. | |
| UNiagaraSystemEditorData & | Gets editor specific data which can be stored per system. | ||
| UNiagaraEditorParametersAdapter * | Helper to get the current System or Emitter's EditorParameters. | ||
| TSharedPtr< FNiagaraEmitterHandleViewModel > | GetEmitterHandleViewModelById
(
FGuid InEmitterHandleId |
Gets an emitter handle view model by ID. Returns an invalid shared ptr if it can't be found. | |
| TSharedPtr< FNiagaraEmitterHandleViewModel > | GetEmitterHandleViewModelForEmitter
(
const FVersionedNiagaraEmitter& InEmitter |
Gets an emitter handle view model for the given emitter. | |
| const TArray< TSharedRef< FNiagaraEmitterHandleViewModel > > & | Gets an array of the view models for the emitter handles owned by this System. | ||
| TArray< FNiagaraGraphParameterReference > | GetGraphParameterReferences
(
const FNiagaraVariable& Parameter, |
Utility method to gather graph parameter references | |
| bool | GetIsEmitterPinned
(
TSharedRef< FNiagaraEmitterHandleViewModel > EmitterHandleModel |
Checks whether or not an emitter is pinned in the stack UI | |
| bool | Gets whether or not this view model is for data processing only and will not be displayed in the UI. | ||
| ENiagaraScriptCompileStatus | Get the latest status of this view-model's script compilation. | ||
| FGuid | Get the Guid Key for messages associated with this asset. | ||
| FOnPinnedEmittersChanged & | Returns a multicast delegate that is broadcast when an emitter pinned state has changed | ||
| void | GetOrderedScriptsForEmitter
(
const FVersionedNiagaraEmitter& Emitter, |
Gets all non-event scripts which will execute for an emitter. | |
| void | GetOrderedScriptsForEmitterHandleId
(
FGuid EmitterHandleId, |
Get all non-event scripts which will execute for an emitter. | |
| TSharedPtr< FNiagaraOverviewGraphViewModel > | Gets the ViewModel for the system overview graph. | ||
| INiagaraParameterPanelViewModel * | |||
| TArray< TSharedRef< FNiagaraEmitterHandleViewModel > > | Keeps track of the emitters that are pinned in the stack UI, for persistence | ||
| TSharedRef< FNiagaraPlaceholderDataInterfaceManager > | |||
| UNiagaraComponent * | Gets a niagara component for previewing the simulated System. | ||
| UNiagaraSystemScalabilityViewModel * | |||
| UNiagaraScratchPadViewModel * | |||
| TArray< UNiagaraGraph * > | Utility method to gather all graphs marked as selected via the system selection viewmodel. | ||
| UNiagaraSystemSelectionViewModel * | Gets the a view model representing the selected entries in the overview. | ||
| TSharedPtr< ISequencer > | GetSequencer () |
Gets the sequencer for this System for displaying the timeline. | |
| const TArray< FNiagaraStackModuleData > & | GetStackModuleDataByEmitterHandleId
(
FGuid EmitterHandleId |
Gets the stack module data for the provided emitter handled id, for use in determining dependencies. | |
| const TArray< FNiagaraStackModuleData > & | GetStackModuleDataByModuleEntry
(
UNiagaraStackEntry* ModuleEntry |
Gets the stack module data for the provided module stack entry, for use in determining dependencies. | |
| UNiagaraSystem & | GetSystem () |
Get access to the underlying system | |
| const TSharedPtr< FNiagaraSystemGraphSelectionViewModel > & | |||
| void | GetSystemMessageStores
(
TArray< FNiagaraMessageSourceAndStore >& OutMessageStores |
||
| TSharedPtr< FNiagaraSystemScriptViewModel > | Gets the view model for the System script. | ||
| UNiagaraStackViewModel * | Gets the stack view model representing this system. | ||
| TSharedPtr< FUICommandList > | Gets the system toolkit command list. | ||
| TSharedPtr< FNiagaraUserParameterPanelViewModel > | |||
| UNiagaraUserParametersHierarchyViewModel * | |||
| FName | Gets the current workflow mode for this system view model. | ||
| void | Initialize
(
UNiagaraSystem& InSystem, |
Initializes this system view model with the supplied system and options. | |
| void | IsolateEmitters
(
TArray< FGuid > EmitterHandlesIdsToIsolate |
Isolates the supplied emitters. This will remove all other emitters from isolation. | |
| void | |||
| bool | IsValid () |
Returns whether or not this view model is initialized and safe to use. | |
| void | NotifyDataObjectChanged
(
TArray< UObject* > ChangedObjects, |
Called to notify the system view model that one of the data objects in the system was modified. | |
| void | NotifyObjectAssetChanged
(
UNiagaraNode& OwningNode, |
Called to notify the system view model that one of the object references in the system was modified. | |
| void | NotifyParameterRemovedExternally
(
const FNiagaraVariableBase& InVar, |
||
| void | NotifyParameterRenamedExternally
(
const FNiagaraVariableBase& InOldVar, |
||
| void | |||
| void | |||
| void | |||
| FOnChangeWorkflowMode & | Gets the delegate that is bound to the owning toolkit's SetCurrentMode function. | ||
| FOnEmitterHandleViewModelsChanged & | Gets a multicast delegate which is called any time the array of emitter handle view models changes. | ||
| TArray< float > | |||
| FOnGetWorkflowMode & | Gets the delegate which is called any time the array of emitter handle view models changes. | ||
| FOnExternalRemoveParameter & | |||
| FOnExternalRenameParameter & | |||
| FOnPostSequencerTimeChange & | Gets a multicast delegate which is called whenever we've received and handled a sequencer time update. | ||
| FOnPreClose & | OnPreClose () |
||
| FSimpleMulticastDelegate & | OnPreSave () |
||
| FOnRequestFocusTab & | |||
| FOnSystemCompiled & | Gets a multicast delegate which is called whenever the system has been compiled. | ||
| void | RefreshAll () |
Reinitializes all System instances, and rebuilds emitter handle view models and tracks. | |
| void | |||
| void | RemoveMessage
(
const FGuid& MessageKey |
Remove a serialized message from the Emitter/System this viewmodel is managing. | |
| void | RemoveStackMessage
(
const FGuid& MessageKey, |
Remove a serialized message from the target function call node inside a script this viewmodel is managing. | |
| bool | RenameParameter
(
const FNiagaraVariable TargetParameter, |
Rename a parameter within the RenameScope and update associated tracking metadata such as Parameter Definition synchronization. | |
| void | Resets the System instance to initial conditions on the next tick. | ||
| void | ResetStack () |
||
| void | ResetSystem () |
Resets the System instance to initial conditions. | |
| void | ResetSystem
(
ETimeResetMode TimeResetMode, |
Resets the system instance to initial conditions. | |
| void | SetEmitterPinnedState
(
TSharedRef< FNiagaraEmitterHandleViewModel > EmitterHandleModel, |
Sets an internal state when an emitter was pinned/unpinned in the stack UI | |
| void | |||
| void | SetToolkitCommands
(
const TSharedRef< FUICommandList >& InToolkitCommands |
Set the system toolkit command list. | |
| void | SetWorkflowMode
(
FName WorkflowMode |
||
| void | ToggleEmitterIsolation
(
TSharedRef< FNiagaraEmitterHandleViewModel > InEmitterHandle |
Toggles the isolation state of a single emitter. | |
| void | ToggleIsolateEmitterAndSelectedEmitters
(
FGuid OriginEmitter |
This is specifically for UI with some unique behavior. | |
| void | Updates all selected emitter's fixed bounds with their current dynamic bounds. | ||
| void | Updates the current system's fixed bounds with its current dynamic bounds. |
Overridden from FGCObject
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
Pure virtual that must be overloaded by the inheriting class. | |
| FString | Overload this method to report a name for your referencer |
Overridden from FEditorUndoClient
| Type | Name | Description | |
|---|---|---|---|
| void | PostRedo
(
bool bSuccess |
Signal that client should run any PostRedo code | |
| void | PostUndo
(
bool bSuccess |
Signal that client should run any PostUndo code |
Overridden from FTickableObjectBase
| Type | Name | Description | |
|---|---|---|---|
| TStatId | GetStatId () |
Return the stat id to use for this tickable | |
| bool | IsTickable () |
Virtual that can be overloaded by the inheriting class. | |
| void | Tick
(
float DeltaTime |
~ FTickableEditorObject |
Overridden from INiagaraParameterDefinitionsSubscriberViewModel
| Type | Name | Description | |
|---|---|---|---|
| INiagaraParameterDefinitionsSubscriber * |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FEmitterHandleToDuplicate |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EMultiResetMode | Defines different multi-system reset modes for this system view model | ||
| EReinitMode | Defines different initialization modes when resetting for this system view model | ||
| ETimeResetMode | Defines different time reset modes for this system view model |