unreal.MetaHumanCharacterInstance¶
- class unreal.MetaHumanCharacterInstance(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ObjectUsed 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 CollectionMust 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(quality, on_assembled) None¶
Runs the associated Character Pipeline’s assembly function to populate the AssemblyOutput.
Fails gracefully if no MetaHuman Collection is set.
- Parameters:
quality (MetaHumanCharacterPaletteBuildQuality)
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:
- get_instance_parameters(item_path) Array[MetaHumanCharacterInstanceParameter]¶
brief: Gets the list of all instance parameters for a given item
- Parameters:
item_path (MetaHumanPaletteItemPath)
- Return type:
- 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:
- get_slot_selection_data() Array[MetaHumanPipelineSlotSelectionData]¶
Get Slot Selection Data
- Return type:
- property on_instance_updated: MetaHumanCharacterInstanceUpdated¶
[Read-Write]
- 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)
- set_single_slot_selection(slot_name, item_key) None¶
Remove any existing selections for this slot and select only the given item.
If ItemKey is NAME_None, no item will be selected for this slot.
- Parameters:
slot_name (Name)
item_key (MetaHumanPaletteItemKey)
- try_add_slot_selection(selection) bool¶
Adds the provided slot selection if valid, e.g. won’t allow duplicate selections or multiple selections for slots that don’t allow it
- Parameters:
selection (MetaHumanPipelineSlotSelection)
- Return type: