unreal.DMMaterialStage

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

Bases: DMMaterialComponent

A component which wraps a source and its inputs.

C++ Source:

  • Plugin: DynamicMaterial

  • Module: DynamicMaterialEditor

  • File: DMMaterialStage.h

Editor Properties: (see get_editor_property/set_editor_property)

  • can_change_source (bool): [Read-Only]

  • component_dirty (bool): [Read-Only]

  • component_state (DMComponentLifetimeState): [Read-Only]

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

  • enabled (bool): [Read-Only]

  • input_connection_map (Array[DMMaterialStageConnection]): [Read-Only] How our inputs connect to the inputs of this stage’s source

  • inputs (Array[DMMaterialStageInput]): [Read-Only]

  • source (DMMaterialStageSource): [Read-Only]

add_input(new_input) None

Add Input

Parameters:

new_input (DMMaterialStageInput)

can_change_source() bool

Can Change Source

Return type:

bool

change_input(input_class, input_idx, input_channel, output_idx, output_channel) DMMaterialStageInput

Change Input

Parameters:
  • input_class (type(Class))

  • input_idx (int32)

  • input_channel (int32)

  • output_idx (int32)

  • output_channel (int32)

Return type:

DMMaterialStageInput

change_input_previous_stage(input_idx, input_channel, previous_stage_property, output_idx, output_channel) DMMaterialStageSource

Changes the input of the given input index to the output of the previous stage with the given material property.

Parameters:
  • input_idx (int32)

  • input_channel (int32)

  • previous_stage_property (DMMaterialPropertyType)

  • output_idx (int32)

  • output_channel (int32)

Return type:

DMMaterialStageSource

change_source(source_class) DMMaterialStageSource

Change Source

Parameters:

source_class (type(Class))

Return type:

DMMaterialStageSource

classmethod create_material_stage(layer=None) DMMaterialStage

Create Material Stage

Parameters:

layer (DMMaterialLayerObject)

Return type:

DMMaterialStage

property enabled: bool

[Read-Only]

Type:

(bool)

find_index() int32

Returns the index of this stage in the layer.

Return type:

int32

generate_preview_material(preview_material) None

Generate Preview Material

Parameters:

preview_material (Material)

get_input_connection_map() Array[DMMaterialStageConnection]

Determines what connects to what on this stage’s Source.

Return type:

Array[DMMaterialStageConnection]

get_inputs() Array[DMMaterialStageInput]

Get Inputs

Return type:

Array[DMMaterialStageInput]

get_layer() DMMaterialLayerObject

Get Layer

Return type:

DMMaterialLayerObject

get_next_stage() DMMaterialStage

Get Next Stage

Return type:

DMMaterialStage

get_previous_stage() DMMaterialStage

Get Previous Stage

Return type:

DMMaterialStage

get_source() DMMaterialStageSource

Get Source

Return type:

DMMaterialStageSource

get_source_type(channel) DMValueType

Get Source Type

Parameters:

channel (DMMaterialStageConnectorChannel)

Return type:

DMValueType

property input_connection_map: None

[Read-Only] How our inputs connect to the inputs of this stage’s source

Type:

(Array[DMMaterialStageConnection])

property inputs: None

[Read-Only]

Type:

(Array[DMMaterialStageInput])

is_compatible_with_next_stage(next_stage) bool

see: IsCompatibleWithPreviousStage

Parameters:

next_stage (DMMaterialStage)

Return type:

bool

is_compatible_with_previous_stage(previous_stage) bool

Returns true if the output of the previous stage can connect to this stage. It is now up to the user to sort this particular problem out because it would do more harm than good to force correctness in “transition states” while the user is changing settings.

Parameters:

previous_stage (DMMaterialStage)

Return type:

bool

is_enabled() bool

Is Enabled

Return type:

bool

is_input_mapped(input_index) bool

Returns true if the given source’s input is mapped to an input (or the previous stage).

Parameters:

input_index (int32)

Return type:

bool

remove_all_inputs() None

Remove All Inputs

remove_input(input) None

Remove Input

Parameters:

input (DMMaterialStageInput)

remove_unused_inputs() None

Remove Unused Inputs

reset_input_connection_map() None

Verifies the entire input connection map.

set_can_change_source(can_change_source) None

Set Can Change Source

Parameters:

can_change_source (bool)

set_enabled(enabled) bool

Set Enabled

Parameters:

enabled (bool)

Return type:

bool

set_source(source) None

Set Source

Parameters:

source (DMMaterialStageSource)

property source: DMMaterialStageSource

[Read-Only]

Type:

(DMMaterialStageSource)

verify_all_input_maps() bool

Returns true if any changes were made

Return type:

bool

verify_input_map(input_idx) bool

Returns true if any changes were made

Parameters:

input_idx (int32)

Return type:

bool