unreal.MetaSoundViewModel

class unreal.MetaSoundViewModel(outer: Object | None = None, name: Name | str = 'None')

Bases: MVVMViewModelBase

The base class for MetaSound viewmodels. Used for binding metadata and member inputs/outputs of a MetaSound to widgets in UMG. Can be initialized using a MetaSound Builder or a MetaSound asset. Creates member viewmodels for each input and output in the MetaSound upon initialization.

C++ Source:

  • Plugin: TechAudioTools

  • Module: TechAudioToolsMetaSound

  • File: MetaSoundViewModel.h

Editor Properties: (see get_editor_property/set_editor_property)

  • is_initialized (bool): [Read-Write] True if this MetaSound Viewmodel has been initialized.

  • is_preset (bool): [Read-Write] True if the initialized MetaSound is a preset.

find_input_view_model(input_view_model_name) MetaSoundInputViewModel

Returns the input viewmodel with the given name if it exists, else returns nullptr.

Parameters:

input_view_model_name (Name)

Return type:

MetaSoundInputViewModel

find_output_view_model(output_view_model_name) MetaSoundOutputViewModel

Returns the output viewmodel with the given name if it exists, else returns nullptr.

Parameters:

output_view_model_name (Name)

Return type:

MetaSoundOutputViewModel

get_builder_name() str

Returns the object name of the initialized builder.

Return type:

str

get_input_view_models() Array[MetaSoundInputViewModel]

Contains MetaSound Input Viewmodels for each input of the initialized MetaSound.

Return type:

Array[MetaSoundInputViewModel]

get_output_view_models() Array[MetaSoundOutputViewModel]

Contains MetaSound Output Viewmodels for each output of the initialized MetaSound.

Return type:

Array[MetaSoundOutputViewModel]

initialize(builder) None

Initializes the viewmodel using the given builder.

Parameters:

builder (MetaSoundBuilderBase)

initialize_meta_sound(meta_sound) None

Initializes the viewmodel using the given MetaSound asset.

Parameters:

meta_sound (MetaSoundDocumentInterface)

property is_initialized: bool

[Read-Only] True if this MetaSound Viewmodel has been initialized.

Type:

(bool)

property is_preset: bool

[Read-Only] True if the initialized MetaSound is a preset.

Type:

(bool)

reset() None

Resets this MetaSoundViewModel instance to an uninitialized state.