unreal.MetaHumanCharacterInstance

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

Bases: Object

Used to assemble a renderable character from a MetaHuman Collection.

Can be either an asset used in the editor or a transient object generated at runtime.

C++ Source:

  • Plugin: MetaHumanCharacter

  • Module: MetaHumanCharacterPalette

  • File: MetaHumanCharacterInstance.h

Editor Properties: (see get_editor_property/set_editor_property)

  • on_instance_updated (MetaHumanCharacterInstanceUpdated): [Read-Write]

  • override_pipeline_instance (MetaHumanCollectionPipeline): [Read-Write] If non-null, this overrides the runtime pipeline on the Collection

    Must be the same class as the Collection’s runtime pipeline, or a subclass of it

  • slot_selections (Array[MetaHumanPipelineSlotSelectionData]): [Read-Only] The selected items for slots on the Pipeline.

    Slots with no selection will select the default item for the slot.

    Some slots allow multiple selections. This is determined by the UMetaHumanCharacterPipelineSpecification.

    The order of items in this array has no significance. Consider it an unordered set.

assemble(on_assembled) None

Runs the associated Character Pipeline’s assembly function to populate the AssemblyOutput.

Fails gracefully if no MetaHuman Collection is set.

Parameters:

on_assembled (MetaHumanCharacterAssembled)

clear_assembly_output() None

Clear the result of the last assembly.

GetAssemblyOutput will return an empty struct after calling this.

Instance Parameters are not cleared by this function.

get_assembly_output() InstancedStruct

Fetch the result of the last assembly, if any

Return type:

InstancedStruct

get_meta_human_collection() MetaHumanCollection

Return the MetaHuman Collection that this instance will assemble from.

Returns nullptr if no collection has been set.

Return type:

MetaHumanCollection

property on_instance_updated: MetaHumanCharacterInstanceUpdated

[Read-Write]

Type:

(MetaHumanCharacterInstanceUpdated)

register_on_instance_updated(delegate) None

TODO: The OnInstanceUpdated interface is WIP and will change

Parameters:

delegate (MetaHumanCharacterInstanceUpdated_Unicast)

set_meta_human_collection(collection) None

Set the MetaHuman Collection that this instance will assemble from.

Call with nullptr to clear the existing Collection.

Parameters:

collection (MetaHumanCollection)

unregister_on_instance_updated(object) None

Unregister on Instance Updated

Parameters:

object (Object)