unreal.CustomizableObject

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

Bases: Object

Customizable Object

C++ Source:

  • Plugin: Mutable

  • Module: CustomizableObject

  • File: CustomizableObject.h

Editor Properties: (see get_editor_property/set_editor_property)

  • disable_table_materials_parent_check (bool): [Read-Write] Disabling the Table Materials parent material check will let the user use any material regardless of its parent when connecting a material from a table column to a material node. Warning! But it will not check if the table material channels connected to the Material node exist in the actual material used in the Instance, and will fail silently at runtime when setting the value of those channels if they don’t exist.

  • enable16_bit_bone_weights (bool): [Read-Only] TODO: Enable 16 bit weights

  • enable_alt_skin_weight_profiles (bool): [Read-Write]

  • enable_anim_bp_physics_assets_manipualtion (bool): [Read-Write]

  • enable_asset_user_data_merge (bool): [Read-Write] When this is enabled generated meshes will merge the AssetUserData from all of its constituent mesh parts

  • enable_clothing (bool): [Read-Write]

  • enable_mesh_cache (bool): [Read-Write] If true, reuse previously generated USkeletalMesh (if still valid and the the number of LOD have not changed) USkeletalMeshes are only reused between the same CO.

  • enable_mesh_streaming (bool): [Read-Write] If true, Mesh LODs will be streamed on demand. It requires streaming of SkeletalMeshes and Mutable.StreamMeshLODsEnabled to be enabled. Does not support Clothing, Morphs, and alternative SkinWeightProfiles yet.

  • enable_physics_asset_merge (bool): [Read-Write]

  • enable_real_time_morph_targets (bool): [Read-Write]

  • enable_use_ref_skeletal_mesh_as_placeholder (bool): [Read-Write] Use the SkeletalMesh of reference as a placeholder until the custom mesh is ready to use. Note: If disabled, a null mesh will be used to replace the discarded mesh due to ‘ReplaceDiscardedWithReferenceMesh’ being enabled.

  • lod_settings (MutableLODSettings): [Read-Write]

  • low_priority_textures (Array[Name]): [Read-Write] Textures marked as low priority will generate defaulted resident mips (if texture streaming is enabled). Generating defaulted resident mips greatly reduce initial generation times.

  • mesh_compile_type (MutableCompileMeshType): [Read-Write] Options when compiling this customizable object (see EMutableCompileMeshType declaration for info)

  • preserve_user_lo_ds_on_first_generation (bool): [Read-Write] Use the Instance MinLOD, and RequestedLODs in the descriptor when performing the initial generation (ignore LOD Management).

  • reference_skeletal_meshes (Array[SkeletalMesh]): [Read-Write] All the SkeletalMeshes generated for this CustomizableObject instances will use the Reference Skeletal Mesh properties for everything that Mutable doesn’t create or modify. This includes data like LOD distances, Physics properties, Bounding Volumes, Skeleton, etc.

    While a CustomizableObject instance is being created for the first time, and in some situation with lots of objects this may require some seconds, the Reference Skeletal Mesh is used for the actor. This works as a better solution than the alternative of not showing anything, although this can be disabled with the function “SetReplaceDiscardedWithReferenceMeshEnabled” (See the c++ section).

  • version_bridge (Object): [Read-Write] The optional VersionBridge asset, which must implement the ICustomizableObjectVersionBridgeInterface, will be used to decide which Mutable child CustomizableObjects and table rows must be included in a compilation/cook depending on its version struct/column by comparing it to the game-specific version system.

  • version_struct (InstancedStruct): [Read-Write] This optional struct is used to define which version this child CustomizableObject belongs to. It will be used during cook/compilation to decide whether this CO should be included or not in the final compiled CO. To be used, the root CO must have defined the VersionBridge property, which must implement the ICustomizableObjectVersionBridgeInterface

  • working_set (Array[CustomizableObject]): [Read-Write] Array of elements to use with compile option CompileType = WorkingSet

create_instance() CustomizableObjectInstance

Create a new instance of this object. The instance parameters will be initialized with the object default values.

Return type:

CustomizableObjectInstance

find_parameter(name) int32

Get the index of a parameter from its name. Return -1 if the parameter is not found.

Parameters:

name (str) –

Return type:

int32

get_bool_parameter_default_value(parameter_name) bool

Get the default value of a parameter of type Bool.

Parameters:

parameter_name (str) – The name of the Bool parameter to get the default value of.

Returns:

The default value of the provided parameter name.

Return type:

bool

get_color_parameter_default_value(parameter_name) LinearColor

