unreal.CustomizableObjectPopulation
¶
- class unreal.CustomizableObjectPopulation(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
Customizable Object Population
C++ Source:
Plugin: Mutable
Module: CustomizableObjectPopulation
File: CustomizableObjectPopulation.h
Editor Properties: (see get_editor_property/set_editor_property)
class_weights
(Array[ClassWeightPair]): [Read-Write] List of Pupulation classes that define this population.name
(str): [Read-Write] Name of the customizable object population.
- generate_population(num_instances_to_generate=1) -> (int32, out_instances=Array[CustomizableObjectInstance])¶
Create a number of instances of the target population.
- Parameters:
num_instances_to_generate (int32) –
- Returns:
the seed that was used to create instances in this call of the GeneratePopulation. Returns -1 if there in an error with the population asset.
out_instances (Array[CustomizableObjectInstance]):
- Return type:
- regenerate_population(seed, num_instances_to_generate=1) Array[CustomizableObjectInstance] or None ¶
Update the instances in the array with new parameter values for the target population.
- Parameters:
seed (int32) –
num_instances_to_generate (int32) –
- Returns:
false if there was an error with the population asset.
out_instances (Array[CustomizableObjectInstance]):
- Return type:
Array[CustomizableObjectInstance] or None