unreal.RigVMHost

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

Bases: Object

set this to something larger than 0 to profile N runs

C++ Source:

  • Plugin: RigVM

  • Module: RigVM

  • File: RigVMHost.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the asset

  • asset_user_data_editor_only (Array[AssetUserData]): [Read-Write] Array of user data stored with the asset

add_asset_user_data_of_class(user_data_class) bool

Creates and adds an instance of the provided AssetUserData class to the target asset.

Parameters:

user_data_class (type(Class)) – UAssetUserData sub class to create

Returns:

Whether or not an instance of InUserDataClass was succesfully added

Return type:

bool

can_execute() bool

Is valid for execution

Return type:

bool

execute(event_name) bool

Execute

Parameters:

event_name (Name) –

Return type:

bool

execute_event(event_name) bool

Execute a user defined event

Parameters:

event_name (Name) –

Return type:

bool

classmethod find_rig_vm_hosts(outer, optional_class) Array[RigVMHost]

Find Rig VMHosts

Parameters:
Return type:

Array[RigVMHost]

get_absolute_time() float

Gets the current absolute time

Return type:

float

get_asset_user_data_of_class(user_data_class) AssetUserData

Returns an instance of the provided AssetUserData class if it’s contained in the target asset.

Parameters:

user_data_class (type(Class)) – UAssetUserData sub class to get

Returns:

The instance of the UAssetUserData class contained, or null if it doesn’t exist

Return type:

AssetUserData

get_current_frames_per_second() float

Returns the current frames per second (this may change over time)

Return type:

float

get_delta_time() float

Gets the current delta time

Return type:

float

get_extended_execute_context() RigVMExtendedExecuteContext

Get Extended Execute Context deprecated: This function has been deprecated and it is no longer supported.

Return type:

RigVMExtendedExecuteContext

get_script_accessible_variables() Array[Name]

Returns the names of variables accessible in scripting

Return type:

Array[Name]

get_supported_events() Array[Name]

Get Supported Events

Return type:

Array[Name]

get_variable_as_string(variable_name) str

Returns the value of a given variable as a string

Parameters:

variable_name (Name) –

Return type:

str

get_variable_type(variable_name) Name

Returns the type of a given variable

Parameters:

variable_name (Name) –

Return type:

Name

get_vm() RigVM

Get VM

Return type:

RigVM

has_asset_user_data_of_class(user_data_class) bool

Checks whether or not an instance of the provided AssetUserData class is contained.

Parameters:

user_data_class (type(Class)) – UAssetUserData sub class to check for

Returns:

Whether or not an instance of InUserDataClass was found

Return type:

bool

is_init_required() bool

Returns true if this host requires the VM memory to be initialized

Return type:

bool

remove_run_once_event(event_name) bool

Removes an event running once

Parameters:

event_name (Name) –

Return type:

bool

request_init() None

Requests to perform an init during the next execution

request_run_once_event(event_name, event_index=-1) None

Requests to run an event once

Parameters:
  • event_name (Name) –

  • event_index (int32) –

set_absolute_and_delta_time(absolute_time, delta_time) None

Set the current absolute and delta times

Parameters:
  • absolute_time (float) –

  • delta_time (float) –

set_absolute_time(absolute_time, set_delta_time_zero=False) None

Set the current absolute time

Parameters:
  • absolute_time (float) –

  • set_delta_time_zero (bool) –

set_delta_time(delta_time) None

Set the current delta time

Parameters:

delta_time (float) –

set_frames_per_second(frames_per_second) None

Set the current fps

Parameters:

frames_per_second (float) –

set_variable_from_string(variable_name, value) bool

Returns the value of a given variable as a string

Parameters:
  • variable_name (Name) –

  • value (str) –

Return type:

bool

supports_event(event_name) bool

Supports Event

Parameters:

event_name (Name) –

Return type:

bool