unreal.DMMaterialValue

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

Bases: DMMaterialLinkedComponent

A value used in a material. Manages its own parameter.

C++ Source:

  • Plugin: DynamicMaterial

  • Module: DynamicMaterial

  • File: DMMaterialValue.h

Editor Properties: (see get_editor_property/set_editor_property)

  • cached_parameter_name (Name): [Read-Only]

  • component_dirty (bool): [Read-Only]

  • component_state (DMComponentLifetimeState): [Read-Only]

  • editable_properties (Array[Name]): [Read-Only]

  • expose_parameter (bool): [Read-Only]

  • local (bool): [Read-Only] True: The value is local to the stage it is used in. False: The value is a global value owned directly by the Model.

  • parameter (DMMaterialParameter): [Read-Only] The parameter name used to expose this value in a material. If it isn’t provided, an automatic name will be generated.

  • type (DMValueType): [Read-Only]

apply_default_value() None

Subclasses should implement a SetDefaultValue.

property cached_parameter_name: Name

[Read-Only]

Type:

(Name)

copy_parameters_from(other) None

Copies the parameter-based value of the given value to this value, if possible.

Parameters:

other (Object)

classmethod create_material_value(material_model, name, value_class, local) DMMaterialValue

Creates a new material value and initializes it with the given material model.

Parameters:
Return type:

DMMaterialValue

property expose_parameter: bool

[Read-Only]

Type:

(bool)

get_description() Text

Combination of parameter name and type name. May be an automatically generated parameter name.

Return type:

Text

get_material_model() DynamicMaterialModel

Returns the owning material model (this object’s Outer).

Return type:

DynamicMaterialModel

get_material_parameter_name() Name

Returns the specifically set parameter name or an automatically generated parameter name.

Return type:

Name

get_parameter() DMMaterialParameter

Returns the parameter component managed by this value. Will only exist if a parameter name has been set.

Return type:

DMMaterialParameter

get_should_expose_parameter() bool

Get Should Expose Parameter

Return type:

bool

get_type() DMValueType

Returns the type of value as respresented by the possible base type enums.

Return type:

DMValueType

get_type_name() Text

Uses the Value Definition Library to get the type name of the base enum type.

Return type:

Text

is_default_value() bool

Is Default Value

Return type:

bool

is_local() bool

Returns true is this value is not a “global” value belonging directly to the Model, but belongs to a specific component.

Return type:

bool

property local: bool

The value is local to the stage it is used in. False: The value is a global value owned directly by the Model.

Type:

(bool)

Type:

[Read-Only] True

property parameter: DMMaterialParameter

[Read-Only] The parameter name used to expose this value in a material. If it isn’t provided, an automatic name will be generated.

Type:

(DMMaterialParameter)

reset_default_value() None

Resets to the default default value. 0, nullptr, etc.

set_parameter_name(base_name) bool

Sets a specific parameter name, overriding the automatic one if a base name is provided, or resetting back to the original if a base name is not provider (NAME_None). When setting a specific name a parameter component is created and registered with the Model.

Parameters:

base_name (Name)

Return type:

bool

set_should_expose_parameter(expose) None

Set Should Expose Parameter

Parameters:

expose (bool)

property type: DMValueType

[Read-Only]

Type:

(DMValueType)