Get the default value of a parameter of type Color.

Parameters:

parameter_name (str) – The name of the Color parameter to get the default value of.

Returns:

The default value of the provided parameter name.

Return type:

LinearColor

get_component_count() int32

Get the number of components this Customizable Object has.

Return type:

int32

get_float_parameter_default_value(parameter_name) float

Get the default value of a parameter of type Float.

Parameters:

parameter_name (str) – The name of the Float parameter to get the default value of.

Returns:

The default value of the provided parameter name.

Return type:

float

get_int_parameter_available_option(param_index, k) str

Gets the Name of the option at position K in the list of available options for the int parameter. Useful to enumerate the int parameter’s possible options (Ex: “Hat1”, “Hat2”, “Cap”, “Nothing”)

Parameters:
  • param_index (int32) –

  • k (int32) –

Return type:

str

get_int_parameter_default_value(parameter_name) int32

Get the default value of a parameter of type Int.

Parameters:

parameter_name (str) – The name of the Int parameter to get the default value of.

Returns:

The default value of the provided parameter name.

Return type:

int32

get_int_parameter_num_options(param_index) int32

Returns how many possible options an int parameter has, if the parameter is an enumeration. Otherwise return 0.

Parameters:

param_index (int32) –

Return type:

int32

get_parameter_count() int32

Get the number of parameters available in instances of this object.

Return type:

int32

get_parameter_description_count(param_name) int32

Deprecated. It will always return 0. deprecated: Parameter decorations have been removed. This method will be removed in future versions.

Parameters:

param_name (str) –

Return type:

int32

get_parameter_name(param_index) str

Get the name of a parameter from its index.

Parameters:

param_index (int32) –

Return type:

str

get_parameter_type(param_index) MutableParameterType

Get the type of a parameter from its index.

Parameters:

param_index (int32) –

Return type:

MutableParameterType

get_parameter_type_by_name(name) MutableParameterType

Get the type of a parameter from its name.

Parameters:

name (str) –

Return type:

MutableParameterType

get_parameter_ui_metadata(param_name) ParameterUIData

Return the metadata associated to an object parameter by parameter name.

Parameters:

param_name (str) –

Return type:

ParameterUIData

get_parameter_ui_metadata_from_index(param_index) ParameterUIData

Return the metadata associated to an object parameter by parameter index (from 0 to GetParameterCount-1).

Parameters:

param_index (int32) –

Return type:

ParameterUIData

get_projector_parameter_default_value(parameter_name) -> (out_pos=Vector3f, out_direction=Vector3f, out_up=Vector3f, out_scale=Vector3f, out_angle=float, out_type=CustomizableObjectProjectorType)

Get the default value of a parameter of type Projector.

Parameters:

parameter_name (str) – The name of the Projector parameter to get the default value of.

Returns:

out_pos (Vector3f): The default position of the Projector.

out_direction (Vector3f): The default projection direction of the Projector.

out_up (Vector3f): The default up vector of the Projector.

out_scale (Vector3f): The default scale of the Projector.

out_angle (float): The default angle of the Projector.

out_type (CustomizableObjectProjectorType): The default type of the Projector.

Return type:

tuple

get_state_count() int32

Return the number of object states that are defined in the CustomizableObject.

Return type:

int32

get_state_name(state_index) str

Return the name of an object state from its index.

Parameters:

state_index (int32) –

Return type:

str

get_state_parameter_count(state_name) int32

Return the number of parameters that are editable at runtime for a specific state.

Parameters:

state_name (str) –

Return type:

int32

get_state_parameter_name(state_name, parameter_index) str

Return the name of one of the state’s runtime parameters, by its index (from 0 to GetStateParameterCount-1).

Parameters:
  • state_name (str) –

  • parameter_index (int32) –

Return type:

str

get_state_ui_metadata(state_name) ParameterUIData

Return the metadata associated to an object state by name.

Parameters:

state_name (str) –

Return type:

ParameterUIData

get_state_ui_metadata_from_index(state_index) ParameterUIData

Return the metadata associated to an object state by state index.

Parameters:

state_index (int32) –

Return type:

ParameterUIData

is_compiled() bool

Check if the CustomizableObject asset has been compiled. This will always be true in a packaged game, but it could be false in the editor.

Return type:

bool

is_parameter_multidimensional(parameter_name) bool

Return true if the parameter at the index provided is multidimensional.

Parameters:

parameter_name (str) – The name of the parameter to check.

Returns:

True if the parameter is multidimensional and false if it is not.

Return type:

bool