unreal.Variant
¶
- class unreal.Variant(outer=None, name='None')¶
Bases:
unreal.Object
C++ Source:
Plugin: VariantManagerContent
Module: VariantManagerContent
File: Variant.h
- add_actor_binding(actor) → None¶
Binds the Actor to the Variant, internally creating a VariantObjectBinding
- Parameters
actor (Actor) –
- add_dependency(dependency) -> (int32, dependency=VariantDependency)¶
Add Dependency
- Parameters
dependency (VariantDependency) –
- Returns
dependency (VariantDependency):
- Return type
- capture_property(actor, property_path) → PropertyValue¶
Finds the actor binding to Actor within Variant and tries capturing a property with PropertyPath Returns the captured UPropertyValue if succeeded or nullptr if it failed.
- Parameters
- Returns
- Return type
- get_captured_properties(actor)¶
Returns which properties have been captured for this actor in Variant
- Parameters
actor (Actor) –
- Returns
- Return type
- get_dependency(index) → VariantDependency¶
Get the dependency at index ‘Index’ by value. Will crash if index is invalid
- Parameters
index (int32) –
- Returns
- Return type
- get_dependents(level_variant_sets, only_enabled_dependencies)¶
Returns all the variants that have this variant as a dependency
- Parameters
level_variant_sets (LevelVariantSets) –
only_enabled_dependencies (bool) –
- Returns
- Return type
- get_num_actors() → int32¶
Get Num Actors
- Returns
- Return type
int32
- get_num_dependencies() → int32¶
Get Num Dependencies
- Returns
- Return type
int32
- get_parent() → VariantSet¶
Get Parent
- Returns
- Return type
- remove_actor_binding(actor) → None¶
Removes an actor binding to Actor from Variant, if it exists
- Parameters
actor (Actor) –
- remove_actor_binding_by_name(actor_name) → None¶
Looks for an actor binding to an actor with ActorLabel within Variant and removes it, if it exists
- Parameters
actor_name (str) –
- remove_captured_property(actor, property_) → None¶
Removes a property capture from an actor binding within Variant, if it exists
- Parameters
actor (Actor) –
property (PropertyValue) –
- remove_captured_property_by_name(actor, property_path) → None¶
Removes property capture with PropertyPath from Actor’s binding within Variant, if it exists
- set_dependency(index, dependency) → VariantDependency¶
Set Dependency
- Parameters
index (int32) –
dependency (VariantDependency) –
- Returns
dependency (VariantDependency):
- Return type
- set_thumbnail_from_camera(world_context_object, camera_transform, fov_degrees=50.0, min_z=50.0, gamma=2.2) → None¶
Set Thumbnail from Camera
- set_thumbnail_from_editor_viewport() → None¶
Sets the thumbnail from the active editor viewport. Doesn’t do anything if the Editor is not available