unreal.MetaHumanCharacterPalette

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

Bases: Object

Base class for objects that can contain items targeting a Character Pipeline.

C++ Source:

  • Plugin: MetaHumanCharacter

  • Module: MetaHumanCharacterPalette

  • File: MetaHumanCharacterPalette.h

get_all_item_keys() Array[MetaHumanPaletteItemKey]

Returns the keys of every item in the palette.

Return type:

Array[MetaHumanPaletteItemKey]

get_item_display_name(item_key) Text

Returns the display name for an item, or empty text if the key is not found.

Parameters:

item_key (MetaHumanPaletteItemKey)

Return type:

Text

get_item_keys_for_principal_asset(principal_asset) Array[MetaHumanPaletteItemKey]

Returns the keys of items in the palette whose principal asset is the given asset.

Multiple results are possible if the palette contains multiple Variations of the same asset.

Parameters:

principal_asset (Object)

Return type:

Array[MetaHumanPaletteItemKey]

get_item_keys_for_slot(slot_name) Array[MetaHumanPaletteItemKey]

Returns the keys of items targeting the given virtual slot.

The slot name is resolved through the pipeline so callers can safely pass virtual slot names (the same names returned by GetSlotNames).

Parameters:

slot_name (Name)

Return type:

Array[MetaHumanPaletteItemKey]

get_item_keys_for_wardrobe_item(wardrobe_item) Array[MetaHumanPaletteItemKey]

Returns the keys of items in the palette that reference the given external wardrobe item.

Parameters:

wardrobe_item (MetaHumanWardrobeItem)

Return type:

Array[MetaHumanPaletteItemKey]

get_item_slot_name(item_key) Name

Returns the slot name an item is authored against, or NAME_None if the key is not found.

Parameters:

item_key (MetaHumanPaletteItemKey)

Return type:

Name

get_pipeline_specification() MetaHumanCharacterPipelineSpecification

Returns the pipeline specification for the palette’s pipeline. May be null if no pipeline is set or the pipeline doesn’t expose a specification.

Return type:

MetaHumanCharacterPipelineSpecification

get_slot_names() Array[Name]

Returns the virtual slot names defined by the palette’s pipeline.

Slot selections on a MetaHuman Instance should target virtual slots; real (backing) slots are an implementation detail of the pipeline.

Return type:

Array[Name]

try_add_item_from_wardrobe_item(slot_name, wardrobe_item) MetaHumanPaletteItemKey or None

Adds a Wardrobe Item to the palette.

The Wardrobe Item must be a self-contained asset, rather than an internal Wardrobe Item from another palette.

Parameters:
Returns:

out_new_item_key (MetaHumanPaletteItemKey):

Return type:

MetaHumanPaletteItemKey or None