unreal.VirtualProductionRolesSubsystem

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

Bases: EngineSubsystem

Subsystem for common Virtual Production roles operations. The machine role(s) in a virtual production context read from the command line. ie. “-VPRole=[Role.SubRole1|Role.SubRole2]”

C++ Source:

  • Plugin: VPRoles

  • Module: VPRoles

  • File: VPRolesSubsystem.h

Editor Properties: (see get_editor_property/set_editor_property)

  • on_roles_changed (OnRolesChanged): [Read-Write] Delegate called when the roles are modified, ie. role is added, current roles are replaced, etc.

add_role(role_name) bool

Add a new virtual production role. note: This will attempt to modify the underlying VProles.ini file so it must be checked out or made writable or the operation will fail.

Parameters:

role_name (str) – the name of the role to add.

Returns:

Whether the operation succeeded.

Return type:

bool

get_active_roles() Array[str]

Get the currently active Virtual Production roles.

Returns:

The names of the current virtual production roles.

Return type:

Array[str]

get_active_roles_string() str
Returns:

the currently active Virtual Production roles as a comma separated string representation.

Return type:

str

get_all_roles() Array[str]

Get all available roles that can be set as current.

Returns:

The available roles.

Return type:

Array[str]

has_active_role(role) bool
Parameters:

role (str) –

Returns:

Whether a role is currently active.

Return type:

bool

property on_roles_changed: OnRolesChanged

[Read-Write] Delegate called when the roles are modified, ie. role is added, current roles are replaced, etc.

Type:

(OnRolesChanged)

remove_role(role_name) bool

Remove a virtual production role. note: This will attempt to modify the underlying VProles.ini file so it must be checked out or made writable or the operation will fail.

Parameters:

role_name (str) – the name of the role to remove.

Returns:

Whether the operation succeeded.

Return type:

bool

set_active_roles(roles) None

Set the current Virtual Production roles. note: The roles must already have been added either through the UI or through AddRole. note: This will clear the previous current roles.

Parameters:

roles (Array[str]) – the list of roles to set as active.