unreal.NiagaraSimCache

class unreal.NiagaraSimCache(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: Object

Niagara Sim Cache

C++ Source:

  • Plugin: Niagara

  • Module: Niagara

  • File: NiagaraSimCache.h

Editor Properties: (see get_editor_property/set_editor_property)

  • duration_seconds (float): [Read-Only] Duration Seconds

  • soft_niagara_system (NiagaraSystem): [Read-Only] Soft Niagara System

  • start_seconds (float): [Read-Only] Start Seconds

get_attribute_capture_mode() NiagaraSimCacheAttributeCaptureMode

How were the attributes captured for this sim cache.

Return type:

NiagaraSimCacheAttributeCaptureMode

get_emitter_name(emitter_index) Name

Get the emitter name at the provided index.

Parameters:

emitter_index (int32) –

Return type:

Name

get_emitter_names() Array[Name]

Returns a list of emitters we have captured in the SimCache.

Return type:

Array[Name]

get_num_emitters() int32

Get number of emitters stored inside the cache.

Return type:

int32

get_num_frames() int32

Get number of frames stored in the cache.

Return type:

int32

get_start_seconds() float

Get the time the simulation was at when recorded.

Return type:

float

is_cache_valid() bool

A valid cache is one that contains at least 1 frames worth of data.

Return type:

bool

is_empty() bool

An empty cache contains no frame data and can not be used

Return type:

bool

read_color_attribute(attribute_name='Color', emitter_name='None', frame_index=0) Array[LinearColor]

Reads Niagara Color attributes by name from the cache frame and appends them into the OutValues array. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[LinearColor]):

Return type:

Array[LinearColor]

read_float_attribute(attribute_name, emitter_name, frame_index=0) Array[float]

Reads Niagara float attributes by name from the cache frame and appends them into the OutValues array. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[float]):

Return type:

Array[float]

read_int_attribute(attribute_name, emitter_name, frame_index=0) Array[int32]

Reads Niagara int attributes by name from the cache frame and appends them into the OutValues array. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[int32]):

Return type:

Array[int32]

read_position_attribute(attribute_name='Position', emitter_name='None', local_space_to_world=True, frame_index=0) Array[Vector]

Reads Niagara Position attributes by name from the cache frame and appends them into the OutValues array. Local space emitters provide data at local locations unless bLocalSpaceToWorld is true. EmitterName - If left blank will return the system simulation attributes. LocalSpaceToWorld - Caches are always stored in the emitters space, i.e. local or world space. You can set this to false if you want the local position rather than the world position.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • local_space_to_world (bool) –

  • frame_index (int32) –

Returns:

out_values (Array[Vector]):

Return type:

Array[Vector]

read_position_attribute_with_rebase(transform, attribute_name='Position', emitter_name='None', frame_index=0) Array[Vector]

Reads Niagara Position attributes by name from the cache frame and appends them into the OutValues array. All attributes read with this method will be re-based from the captured space into the provided transform space, this will occur even if the cache was not captured with re-basing enabled. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • transform (Transform) –

  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[Vector]):

Return type:

Array[Vector]

read_quat_attribute(attribute_name='MeshOrientation', emitter_name='None', local_space_to_world=True, frame_index=0) Array[Quat]

Reads Niagara Quaternion attributes by name from the cache frame and appends them into the OutValues array. Local space emitters provide data at local rotation unless bLocalSpaceToWorld is true. EmitterName - If left blank will return the system simulation attributes. LocalSpaceToWorld - Caches are always stored in the emitters space, i.e. local or world space. You can set this to false if you want the local Quat rather than the world Quat.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • local_space_to_world (bool) –

  • frame_index (int32) –

Returns:

out_values (Array[Quat]):

Return type:

Array[Quat]

read_quat_attribute_with_rebase(quat, attribute_name='MeshOrientation', emitter_name='None', frame_index=0) Array[Quat]

Reads Niagara Quaternion attributes by name from the cache frame and appends them into the OutValues array. Only attributes that in the rebase list will be transform into the provided Quat space. Therefore the cache must be captured with rebasing enabled to have any impact. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • quat (Quat) –

  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[Quat]):

Return type:

Array[Quat]

read_vector2_attribute(attribute_name, emitter_name, frame_index=0) Array[Vector2D]

Reads Niagara Vec2 attributes by name from the cache frame and appends them into the OutValues array. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[Vector2D]):

Return type:

Array[Vector2D]

read_vector4_attribute(attribute_name, emitter_name, frame_index=0) Array[Vector4]

Reads Niagara Vec4 attributes by name from the cache frame and appends them into the OutValues array. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[Vector4]):

Return type:

Array[Vector4]

read_vector_attribute(attribute_name, emitter_name, frame_index=0) Array[Vector]

Reads Niagara Vec3 attributes by name from the cache frame and appends them into the OutValues array. EmitterName - If left blank will return the system simulation attributes.

Parameters:
  • attribute_name (Name) –

  • emitter_name (Name) –

  • frame_index (int32) –

Returns:

out_values (Array[Vector]):

Return type:

Array[Vector]