unreal.VariantSet

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

Bases: Object

Variant Set

C++ Source:

  • Plugin: VariantManagerContent

  • Module: VariantManagerContent

  • File: VariantSet.h

add_variant(variant) None

Adds Variant to the VariantSet’s list of Variants

Parameters:

variant (Variant) –

get_display_text() Text

Get Display Text

Return type:

Text

get_num_variants() int32

Get Num Variants

Return type:

int32

get_parent() LevelVariantSets

Get Parent

Return type:

LevelVariantSets

get_thumbnail() Texture2D

Gets the thumbnail currently used for this variant set

Return type:

Texture2D

get_variant(variant_index) Variant

Get Variant

Parameters:

variant_index (int32) –

Return type:

Variant

get_variant_by_name(variant_name) Variant

Get Variant by Name

Parameters:

variant_name (str) –

Return type:

Variant

remove_variant(variant) None

Removes Variant from VariantSet, if that is its parent

Parameters:

variant (Variant) –

remove_variant_by_name(variant_name) None

Looks for a variant with VariantName within VariantSet and removes it, if it exists

Parameters:

variant_name (str) –

set_display_text(new_display_text) None

Set Display Text

Parameters:

new_display_text (Text) –

set_thumbnail_from_camera(world_context_object, camera_transform, fov_degrees=50.000000, min_z=50.000000, gamma=2.200000) None

Set Thumbnail from Camera

Parameters:
set_thumbnail_from_editor_viewport() None

Sets the thumbnail from the active editor viewport. Doesn’t do anything if the Editor is not available

set_thumbnail_from_file(file_path) None

Set Thumbnail from File

Parameters:

file_path (str) –

set_thumbnail_from_texture(new_thumbnail) None

Sets the thumbnail to use for this variant set. Can receive nullptr to clear it

Parameters:

new_thumbnail (Texture2D) –