unreal.MetaHumanMassRepresentationSubsystem

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

Bases: MassRepresentationSubsystem

Subsystem responsible for all visual of MetaHuman Mass agents.

Extends the engine MassRepresentationSubsystem (which now has native ISKM support) with MetaHuman-specific functionality: MHI registry, appearance management, etc.

C++ Source:

  • Plugin: MetaHumanCrowd

  • Module: MetaHumanCrowd

  • File: MetaHumanMassRepresentationSubsystem.h

get_instance_for_handle(handle) MetaHumanInstance

Returns the UMetaHumanInstance associated with Handle, or nullptr if Handle is invalid.

Parameters:

handle (MetaHumanCrowdAppearanceHandle)

Return type:

MetaHumanInstance

is_valid_appearance_handle(handle) bool

True if Handle currently refers to a registered, non-released appearance entry.

Parameters:

handle (MetaHumanCrowdAppearanceHandle)

Return type:

bool

register_instance(instance) MetaHumanCrowdAppearanceHandle

Register a UMetaHumanInstance with the appearance registry.

If the MHI hasn’t been assembled yet, it will be assembled synchronously.

Repeated calls with the same MHI return the same handle.

Parameters:

instance (MetaHumanInstance)

Return type:

MetaHumanCrowdAppearanceHandle

try_get_appearance_handle_for_instance(instance) MetaHumanCrowdAppearanceHandle

Look up the appearance handle for an already-registered MetaHuman Instance.

Returns an invalid handle if the MHI is not currently registered with the subsystem, or if the registered entry has been marked for release.

Parameters:

instance (MetaHumanInstance)

Return type:

MetaHumanCrowdAppearanceHandle

unregister_instance(handle) None

Mark a handle obtained from RegisterInstance as no longer needed.

If no entities are currently using this appearance the underlying registration is released immediately, otherwise release is deferred until the last entity carrying this appearance is destroyed.

After this call the handle is no longer guaranteed to be valid.

Parameters:

handle (MetaHumanCrowdAppearanceHandle)