unreal.DMMaterialSlot¶
- class unreal.DMMaterialSlot(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
DMMaterialComponentA 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:
- add_layer(material_property, new_base) DMMaterialLayerObject¶
Adds the default layer (with specified base) based on the given material property.
- Parameters:
material_property (DMMaterialPropertyType)
new_base (DMMaterialStage)
- Return type:
- add_layer_with_mask(material_property, new_base, new_mask) DMMaterialLayerObject¶
Adds a new layer with the specified base and mask layers.
- Parameters:
material_property (DMMaterialPropertyType)
new_base (DMMaterialStage)
new_mask (DMMaterialStage)
- Return type:
- bp_get_layers() Array[DMMaterialLayerObject]¶
BP Get Layers
- Return type:
- can_remove_layer(layer) bool¶
Can’t be removed if it is the last remaining layer.
- Parameters:
layer (DMMaterialLayerObject)
- Return type:
- change_material_property(property_from, property_to) bool¶
Changes the material property of all matching layers to another.
- Parameters:
property_from (DMMaterialPropertyType)
property_to (DMMaterialPropertyType)
- Return type:
- find_layer(base_or_mask) DMMaterialLayerObject¶
Find Layer
- Parameters:
base_or_mask (DMMaterialStage)
- Return type:
- get_all_output_connector_types() Set[DMValueType]¶
Returns all possible output connector types.
- Return type:
- 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:
- get_layer(layer_index) DMMaterialLayerObject¶
Get Layer
- Parameters:
layer_index (int32)
- Return type:
- get_material_model_editor_only_data() DynamicMaterialModelEditorOnlyData¶
Get Material Model Editor Only Data
- Return type:
- 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:
- k2_get_slots_referenced_by() Array[DMMaterialSlot]¶
Returns an array of the slots referencing this slot.
- Return type:
- move_layer(layer, new_index) bool¶
Move Layer
- Parameters:
layer (DMMaterialLayerObject)
new_index (int32)
- Return type:
- move_layer_after(layer, after_layer=None) bool¶
Move Layer After
- Parameters:
layer (DMMaterialLayerObject)
after_layer (DMMaterialLayerObject)
- Return type:
- move_layer_before(layer, before_layer=None) bool¶
Move Layer Before
- Parameters:
layer (DMMaterialLayerObject)
before_layer (DMMaterialLayerObject)
- Return type:
- remove_layer(layer) bool¶
Removes the layer, if possible.
- Parameters:
layer (DMMaterialLayerObject)
- Return type:
- 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:
layer (DMMaterialLayerObject)
property_from (DMMaterialPropertyType)
property_to (DMMaterialPropertyType)
- Return type: