unreal.DMMaterialSlot

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

Bases: DMMaterialComponent

A list of operations/inputs daisy chained together to produce an output.

C++ Source:

  • Plugin: DynamicMaterial

  • Module: DynamicMaterialEditor

  • File: DMMaterialSlot.h

Editor Properties: (see get_editor_property/set_editor_property)

  • component_dirty (bool): [Read-Only]

  • component_state (DMComponentLifetimeState): [Read-Only]

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

  • index (int32): [Read-Only]

  • layer_objects (Array[DMMaterialLayerObject]): [Read-Only]

  • output_connector_types (Map[DMMaterialPropertyType, DMMaterialSlotOutputConnectorTypes]): [Read-Only]

add_default_layer(material_property) DMMaterialLayerObject

Adds the default layer type for this slot based on the given material property.

Parameters:

material_property (DMMaterialPropertyType)

Return type:

DMMaterialLayerObject

add_layer(material_property, new_base) DMMaterialLayerObject

Adds the default layer (with specified base) based on the given material property.

Parameters:
Return type:

DMMaterialLayerObject

add_layer_with_mask(material_property, new_base, new_mask) DMMaterialLayerObject

Adds a new layer with the specified base and mask layers.

Parameters:
Return type:

DMMaterialLayerObject

bp_get_layers() Array[DMMaterialLayerObject]

BP Get Layers

Return type:

Array[DMMaterialLayerObject]

can_remove_layer(layer) bool

Can’t be removed if it is the last remaining layer.

Parameters:

layer (DMMaterialLayerObject)

Return type:

bool

change_material_property(property_from, property_to) bool

Changes the material property of all matching layers to another.

Parameters:
Return type:

bool

find_layer(base_or_mask) DMMaterialLayerObject

Find Layer

Parameters:

base_or_mask (DMMaterialStage)

Return type:

DMMaterialLayerObject

get_all_output_connector_types() Set[DMValueType]

Returns all possible output connector types.

Return type:

Set[DMValueType]

get_description() Text

Get Description

Return type:

Text

get_index() int32

Returns the index of this slot in the model.

Return type:

int32

get_last_layer_for_material_property(material_property) DMMaterialLayerObject

Useful for determining output types.

Parameters:

material_property (DMMaterialPropertyType)

Return type:

DMMaterialLayerObject

get_layer(layer_index) DMMaterialLayerObject

Get Layer

Parameters:

layer_index (int32)

Return type:

DMMaterialLayerObject

get_material_model_editor_only_data() DynamicMaterialModelEditorOnlyData

Get Material Model Editor Only Data

Return type:

DynamicMaterialModelEditorOnlyData

get_output_connector_types_for_material_property(material_property) Array[DMValueType]

Returns the output types for the last layer with the given material property.

Parameters:

material_property (DMMaterialPropertyType)

Return type:

Array[DMValueType]

property index: int

[Read-Only]

Type:

(int32)

k2_get_slots_referenced_by() Array[DMMaterialSlot]

Returns an array of the slots referencing this slot.

Return type:

Array[DMMaterialSlot]

property layer_objects: None

[Read-Only]

Type:

(Array[DMMaterialLayerObject])

move_layer(layer, new_index) bool

Move Layer

Parameters:
Return type:

bool

move_layer_after(layer, after_layer=None) bool

Move Layer After

Parameters:
Return type:

bool

move_layer_before(layer, before_layer=None) bool

Move Layer Before

Parameters:
Return type:

bool

property output_connector_types: None

[Read-Only]

Type:

(Map[DMMaterialPropertyType, DMMaterialSlotOutputConnectorTypes])

remove_layer(layer) bool

Removes the layer, if possible.

Parameters:

layer (DMMaterialLayerObject)

Return type:

bool

set_layer_material_property_and_replace_others(layer, property_from, property_to) bool

Sets the material property of the given layer and changes all other layers matching that property to a different one.

Parameters:
Return type:

bool