Skip to content

Material

97 tools. Back to the index.

add_collection_scalar_param

Destructive.

Add a scalar parameter (new GUID) to a Material Parameter Collection asset and save it; an existing scalar of that name only gets its default overwritten (already_existed=true). Returns scalar_count_before, scalar_count, default_value and id. For a color use add_collection_vector_param.

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Name of the new scalar parameter
default_value number no Default float value; default 0. An existing scalar of that name gets this value too, even when it is omitted

Returns: { collection_path: string, param_name: string, param_type: string, param_added: bool, already_existed: bool, scalar_count_before: int, scalar_count: int, default_value: number, id: string, saved: bool }

add_collection_vector_param

Additive.

Append a vector RGBA parameter to a Material Parameter Collection

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Name of the new vector parameter
default_value string no Optional [r, g, b, a] default color, default [0,0,0,1]

Returns: { collection_path: string, param_name: string, param_type: string, param_added: bool, already_existed: bool, vector_count_before: int, vector_count: int, default: object, default_rgba: [number], id: string, saved: bool }

add_material_attribute_layers_node

Additive.

Adds a new MaterialAttributeLayers expression to a UMaterial asset, turns on bUseMaterialAttributes (the separate pins such as Base Color stop driving the material), wires the node into MaterialAttributes, recompiles and saves. Not idempotent: each call adds another node. Fails when the save fails; returns connected_material_attributes and num_expressions.

Parameter Type Required Description
material_path string yes Object path to the UMaterial, e.g. /Game/MyGame/M_Example
node_name string no Label echoed back in the reply only; it does not name or find any node in the graph

Returns: { material_path: string, expression_added: bool, expression_class: string, connected_material_attributes: bool, use_material_attributes: bool, num_expressions: int, recompiled: bool, saved: bool, node_name: string, save_error: string }

add_material_function_call

Additive.

Insert a call to a UMaterialFunction into a UMaterial graph: a MaterialFunctionCall node bound to the function, so the function's inputs and outputs become the node's pins. Refused, with the node removed again, when the function cannot be called from this material.

Parameter Type Required Description
material_path string yes Full asset path of the UMaterial (e.g. '/Game/MyGame/M_Example')
function_path string yes Full asset path of the UMaterialFunction to call (e.g. '/Game/Functions/MF_Foo.MF_Foo')
node_name string no Optional name for the new node; a name another object of the material already has gets a unique variant

Returns: { material_path: string, function_path: string, node_name: string, node_class: string, expression_count: number }

add_material_function_input

Additive.

Add a FunctionInput node (a new input pin) to a UMaterialFunction asset with the optional props applied, then recompile the function and mark it dirty without saving. Returns node_id, the handle for set_material_function_input_props and delete_material_function_input, plus num_inputs and added.

Parameter Type Required Description
function_path string yes Full path to the material function, e.g. '/Game/MyGame/MF_Example.MF_Example'
input_name string yes Name of the new input pin, stored as given: a name another input already uses is not made unique.
input_type string no One of the 13 EFunctionInputType values: Scalar|Vector2|Vector3|Vector4|Texture2D|TextureCube|Texture2DArray|VolumeTexture|StaticBool|MaterialAttributes|TextureExternal|Bool|Substrate (optional, default "Scalar")
description string no Optional tooltip/description string for the input pin
preview_value object no JSON object {"x":0,"y":0,"z":0,"w":0} (FVector4f), any subset; missing components keep their current value. Used for previews, and as the default with use_preview_value_as_default.
use_preview_value_as_default boolean no Optional bool; if true, the preview value becomes the input's default
sort_priority number no Optional int controlling the input's display order relative to other inputs

Returns: { function_path: string, input_name: string, input_type: string, node_id: string, num_inputs: number, added: bool }

add_material_function_output

Additive.

Add a UMaterialExpressionFunctionOutput node to a material function. '/Game/MyGame/MF_Example.MF_Example'

Parameter Type Required Description
function_path string yes Full path to the material function, e.g.
output_name string yes Name of the new output pin

Returns: { function_path: string, output_name: string, node_id: string, num_outputs: number, added: bool }

clear_collection_params

Destructive, idempotent.

Clear all parameters of a given type from a Material Parameter Collection

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_type string no scalar, vector, or all, default all

Returns: { collection_path: string, param_type: string, scalar_count_before: int, vector_count_before: int, scalar_count: int, vector_count: int, cleared: bool, saved: bool }

clear_material_parameter_overrides

Destructive, idempotent.

Clear all parameter overrides on a Material Instance Constant. Resets all scalar, vector, and texture parameter values to their defaults (inherited from the parent material).

Parameter Type Required Description
material_instance_path string yes Content path to the MIC

Returns: { material_instance_path: string, cleared: bool }

clear_mpci_parameter_overrides

Destructive, idempotent.

Reset the Material Parameter Collection Instance (MPCI: the transient per-world values of a collection asset) of one collection on a world, the editor world by default, to the collection's default values by dropping all its scalar and vector overrides. Runtime only: nothing is saved, no undo. The engine creates the instance on lookup when the world has none, so a missing instance is not an error. scalars_reset_to_default and vectors_reset_to_default count parameters now reading their default. For a Material Instance Constant asset use clear_material_parameter_overrides.

Parameter Type Required Description
collection_path string yes Full /Game path of the parent MPC
world_label string no Empty or "editor" for the editor world (the default); otherwise the UWorld name of a live world context, compared case-insensitively (first match)

Returns: { collection_path: string, world_name: string, scalar_count: int, vector_count: int, scalars_reset_to_default: int, vectors_reset_to_default: int, cleared: bool }

compile_material

Destructive.

Recompile a UMaterial asset through UMaterialEditingLibrary::RecompileMaterial: refreshes its child material instances and the viewports and marks the package dirty, without saving. recompiled is always true and does not report shader errors. Material functions use recompile_material_function.

Parameter Type Required Description
material_path string yes UMaterial asset path, e.g. "/Game/Materials/M_Rock"; a material instance or function path fails with Material not found.

Returns: { material: string, recompiled: bool }

connect_material_expressions

Destructive.

Wire one material node's output pin into another node's input pin -- the call that turns loose expressions into a working graph, and the only headless route to some pins. Input names go WITHOUT spaces (BaseColor and AmbientOcclusion work, "Base Color" does not), and MakeMaterialAttributes accepts named pins the graph walker reports as unnamed, including Displacement. A true return only means the pin NAME resolved: confirm the connection landed by re-reading get_material_expressions / get_material_graph_info, then compile and check get_material_stats.

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
from_expression_name string yes Name of the source material expression
from_output_name string yes Name of the output pin on the source expression
to_expression_name string yes Name of the destination material expression
to_input_name string yes Name of the input pin on the destination expression

Returns: { material_path: string, from_expression_name: string, from_output_name: string, to_expression_name: string, to_input_name: string, success: bool }

connect_material_function_pins

Destructive.

Wire two material expression nodes inside a UMaterialFunction graph by name.

Parameter Type Required Description
material_function_path string yes Asset path of the UMaterialFunction
from_node_id string yes Name of the source expression
to_node_id string yes Name of the destination expression
from_pin string no Optional source output pin name (default: first available)
to_input string no Optional destination FExpressionInput name (e.g. "A"); if omitted, picks the first empty input

Returns: { material_function_path: string, from_node_id: string, to_node_id: string, from_pin: string, to_input: string, connected: bool, saved: bool }

connect_substrate_slab_to_material

Destructive.

Connect the Slab BSDF output to the material's Front Material input. GATED by Substrate: when Substrate is disabled this returns a clear error ("Substrate disabled: cannot connect slab to Front Material...") because the Front Material input is only meaningful with Substrate enabled. When enabled, connects via ConnectMaterialProperty(MP_FrontMaterial) and recompiles.

Parameter Type Required Description
material_path string yes Content path to the UMaterial holding the slab node

Returns: { material_path: string, slab_node_id: string, connected_to: string, connected: bool, substrate_enabled: bool, r_substrate_cvar: int, note?: string } | (error: "Substrate disabled: ...")

connect_to_material_output

Destructive.

Wire one output of an expression node into a main input of a UMaterial asset (BaseColor, Roughness, Normal...). The edit stays in memory: no recompile, no dirty flag, no save, so follow with compile_material and save_asset. Node-to-node wiring is connect_material_expressions.

Parameter Type Required Description
material_path string yes UMaterial asset path, e.g. "/Game/Materials/M_Rock"; a material instance path fails with Material not found.
from_node_id string yes Id of the source expression (from create_material_expression / get_material_expressions).
output_property string yes Material input to feed, case-insensitive: BaseColor, Metallic, Specular, Roughness, Anisotropy, Normal, Tangent, EmissiveColor (or Emissive), Opacity, OpacityMask, WorldPositionOffset (WPO), AmbientOcclusion (AO), Refraction, PixelDepthOffset, SubsurfaceColor.
from_pin string no Output pin name on the source node, e.g. "RGB" or "R"; omitted or empty uses its first output.

Returns: { material: string, from_node_id: string, output_property: string, connected: bool }

copy_material_instance_params

Additive.

Bulk-copy every scalar, vector and texture OVERRIDE from one material instance to another -- the way to clone a calibration onto a sibling instance instead of re-setting parameters one by one. Copies overrides only, so anything the source inherited untouched is not carried, and STATIC SWITCHES are not copied at all (set those with set_material_instance_static_switch). Read the copied counts in the reply and verify with get_material_all_parameters; diff_material_instances shows what still differs.

Parameter Type Required Description
source_path string yes Content path of the source UMaterialInstanceConstant.
destination_path string yes Content path of the destination UMaterialInstanceConstant.

Returns: { source_path: string, destination_path: string, scalars_copied: int, vectors_copied: int, textures_copied: int }

copy_mid_params_from_source

Destructive.

Copy parameter values from a source material or material instance into a transient Material Instance Dynamic (MID), found by object path or name as create_material_instance_dynamic returns it. The MID's current overrides are cleared first, then every non-static parameter the MID exposes takes the source's value where the source has that parameter; static switches are not copied. Takes effect at once, nothing saved, no undo. Refused, with the MID untouched, when the source is the MID itself or has none of its parameters. copied is measured: every copyable parameter read back on the MID with the source's value. For saved Material Instance Constant assets use copy_material_instance_params.

Parameter Type Required Description
mid_object_path string yes Object path of the MID
source_material_path string yes Content path to the source material to copy from

Returns: { mid_object_path, source_material_path, source_material_name, params_in_source, params_copied, params_not_in_source, mismatched_params, copied }

create_dynamic_material_on_actor

Additive.

Create a component-owned Material Instance Dynamic on a scene actor

Parameter Type Required Description
actor_name string yes Name or label of the actor in the editor world
element_index number no Material slot index on the mesh component (default 0)
parent_material_path string no Optional source material for the MID (default slot's current material)

Returns: { actor_name, actor_label, component_name, element_index, mid_object_path, mid_name, parent_material_path, verified, created }

create_material

Additive.

Create a new base material asset (UMaterial) -- the graph-owning master whose parameters and static switches every instance of it inherits. Prefer create_material_instance / create_material_instance_constant when you only need a re-skin of something that exists: an instance costs no new shader permutations and leaves the original updatable. After creating, build the graph with create_material_expression + connect_material_expressions, then verify with get_material_stats (compile_errors empty and stats_valid true) -- compile_material only acknowledges, it does not report errors, and a landscape material that fails to compile silently falls back to the default material.

Parameter Type Required Description
material_path string yes Content FOLDER the material is created in (e.g., '/Game/Materials')
material_name string yes Name of the material asset to create

Returns: { material_path: string (object path of the new material, '/Game/Materials/M_X.M_X'), material_name: string, package_path: string, success: bool } -- an existing asset of that name is an error, never overwritten

create_material_expression

Additive.

Add ONE node to a material graph, by expression class path (e.g. /Script/Engine.MaterialExpressionConstant, ...TextureSample, ...ScalarParameter), at a graph position. The building block of headless material authoring: create the nodes, then wire them with connect_material_expressions and connect_to_material_output. The node arrives UNCONNECTED, so nothing renders differently until it is wired -- verify with get_material_expressions and get_material_stats, not with the success flag.

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
expression_class_name string yes Material expression class name (e.g., '/Script/Engine.MaterialExpressionConstant')
node_pos_x number no Optional graph editor X position; defaults to 0
node_pos_y number no Optional graph editor Y position; defaults to 0

Returns: { material_path: string, expression_class_name: string, expression_name: string, node_pos_x: int, node_pos_y: int, success: bool }

create_material_function

Additive, idempotent.

Create a UMaterialFunction asset at package_path/name through the editor factory, exposed to the function library, and save it. Idempotent: an existing function is returned untouched with already_exists=true; another asset class at that path is an error. Returns function_path, num_inputs, num_outputs and saved.

Parameter Type Required Description
package_path string yes /Game package directory, e.g. '/Game/MyGame'
name string yes Asset name for the new material function
description string no Text stored as the function Description, the tooltip shown wherever the function is used; default empty. Ignored when the function already exists.

Returns: { function_path: string, name: string, package_path: string, description: string, num_inputs: number, num_outputs: number, created: bool, saved: bool, already_exists: bool? }

create_material_function_expression

Additive.

Create a new UMaterialExpression node inside a UMaterialFunction's internal graph (same shape as create_material_expression, scoped to a function instead of a material). Use connect_material_function_pins to wire it and recompile_material_function to recompile.

Parameter Type Required Description
material_function_path string yes Asset path of the UMaterialFunction
expression_class_name string yes Class name of the UMaterialExpression to create, e.g. 'MaterialExpressionMultiply' or a full path like '/Script/Engine.MaterialExpressionPower'
node_pos_x number no Optional X position in the function's graph editor (default 0)
node_pos_y number no Optional Y position in the function's graph editor (default 0)

Returns: { material_function_path: string, expression_class_name: string, expression_name: string, node_pos_x: number, node_pos_y: number, success: bool }

create_material_function_instance

Additive.

Create a UMaterialFunctionInstance (asset, with parent set) and save it.

Parameter Type Required Description
package_path string yes Target /Game package path (auto-prefixed with /Game/ if missing)
instance_name string yes Name for the new UMaterialFunctionInstance asset
parent_function_path string yes Asset path of the parent UMaterialFunctionInterface

Returns: { asset_path: string, instance_name: string, parent_function_path: string, created: bool, already_existed: bool, saved: bool }

create_material_instance

Additive, idempotent.

Create a material instance (MIC) from a parent material -- the cheap, non-destructive way to re-skin a vendor or engine material: the parent stays untouched and updatable while only your overrides are stored, and no new shader is compiled. Idempotent (already_exists=true when it is already there). Same operation as create_material_instance_constant, which takes a single full asset path instead of separate folder and name. Tune it with set_material_instance_param_override, and remember static switches inherit from the parent and are set separately.

Parameter Type Required Description
instance_path string yes Package path for the material instance (e.g., '/Game/Materials/MyInstance')
instance_name string yes Name of the material instance to create
parent_material_path string yes Full path to the parent material (e.g., '/Game/Materials/MyMaterial.MyMaterial')

Returns: { instance_path: string, instance_name: string, parent_material?: string, parent_material_path: string, parent_material_name: string, success: bool, already_exists?: bool, saved: bool, save_error?: string }

create_material_instance_constant

Additive, idempotent.

Create a material instance (MIC) asset under a /Game path, optionally parented to a base material on creation. The right way to re-skin a vendor or engine material: the instance is yours, the parent stays untouched and updatable, and only the parameters you override are stored. Idempotent -- an existing asset comes back with already_existed=true. Same operation as create_material_instance, which addresses the target by folder plus name instead of a full path.

Parameter Type Required Description
name string yes Name of the new material instance asset.
package_path string no Target content folder; defaults to /Game/MCP.
parent_material_path string no Optional content path of a UMaterialInterface to set as Parent (InitialParent on the factory).

Returns: { material_instance_path: string, material_instance_name: string, parent_material_path: string, created: bool, already_existed: bool, saved: bool, save_error?: string }

create_material_instance_dynamic

Additive.

Create a runtime-only Material Instance Dynamic (MID) from a parent material

Parameter Type Required Description
parent_material_path string yes Content path to the parent material (e.g. /Game/MyGame/M_Example.M_Example)
name string no Optional name for the MID (default auto-generated)

Returns: { mid_object_path, mid_name, parent_material_path, parent_material_name, created }

create_material_layer

Additive, idempotent.

Creates a UMaterialFunctionMaterialLayer asset (usage MaterialLayer, exposed to the library) at package_path/name and saves it, like the editor factory. Idempotent: any material function already at that path is returned as is, whatever its class. Success even when the save fails: read saved and save_error.

Parameter Type Required Description
package_path string yes Content folder starting with a slash, e.g. /Game/MyGame; a trailing slash is ignored
name string yes Asset name for the new material layer function

Returns: { asset_path: string, name: string, class: string, usage: string, created: bool, already_existed: bool, saved: bool, save_error: string }

create_material_layer_blend

Additive, idempotent.

Creates a UMaterialFunctionMaterialLayerBlend asset (usage MaterialLayerBlend, exposed to the library) at package_path/name and saves it, like the editor factory. Idempotent: any material function already at that path is returned as is, whatever its class. Success even when the save fails: read saved and save_error.

Parameter Type Required Description
package_path string yes Content folder starting with a slash, e.g. /Game/MyGame; a trailing slash is ignored
name string yes Asset name for the new material layer blend function

Returns: { asset_path: string, name: string, class: string, usage: string, created: bool, already_existed: bool, saved: bool, save_error: string }

create_material_parameter_collection

Additive, idempotent.

Create a UMaterialParameterCollection asset at package_path/name and save it to disk. Idempotent: an existing collection there is returned with created=false and already_exists=true, while another asset type at that path is an error. Returns collection_path, scalar_count, vector_count and saved.

Parameter Type Required Description
name string yes Asset name without a path, e.g. "MPC_Global"
package_path string no Content folder for the asset, e.g. "/Game/MaterialCollections" (the default)

Returns: { name: string, package_path: string, collection_path: string, asset_path: string, collection_class: string, scalar_count: int, vector_count: int, created: bool, already_exists: bool, success: bool, saved: bool, message: string }

create_material_parameter_collection_instance

Destructive.

Give a world (the editor world by default) a fresh Material Parameter Collection Instance (MPCI: the transient per-world values of a collection asset) for collection_path, replacing the instance it had, so all its overrides are lost and values return to the collection defaults. Runtime only: nothing saved, no undo. The engine creates an instance on lookup, so already_existed comes back true and created false in practice. Rarely needed: set_mpci_scalar_parameter_value and set_mpci_vector_parameter_value create the instance themselves; get_mpci_info reads it.

Parameter Type Required Description
collection_path string yes Full /Game path of the parent MPC
world_label string no Empty or "editor" for the editor world (the default); otherwise the UWorld name of a live world context, compared case-insensitively (first match)

Returns: { collection_path: string, world_name: string, is_valid: bool, already_existed: bool, created: bool }

create_material_variant

Additive.

Create a material instance from a base material AND apply a dict of parameter overrides in the same call -- one shot for "same material, different colour/roughness/switch", instead of create_material_instance followed by N set calls. The overrides dict accepts scalars, vector objects and static switch booleans. Addresses the base by NAME rather than path, so resolve an ambiguous name first; check applied_overrides_count against what you sent, and re-read with get_material_all_parameters, since a name that does not exist on the parent is simply not applied.

Parameter Type Required Description
material_name string yes Name of the base material asset
variant_name string yes Name for the new variant (must not be empty and cannot contain spaces, dots, or slashes)
parameter_overrides object no Optional dict {param_name: scalar_number | vector_object | static_switch_bool} applied to the variant

Returns: { material_name: string, variant_name: string, variant_path: string, variant_asset_name: string, variant_class: string, parent_material: string, success: bool, variant_saved: bool, applied_overrides_count: int, applied_overrides: [{name, type}], message: string, material_class: string, material_category: string, material_tooltip: string, material_display_name: string, parameters_count: int, scalar_parameters_count: int, vector_parameters_count: int, texture_parameters_count: int, static_switch_parameters_count: int, material_is_two_sided: bool, material_is_masked: bool, material_is_translucent: bool, material_is_opaque: bool, blend_mode: string }

create_post_process_material

Additive.

Create a UMaterial configured as a post-process material (MD_PostProcess).

Parameter Type Required Description
package_path string yes /Game package directory, e.g. '/Game/MyGame'
name string yes Asset name for the new material

Returns: { material_path: string, name: string, package_path: string, domain: string, blendable_location: number, is_post_process: bool, created: bool, already_exists: bool, saved: bool }

create_substrate_slab_node

Additive, idempotent.

Add a Substrate Slab BSDF node to a UMaterial asset. Performs a real CreateMaterialExpression on the material graph and saves the package. Idempotent: reuses an existing slab node on re-run. Node creation succeeds even when Substrate is disabled (substrate_enabled=false), but the material will not compile/render until Substrate is enabled and the editor restarts.

Parameter Type Required Description
material_path string yes Content path to the UMaterial (e.g. /Game/MyGame/M_Example)
node_pos_x number no Optional graph editor X position; defaults to -400
node_pos_y number no Optional graph editor Y position; defaults to 0

Returns: { material_path: string, material_name: string, node_id: string, node_class: string, created: bool, already_existed: bool, substrate_enabled: bool, r_substrate_cvar: int, note?: string }

create_subsurface_profile

Additive, idempotent.

Create a USubsurfaceProfile data asset (NewObject + save). Idempotent: if the asset already exists it is loaded and returned.

Parameter Type Required Description
name string yes Asset name (e.g. SSP_Example)
package_path string no Target /Game package path (optional, default "/Game/Gameplay")

Returns: { name: string, asset_path: string, asset_class: string, mean_free_path_distance: number, is_subsurface_profile: bool, already_existed: bool, created: bool }

delete_material_expression

Destructive.

Delete ONE node from a material graph by name. Deliberately one at a time, and that is the safe way to empty a graph: the engine's bulk delete_all_material_expressions can leave half the nodes behind with no error, and a rebuild on top then produces duplicate parameter names that no parameter listing reveals (duplicates collapse by name). Loop this instead, re-reading get_material_expressions until the count reaches 0. The underlying engine call also returns false while having done the work, so count the nodes rather than trusting the flag.

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
expression_name string yes Name of the material expression to delete

Returns: { material_path: string, expression_name: string, success: bool }

delete_material_function

Destructive.

Force-delete the asset at material_function_path with UEditorAssetLibrary::DeleteAsset: no reference check and no class check (any asset there goes), open editors close and undo history may be cleared. Permanent. Returns deleted; success stays true when deleted is false, so read it.

Parameter Type Required Description
material_function_path string yes Asset path of the UMaterialFunction to delete

Returns: { material_function_path: string, deleted: bool }

delete_material_function_input

Destructive, idempotent.

Delete a UMaterialExpressionFunctionInput node from a material function (inverse of add_material_function_input). Located by node_id via the function's own expression list. Idempotent: an already-absent node_id returns { deleted:false, already_absent:true } as success, not an error.

Parameter Type Required Description
function_path string yes Full path to the material function, e.g. '/Game/MyGame/MF_Example.MF_Example'
node_id string yes The input node id (UMaterialExpression name) from add_material_function_input

Returns: { function_path: string, node_id: string, deleted: bool, already_absent: bool, num_inputs: number, num_outputs: number }

delete_material_function_output

Destructive, idempotent.

Delete a UMaterialExpressionFunctionOutput node from a material function (inverse of add_material_function_output). Located by node_id via the function's own expression list. Idempotent: an already-absent node_id returns { deleted:false, already_absent:true } as success, not an error.

Parameter Type Required Description
function_path string yes Full path to the material function, e.g. '/Game/MyGame/MF_Example.MF_Example'
node_id string yes The output node id (UMaterialExpression name) from add_material_function_output

Returns: { function_path: string, node_id: string, deleted: bool, already_absent: bool, num_inputs: number, num_outputs: number }

detect_substrate_enabled

Read-only.

Report whether Substrate (Strata) materials are enabled in this editor. Always works. Returns substrate_enabled (from Substrate::IsSubstrateEnabled), the r.Substrate cvar value, and a note when disabled. Enabling Substrate requires editing config and restarting the editor.

No parameters.

Returns: { substrate_enabled: bool, r_substrate_cvar: int, note?: string, detected: bool }

diff_material_instances

Read-only.

Diff two Material Instance Constants: what side B overrides differ from side A (parent + scalar/vector/texture/static-switch overrides + material layer stack). Answers "what did this fork change vs its parent (or the original)". Read-only; nothing is saved. Editor-only.

Parameter Type Required Description
material_instance_path_a string yes Content path to the first (baseline) UMaterialInstanceConstant.
material_instance_path_b string yes Content path to the second (fork) UMaterialInstanceConstant.

Returns: { material_instance_path_a: string, material_instance_path_b: string, parent: {a, b, same}, scalars: {changed: [{name, association?, layer_index?, value_a, value_b}], only_in_a: [{name, value}], only_in_b: [{name, value}], changed_count, only_in_a_count, only_in_b_count}, vectors: {changed: [{name, value_a:{r,g,b,a}, value_b:{r,g,b,a}}], only_in_a, only_in_b, ...counts}, textures: {changed: [{name, value_a, value_b}], only_in_a, only_in_b, ...counts}, static_switches: {changed: [{name, value_a, value_b}], only_in_a, only_in_b, ...counts}, layer_stack: {layer_count_a, layer_count_b, blend_count_a, blend_count_b, layer_diffs: [{index, function_a, function_b}], blend_diffs: [{index, function_a, function_b}]}, total_differences: int, identical: bool }

disconnect_material_expressions

Destructive, idempotent.

Disconnect an input of a material expression (inverse of connect_material_expressions). Idempotent: an input that is already disconnected returns already_disconnected=true (still success — the expression exists, there simply was no connection to break).

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
to_expression_name string yes Name of the destination material expression whose input is disconnected
to_input_name string yes Name of the input pin to disconnect (empty = first input)

Returns: { material_path: string, to_expression_name: string, to_input_name: string, disconnected: bool, already_disconnected: bool, success: bool }

disconnect_to_material_output

Destructive, idempotent.

Disconnect a material output property (inverse of connect_to_material_output). Idempotent: an already-disconnected property returns already_disconnected=true (still success — the output slot always resolves to a valid input, so false is unambiguously "nothing was connected", never an error).

Parameter Type Required Description
material_path string yes Material asset path.
output_property string yes BaseColor, Metallic, Roughness, Normal, Emissive, Opacity, OpacityMask, Specular, ... (same strings as connect_to_material_output)

Returns: { material: string, output_property: string, disconnected: bool, already_disconnected: bool }

duplicate_material_expression

Additive.

Copy one expression node of a UMaterial asset into the same material, optionally renamed, then recompile the material and mark it dirty without saving. The copy keeps the source position and settings (a parameter keeps its name) and its output is unwired. Returns duplicate_node and expression_count.

Parameter Type Required Description
material_path string yes Full asset path of the UMaterial.
node_id string yes Object name of the expression to copy, as listed by get_material_expressions.
new_node_name string no Object name for the copy; when taken, a unique variant is used (read duplicate_node). Default: a name the engine picks.

Returns: { material_path: string, source_node: string, duplicate_node: string, duplicate_class: string, expression_count: number }

duplicate_mpc

Additive.

Duplicate a Material Parameter Collection asset, parameters included with their names, Ids and defaults, to package_path/new_name and save the copy. Refuses when the target already exists. Returns collection_path, scalar_count, vector_count, saved and save_error.

Parameter Type Required Description
source_path string yes Source MPC path, e.g. "/Game/MPC/MPC_A" or the object path "/Game/MPC/MPC_A.MPC_A"
new_name string yes Asset name of the copy, e.g. "MPC_B"; must not be empty
package_path string no Target folder; default is the folder of source_path when it is an object path with a dot ("/Game/MPC/MPC_A.MPC_A"), else "/Game/MaterialCollections"

Returns: { source_path: string, collection_path: string, asset_path: string, name: string, package_path: string, scalar_count: int, vector_count: int, duplicated: bool, saved: bool, save_error: string }

get_collection_info

Read-only.

Read every parameter of a Material Parameter Collection asset: scalar_params (name, default, id), vector_params (name, id, default object and default_rgba), scalar_count, vector_count and total_count. Read-only; get_collection_param_info reads one parameter, get_mpci_info the live per-world values.

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset

Returns: { collection_path: string, collection_name: string, collection_class: string, scalar_params: [object], vector_params: [object], scalar_count: int, vector_count: int, total_count: int }

get_collection_param_info

Read-only.

Read one parameter of a Material Parameter Collection asset: id, index in its array and default (default_value for a scalar, an RGBA default object for a vector). Read-only; it searches only the array param_type selects and errors when the name is not there.

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Name of the parameter to query
param_type string no Which array to search: "scalar" or "vector", any case; omitted or anything else means scalar

Returns: { collection_path: string, param_name: string, param_type: string, id: string, default_value: number, default: object, index: int, collection_class: string }

get_material_all_parameters

Read-only.

What can I tune on this material without recompiling it: EVERY scalar, vector and texture parameter the material or its parent exposes, each with its effective value, layer association and layer index. This is the contract, and the one to prefer over get_material_instance_params, which only shows the subset an instance already overrode and so makes untouched parameters look unavailable. Works on a base material or an instance. Covers scalar/vector/texture ONLY -- static switches are a separate list (get_material_static_switch_parameters) and they are what decide whether whole shader branches run at all.

Parameter Type Required Description
material_instance_path string yes Content path to the material (UMaterialInterface)
parameter_type string no Optional filter: "scalar", "vector", or "texture" (omit for all).

Returns: { material_instance_path: string, parameters: [{name, type, association, layer_index, value?}], parameter_count: int }

get_material_default_parameter

Read-only.

Read the RESOLVED default value of a named parameter on the base UMaterial graph, with an honest found flag. Pairs with set_material_node_param (ParameterName + DefaultValue) which is a writer-without-reader. The engine getters return a default (0 / black / null / false) BOTH when the parameter holds that value AND when it does not exist; this command uses the bool-returning UMaterial::Get*ParameterDefaultValue family to distinguish them, returning found=false (NOT a masquerading default) when the parameter is absent.

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
param_name string yes Name of the parameter to resolve (the ScalarParameter/VectorParameter/etc. ParameterName)
param_type string yes Parameter type to read: 'scalar' | 'vector' | 'texture' | 'static_switch'

Returns: { material_path: string, param_name: string, param_type: string, found: bool, value?: (float | {r,g,b,a} | string texture_path | bool), success: bool }

get_material_expressions

Read-only.

List every node in a material's graph with its name, class and description -- the census that tells you what a material is built from, and the count oracle when deleting nodes one by one (delete until it reaches 0). Also the way to spot the duplicate parameter nodes a partial bulk-delete leaves behind, which no parameter listing shows because duplicates collapse by name. Nodes only: for the WIRING between them use get_material_graph_info, and note this works on a UMaterial, not a UMaterialFunction (the Python equivalent throws on one).

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')

Returns: { material_path: string, material_name: string, expressions: [{ name, class, class_path, description }], expression_count: int, success: bool }

get_material_function_graph

Read-only.

Enumerate a UMaterialFunction's internal expression graph: every UMaterialExpression node plus the FExpressionInput connections between them (same shape as get_material_graph_info, scoped to a function instead of a material).

Parameter Type Required Description
material_function_path string yes Asset path of the UMaterialFunction

Returns: { material_function_path: string, node_count: number, nodes: [{name, class, inputs:[{index, input_name, source, source_output_index}], input_count}], connection_count: number, connections: [{from, from_output_index, to, to_input}] }

get_material_function_inputs

Read-only.

List the FunctionInput and FunctionOutput nodes of a UMaterialFunction asset: node_id, name, type, description, sort priority and preview value for inputs; name, description and sort priority for outputs. Read-only. Function instances are not accepted; for the whole node graph use get_material_function_graph.

Parameter Type Required Description
material_function_path string yes Asset path of the UMaterialFunction or material layer, e.g. "/Game/Materials/MF_Blend".

Returns: { material_function_path: string, input_count: number, output_count: number, inputs: [{ node_id: string, input_name: string, input_type: string, description: string, sort_priority: number, use_preview_value: bool, preview_value: {x,y,z,w} }], outputs: [{ node_id: string, output_name: string, description: string, sort_priority: number }] }

get_material_graph_info

Read-only.

Read the full expression graph of a UMaterial (nodes + connections). Enumerates UMaterial::GetExpressions() and walks each expression's FExpressionInput Inputs[] array. For every connected input, the connection is also flattened into the top-level connections[] list for easy graph-walking.

Parameter Type Required Description
material_path string yes Full asset path of the UMaterial.

Returns: { material_path: string, node_count: number, nodes: [{ name: string, class: string, inputs: [{ index: number, input_name: string, source?: string, source_output_index?: number }], input_count: number }], connection_count: number, connections: [{ from: string, from_output_index: number, to: string, to_input: string }] }

get_material_instance_base_overrides

Read-only.

Read a material instance's base property overrides: blend mode, two-sided, shading model and opacity mask clip value, each with its own bOverride_ flag. These are the surface-level settings that decide whether something renders opaque, masked or translucent, and they are separate from parameters -- so a material that looks wrong despite correct parameters is often a blend-mode override. The flag matters as much as the value: an override that is false means the parent's setting wins whatever value is stored. set_material_instance_base_overrides writes them.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.

Returns: { material_instance_path: string, override_blend_mode: bool, blend_mode: string, override_two_sided: bool, two_sided: bool, override_shading_model: bool, shading_model: string, override_opacity_mask_clip_value: bool, opacity_mask_clip_value: float }

get_material_instance_param_overridden

Read-only.

Is this parameter set on the INSTANCE, or just inherited from the parent? Returns the override flag for one named parameter -- the discriminator that a plain value read cannot give you, since an inherited value and a locally-set identical value read the same. Use it to confirm a write actually landed on the child (and, in a read-only vendor material, to prove you edited your instance and not the library asset). Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
parameter_name string yes Name of the parameter to query.
association string no Optional EMaterialParameterAssociation: "Global" (default), "Layer", or "Blend".

Returns: { material_instance_path: string, parameter_name: string, association: string, overridden: bool }

get_material_instance_params

Read-only.

List the parameter values a material instance has actually OVERRIDDEN (scalars, vectors, textures) -- it walks the instance's own override arrays, so it answers "what has been calibrated here", NOT "what can I tune". Two omissions to keep in mind: it never returns STATIC SWITCH parameters, which are the flags that switch whole shader branches on or off (an instance can read perfectly green and still render without a layer because a switch is false in the parent), and it hides every parameter the parent exposes but this instance has not touched -- those are not hard-wired, they keep the parent's value. For the full tunable contract use get_material_all_parameters, and for the switches get_material_static_switch_parameters / get_material_instance_static_switch.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.

Returns: { material_instance_path: string, parent_material: string, scalar_params: [{name, value}], scalar_count: int, vector_params: [{name, r, g, b, a}], vector_count: int, texture_params: [{name, texture_path}], texture_count: int }

get_material_instance_parent

Read-only.

Which material is this instance derived from: the parent's asset path, name and class. Use it to trace an instance back to the base material whose graph and parameter contract actually govern it -- the parent is where static switch defaults and unexposed values live, so it is the next asset to inspect when an instance behaves unexpectedly. set_material_instance_parent changes it.

Parameter Type Required Description
material_instance_path string yes Content path to the material instance.

Returns: { material_instance_path: string, parent_material_path: string, parent_material_name: string, parent_material_class: string }

get_material_instance_static_component_mask

Read-only.

Read a static component-mask parameter (the R/G/B/A channel checkboxes) on a material instance -- which channels of a packed mask/ORM texture the shader actually samples. Reading the wrong channel is a classic silent look bug: nothing errors, the surface is just uniformly wrong. Supports Global / Layer / Blend association with a layer index. set_material_instance_static_component_mask writes it. Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
parameter_name string yes Name of the static component-mask parameter.
association string no Optional EMaterialParameterAssociation: "Global" (default), "Layer", or "Blend".
layer_index number no Optional zero-based index for Layer/Blend association (ignored for Global).

Returns: { material_instance_path: string, parameter_name: string, association: string, value: {r,g,b,a}, found: bool }

get_material_instance_static_switch

Read-only.

Read a static-switch (static bool) parameter value from a Material Instance Constant (via UMaterialEditingLibrary::GetMaterialInstanceStaticSwitchParameterValue). Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
parameter_name string yes Name of the static-switch parameter.
association string no Optional EMaterialParameterAssociation: "Global" (default), "Layer", or "Blend".
layer_index number no Optional zero-based index for Layer/Blend association (ignored for Global).

Returns: { material_instance_path: string, parameter_name: string, association: string, value: bool, overridden: bool }

get_material_layer_info

Read-only.

Reads a material function asset (layer, blend or plain function) without changing it. Returns asset_path, class, usage ("MaterialLayer", "MaterialLayerBlend" or "Default"), num_inputs, num_outputs, num_expressions, and is_layer and is_blend (from the class or the usage).

Parameter Type Required Description
layer_path string yes Path of a material layer, layer blend or any other material function, e.g. /Game/MyGame/M_Layer_Example

Returns: { asset_path: string, class: string, usage: string, num_inputs: int, num_outputs: int, num_expressions: int, is_layer: bool, is_blend: bool }

get_material_layer_parameter

Read-only.

Read one parameter's value scoped to a specific LAYER of a layered material instance (by zero-based layer_index), with a found flag. The read-back oracle for set_material_layer_parameter, and the way to tell which layer a value actually belongs to -- get_material_all_parameters lists every layer's parameters together with their association, which is broader but noisier when you already know the slot.

Parameter Type Required Description
material_instance_path string yes Content path to the MIC
parameter_name string yes Name of the parameter to read
parameter_type string yes One of "scalar", "vector", "texture"
layer_index number yes Zero-based layer index

Returns: { material_instance_path: string, parameter_name: string, layer_index: int, found: bool, value: float | {r,g,b,a} | string }

get_material_layer_stack

Read-only.

Read a material's layer stack: the layer functions and blend functions it uses, in order, with has_layers telling you whether the material is layered at all. Check this before any set_material_layer_parameter call -- on a non-layered material the layer indices mean nothing, and here is where you learn which index is which surface.

Parameter Type Required Description
material_instance_path string yes Content path to the material

Returns: { material_instance_path: string, layers: [{name, function_path}], blends: [{name, function_path}], layer_count: int, blend_count: int, has_layers: bool }

get_material_param_info

Read-only.

Read ONE named parameter's effective value off a material instance (param_type scalar | vector | texture), with a found flag so a misspelled name is distinguishable from a zero value. The cheap targeted read-back after set_material_instance_param_override -- use get_material_all_parameters when you want the whole list, and get_material_instance_param_overridden to tell "inherited from the parent" from "locally overridden", which this does not.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
param_name string yes Name of the parameter to read.
param_type string yes One of "scalar", "vector", "texture".

Returns: { param_name: string, param_type: string, found: bool, value: float | {r,g,b,a} | string }

get_material_physical_material

Read-only.

Which physical material a material is linked to -- what decides footstep sounds, impact effects, friction and surface type when something hits this surface. Reads the RAW field with no engine-default fallback, so an empty path means "nothing authored here" and the engine default applies at runtime; that distinction is exactly what you want when auditing why a surface sounds wrong. set_material_physical_material writes it.

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')

Returns: { material_path: string, physical_material_path: string, success: bool }

get_material_static_switch_parameters

Read-only.

List the STATIC SWITCH parameter names a material or instance exposes -- the on/off flags that compile whole branches of the shader in or out (beach, snow, detail normals, grass output). Always check these when a material looks correctly configured and still renders wrong: get_material_instance_params does not show them at all, so an instance with every texture and scalar right can still be missing a feature because a switch is false in the parent. Names only; read a value with get_material_instance_static_switch and write it with set_material_instance_static_switch. Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to a UMaterialInterface (base material or instance).

Returns: { material_instance_path: string, static_switch_parameters: [string], static_switch_count: int }

get_material_stats

Read-only.

Read PER-ASSET shader complexity for a material or material instance (instruction counts, sampler/texture-sample counts) -- the numbers the Material Editor's Stats panel shows, unlike get_shader_info (project-wide/global). Read-only: does not Modify()/dirty the asset. Render-adjacent: forces synchronous shader compilation on the FIRST call for a given material (UMaterialEditingLibrary::GetStatistics blocks on FMaterialResource::FinishCompilation); subsequent calls are fast once the shader map is cached. Works for both UMaterial and UMaterialInstance (UMaterialInterface's GetMaterialResource is virtual/overridden on both).

Parameter Type Required Description
material_path string yes Full path to the material or material instance (e.g., '/Game/Materials/MyMaterial.MyMaterial')

Returns: { material_path, material_class, num_vertex_shader_instructions, num_pixel_shader_instructions, num_samplers, num_vertex_texture_samples, num_pixel_texture_samples, num_virtual_texture_samples, num_uv_scalars, num_interpolator_scalars, compile_errors: string[], stats_valid: bool }

get_material_usage

Read-only.

What would I break if I changed this material: every asset that references it, bucketed by kind (static mesh, skeletal mesh, blueprint, level, other) with counts, plus the material's own blend mode and two-sided / masked / translucent / opaque flags. The impact check before editing or deleting a shared material. Note it takes a material NAME, not a path, so an ambiguous name can resolve to the wrong asset -- confirm with resolve_asset_by_name first. Nothing to do with get_material_usage_flag, which is about permitted geometry types.

Parameter Type Required Description
material_name string yes Name of the material asset

Returns: { material_name: string, material_class: string, material_category: string, material_tooltip: string, material_display_name: string, usage: [{package_name, asset_name, asset_class, asset_path, usage_type, usage_category, asset_category, asset_tooltip, asset_display_name}], usage_count: int, static_mesh_usage_count: int, skeletal_mesh_usage_count: int, blueprint_usage_count: int, level_usage_count: int, other_usage_count: int, material_has_referencers: bool, material_is_two_sided: bool, material_is_masked: bool, material_is_translucent: bool, material_is_opaque: bool, blend_mode: string }

get_material_usage_flag

Read-only.

Is this material allowed to be used on that kind of geometry? Reads one EMaterialUsage flag (SkeletalMesh, InstancedStaticMeshes, Niagara, SplineMesh, ...) on a base material. The check to make when a material renders fine on a static mesh and comes out as the default grey checker on a skeletal mesh or an instanced mesh -- a missing usage flag is exactly that symptom. Accepts the name with or without the MATUSAGE_ prefix; set_material_usage_flag enables it (and forces a shader recompile).

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
usage string yes Usage flag name, with or without the MATUSAGE_ prefix (e.g., 'SkeletalMesh' or 'MATUSAGE_SkeletalMesh')

Returns: { material_path: string, usage: string, enabled: bool, success: bool }

get_mid_all_params

Read-only.

Get all parameters and their current values from a Material Instance Dynamic

Parameter Type Required Description
mid_object_path string yes Object path of the MID

Returns: { name, value, r, g, b, a, texture_path, texture_name, mid_object_path, mid_name, parent_material, scalar_params, vector_params, texture_params, scalar_count, vector_count, texture_count }

get_mpci_info

Read-only.

Read the transient Material Parameter Collection Instance of one collection on a world (editor by default): instance_exists, is_valid, parent_collection_path and, per parameter, current_value or current_rgba with readback_ok. Changes no value, but the engine lookup creates the instance, at the collection defaults, when the world has none, so instance_exists is true in practice; scalar_override_count and vector_override_count are only the parameter counts.

Parameter Type Required Description
collection_path string yes Full /Game path of the parent MPC
world_label string no Empty or "editor" for the editor world (the default); otherwise the UWorld name of a live world context, compared case-insensitively

Returns: { collection_path: string, world_name: string, instance_exists: bool, is_valid: bool, parent_collection_path: string, scalar_override_count: int, vector_override_count: int, scalars: [object], vectors: [object] }

inspect_material_instance_constant

Read-only.

One-call overview of a material instance: parent material and class, plus COUNTS of scalar/vector/texture overrides, base property overrides, static switches and static component masks. A triage read that tells you which of the detailed tools to reach for next -- it returns counts, not values, so it can say "there are 14 static switches here" but never which ones are on. For values use get_material_all_parameters, get_material_instance_static_switch and get_material_instance_base_overrides.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.

Returns: { material_instance_path: string, material_instance_class: string, parent_material_path: string, parent_material_class: string, scalar_param_count: int, vector_param_count: int, texture_param_count: int, base_override_count: int, static_switch_count: int, static_component_mask_count: int, asset_registry_path: string }

recompile_material_function

Destructive.

Recompile a material function, layer or function instance (UpdateMaterialFunction): loaded materials using it recompile and dependent function instances are marked dirty but not saved, then the function itself is saved; success requires that save. recompiled is always true, not a shader-error report.

Parameter Type Required Description
material_function_path string yes Asset path of the UMaterialFunctionInterface (function, layer or function instance), e.g. "/Game/Materials/MF_Blend".

Returns: { material_function_path: string, function_class: string, recompiled: bool, saved: bool }

regenerate_collection_param_id

Destructive.

Assign a new random FGuid Id to one parameter of a Material Parameter Collection asset and save it; returns new_id. It searches only the array param_type selects (default scalar) and errors when the name is not there.

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Name of the parameter to regenerate the id for
param_type string no Which array to search: "scalar" or "vector", any case; omitted or anything else means scalar

Returns: { collection_path: string, param_name: string, param_type: string, new_id: string, regenerated: bool, saved: bool }

remove_collection_param

Destructive.

Remove a parameter from a Material Parameter Collection by name

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Name of the parameter to remove
param_type string no scalar or vector, default scalar

Returns: { collection_path: string, param_name: string, param_type: string, removed: bool, scalar_count: int, vector_count: int, saved: bool }

rename_collection_param

Destructive.

Rename one parameter of a Material Parameter Collection asset, keeping its Id, and save it. Refuses when new_name is already used in the same array, and errors when param_name is not in the array param_type selects (default scalar).

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Current parameter name
new_name string yes New parameter name, must not collide with another
param_type string no Which array to search: "scalar" or "vector", any case; omitted or anything else means scalar

Returns: { collection_path: string, param_name: string, new_name: string, param_type: string, renamed: bool, saved: bool }

set_collection_param_default

Destructive, idempotent.

Set the default of an existing scalar or vector parameter of a Material Parameter Collection asset and save it: a scalar takes scalar_value, a vector takes vector [r, g, b, a]. Errors when neither array has the name or the needed value is missing.

Parameter Type Required Description
collection_path string yes Full /Game path to the MPC asset
param_name string yes Name of the existing parameter to update
scalar_value number no Optional new float value for a scalar parameter
vector array no New linear color for a vector parameter, as a JSON array [r, g, b, a]; alpha is 1 when only three values are given

Returns: { collection_path: string, param_name: string, param_type: string, default_set: bool, saved: bool, default_value: number, scalar_value: number, default: object, default_rgba: [number] }

set_material_domain

Destructive, idempotent.

Set a material's domain (EMaterialDomain) and recompile it. 'LightFunction', 'Volume'

Parameter Type Required Description
material_path string yes Full path to the material, e.g. '/Game/MyGame/M_Example.M_Example'
domain string yes One of 'Surface', 'PostProcess', 'UI', 'DeferredDecal',

Returns: { material: string, material_path: string, previous_domain: string, requested_domain: string, domain: string, domain_set: bool }

set_material_function_input_props

Destructive, idempotent.

Edit an existing FunctionInput node of a UMaterialFunction asset, found by node_id: only the fields you pass are written (name, type, description, preview value, default flag, sort priority), then the function is recompiled and marked dirty without saving. Read it back with get_material_function_inputs.

Parameter Type Required Description
function_path string yes Full path to the material function, e.g. '/Game/MyGame/MF_Example.MF_Example'
node_id string yes The input node id (UMaterialExpression name) from add_material_function_input
input_name string no New pin name, stored as given: it is not made unique (the engine ValidateName only acts on nodes owned by a material).
input_type string no Optional EFunctionInputType (the 13 values; same parser as add_material_function_input)
description string no New tooltip text of the input pin.
preview_value object no JSON object {"x":0,"y":0,"z":0,"w":0} (FVector4f), any subset; missing components keep their current value.
use_preview_value_as_default boolean no Bool: true makes the preview value the default of the input when its pin is left unconnected.
sort_priority number no Integer that orders this input pin relative to the other inputs of the function.

Returns: { function_path: string, node_id: string, input_name: string, input_type: string, applied: bool }

set_material_function_instance_parent

Destructive, idempotent.

Re-parent a UMaterialFunctionInstance asset to another material function or function instance in one undoable transaction, then save it; success requires the save. Returns old_parent and new_parent, read back from the asset ("(none)" when empty).

Parameter Type Required Description
instance_path string yes Asset path of the UMaterialFunctionInstance to re-parent
parent_function_path string yes Asset path of the new parent UMaterialFunctionInterface

Returns: { instance_path: string, old_parent: string, new_parent: string, applied: bool, saved: bool }

set_material_function_output_props

Destructive, idempotent.

Set properties on an existing UMaterialExpressionFunctionOutput (located by node_id). Partial update (idempotent). ValidateName is re-run when output_name changes.

Parameter Type Required Description
function_path string yes Full path to the material function, e.g. '/Game/MyGame/MF_Example.MF_Example'
node_id string yes The output node id (UMaterialExpression name) from add_material_function_output
output_name string no Optional new pin name (re-validated for uniqueness)
description string no Optional tooltip/description string
sort_priority number no Optional int display-order

Returns: { function_path: string, node_id: string, output_name: string, applied: bool }

set_material_instance_base_overrides

Destructive, idempotent.

Set one or more base property overrides (BasePropertyOverrides) on a Material Instance Constant. Each provided axis sets BOTH its bOverride_ flag and value; omitted axes are left untouched. Persists to the asset.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant, e.g. /Game/MyGame/MI_Example
blend_mode string no Optional EBlendMode name ("Translucent" or "BLEND_Translucent"): Opaque/Masked/Translucent/Additive/Modulate/AlphaComposite/AlphaHoldout.
two_sided boolean no Optional bool to override the two-sided flag.
shading_model string no Optional EMaterialShadingModel name ("Unlit" or "MSM_Unlit"): Unlit/DefaultLit/Subsurface/ClearCoat/...
opacity_mask_clip_value number no Optional float to override the opacity mask clip value.

Returns: { material_instance_path: string, applied_count: int, saved: bool, override_blend_mode: bool, blend_mode: string, override_two_sided: bool, two_sided: bool, override_shading_model: bool, shading_model: string, override_opacity_mask_clip_value: bool, opacity_mask_clip_value: float, blend_mode_warning?: string, shading_model_warning?: string }

set_material_instance_param

Destructive, idempotent.

Set a scalar, vector, texture or static-switch global parameter on a Material Instance Constant asset and re-read it: set comes from the re-read (the engine setter always returns false), plus value_after and overridden_after. Malformed vectors are rejected. Marks the package dirty; does not save.

Parameter Type Required Description
instance_path string yes Asset path of the UMaterialInstanceConstant, e.g. "/Game/Materials/MI_Rock".
param_name string yes Parameter name as defined in the parent material, e.g. "BaseTint"; only global parameters are reached, not layer parameters.
value any no Value. Scalar: a number (JSON number or numeric string). Vector: '(R=..,G=..,B=..,A=..)', '[r,g,b,a]', '[r,g,b]', 'r,g,b,a', 'r,g,b', or a real JSON array of 3-4 numbers; anything else is REJECTED (never written as black). Texture: an asset path. Static switch: a bool or 'true'/'false'.
param_type string no "scalar" | "vector" | "texture" | "static_switch" (optional, inferred from the value: a JSON array => vector, a JSON bool => static_switch, a JSON number => scalar, a string starting with '/' => texture, with '(' or '[' => vector, else scalar. A bool passed AS A STRING still reads as scalar, so pass param_type explicitly in that case)

Returns: { instance: string, instance_path: string, param_name: string, param_type: string, value_format?: string, set: bool, value_after: number|object|string|bool|null, overridden_after: bool, value_requested: number|object|string|bool, requested: {...} }

set_material_instance_param_override

Destructive, idempotent.

Toggle the per-parameter override flag on a Material Instance Constant (any of the 11 parameter types, including static switch). bOverride=true keeps/enables the local override; bOverride=false REVERTS the parameter to the parent material's value (removes the override). Runs UpdateMaterialInstance and persists. Returns honestly: success=false when the parameter is not found on the instance. Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
parameter_name string yes Name of the parameter whose override flag to toggle.
override boolean yes Bool: true = keep local override; false = revert to parent (remove the value).
association string no Optional EMaterialParameterAssociation: "Global" (default), "Layer", or "Blend".

Returns: { material_instance_path: string, parameter_name: string, association: string, requested_override: bool, applied: bool, overridden: bool, saved: bool }

set_material_instance_parent

Destructive, idempotent.

Re-parent a material instance onto a different base material -- how you swap an instance from a vendor master to your own without recreating it and re-pointing every referencer. Overrides whose parameter names do not exist on the new parent become orphaned and silently stop applying, so re-read with get_material_all_parameters afterwards and expect to re-check the static switches, whose defaults come from the new parent.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
new_parent_path string yes Content path of the new parent UMaterialInterface.

Returns: { material_instance_path: string, old_parent: string, new_parent: string, changed: bool }

set_material_instance_static_component_mask

Destructive, idempotent.

Set a static component-mask (R/G/B/A bools) parameter override on a Material Instance Constant, rebuild the static permutation and persist. Reads back via GetParameterValue. Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
parameter_name string yes Name of the static component-mask parameter.
r boolean no Optional bool channel mask (default false).
g boolean no Optional bool channel mask (default false).
b boolean no Optional bool channel mask (default false).
a boolean no Optional bool channel mask (default false).
association string no Optional EMaterialParameterAssociation: "Global" (default), "Layer", or "Blend".
layer_index number no Optional zero-based index for Layer/Blend association (ignored for Global).

Returns: { material_instance_path: string, parameter_name: string, association: string, requested: {r,g,b,a}, value: {r,g,b,a}, found: bool, saved: bool }

set_material_instance_static_switch

Destructive, idempotent.

Set a static-switch (static bool) parameter override on a Material Instance Constant, then rebuild the static permutation and persist. Reads the value back via the getter (the engine value-setter wrapper always returns false, so its return is never trusted). Editor-only.

Parameter Type Required Description
material_instance_path string yes Content path to the UMaterialInstanceConstant.
parameter_name string yes Name of the static-switch parameter.
value boolean yes Bool value to assign to the switch.
association string no Optional EMaterialParameterAssociation: "Global" (default), "Layer", or "Blend".
layer_index number no Optional zero-based index for Layer/Blend association (ignored for Global).

Returns: { material_instance_path: string, parameter_name: string, association: string, requested_value: bool, value: bool, found: bool, saved: bool }

set_material_layer_parameter

Destructive, idempotent.

Write a scalar / vector / texture parameter scoped to ONE layer of a layered material instance (addressed by zero-based layer_index), so each layer of a blend keeps its own tiling, tint or texture. Different from set_material_instance_param_override, which targets the Global association and would hit the wrong slot on a layered material. Do not trust the success flag -- the engine's setters are known to report failure while doing the work; re-read with get_material_layer_parameter.

Parameter Type Required Description
material_instance_path string yes Content path to the MIC, e.g. /Game/MyGame/MI_Example
parameter_name string yes Name of the parameter to set
parameter_type string yes One of "scalar", "vector", "texture"
layer_index number yes Zero-based layer index (for LayerParameter association)
value any yes For scalar: a float. For vector: dict {r, g, b, a}. For texture: a content path string.

Returns: { material_instance_path: string, parameter_name: string, layer_index: int, success: bool }

set_material_layer_stack

Destructive, idempotent.

Define which material-layer and blend functions a layered material instance stacks, in order -- how you compose a surface (base + dirt + snow) out of reusable layer functions instead of editing the base material graph. Order is significant and layers are addressed downstream by index (set_material_layer_parameter), so re-stacking renumbers existing per-layer values. Read the result back with get_material_layer_stack.

Parameter Type Required Description
material_instance_path string yes Content path to the MIC
layers array no Optional list of {function_path} dicts naming layer material functions.
blends array no Optional list of {function_path} dicts naming blend material functions.

Returns: { material_instance_path: string, layer_count: int, blend_count: int, success: bool }

set_material_node_param

Destructive, idempotent.

Write one property of an expression node of a UMaterial asset (not an instance), found by its object name node_id. param_name names the property on every node type (R on Constant, DefaultValue or SliderMax on ScalarParameter, Constant on Constant3Vector and Constant4Vector, DefaultValue on VectorParameter...); ParameterName renames a node that has a parameter name. A value that does not parse for the property is refused and nothing is written. No undo, no save: it runs PostEditChange and marks the material dirty (persist with save_asset). value_after is the property read back. Instances: set_material_instance_param.

Parameter Type Required Description
material_path string yes Material asset path
node_id string yes Id of the target expression in the material
param_name string yes Name of the property to set (e.g. "ParameterName", "R", "DefaultValue")
value string no Text to write: a number for a numeric property, "(R=1,G=0.5,B=0,A=1)", "[1,0.5,0,1]" or "1,0.5,0" for a linear color, the new name for ParameterName, else UE import text for the property; omitted means empty text.

Returns: { material: string, node_id: string, param_name: string, value: string, value_after: string }

set_material_physical_material

Destructive, idempotent.

Link (or clear) the UPhysicalMaterial on a UMaterial asset and persist it to disk. Idempotent: re-setting the same phys-mat returns already_set=true. An empty/omitted physical_material_path CLEARS the link (sets it to null).

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
physical_material_path string no Path to the UPhysicalMaterial asset to link, or "" / omitted to clear the link

Returns: { material_path: string, physical_material_path: string, already_set: bool, saved: bool, save_error?: string, success: bool }

set_material_usage_flag

Destructive, idempotent.

Enable or disable a usage flag (EMaterialUsage) on a UMaterial asset and persist it to disk. Idempotent: the engine setter no-ops when the flag already matches (already_set=true). Recompiles shaders for the affected usage.

Parameter Type Required Description
material_path string yes Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial')
usage string yes Usage flag name, with or without the MATUSAGE_ prefix (e.g., 'SkeletalMesh' or 'MATUSAGE_SkeletalMesh')
enabled boolean no Whether to enable (true, default) or disable (false) the flag

Returns: { material_path: string, usage: string, enabled: bool, already_set: bool, saved: bool, save_error?: string, success: bool }

set_mid_scalar_param

Destructive, idempotent.

Set a scalar parameter override on a transient Material Instance Dynamic (MID), found by object path or name as create_material_instance_dynamic or create_dynamic_material_on_actor return it; it takes effect at once and is never saved. param_name must be a global scalar parameter of the MID's material (as get_mid_all_params lists it); any other name is refused and nothing is written. set is the read-back of the new value. Vectors and textures: set_mid_vector_param, set_mid_texture_param.

Parameter Type Required Description
mid_object_path string yes Object path of the MID (from create_material_instance_dynamic)
param_name string yes Name of a scalar parameter of the MID's material
value number yes New float value

Returns: { mid_object_path, param_name, old_value, new_value, set }

set_mid_texture_param

Destructive, idempotent.

Set a texture parameter override on a transient Material Instance Dynamic (MID), found by object path or name as create_material_instance_dynamic or create_dynamic_material_on_actor return it; it takes effect at once and is never saved. parameter_name must be a global texture parameter of the MID's material (as get_mid_all_params lists it); any other name is refused and nothing is written. set is the read-back of the new texture. Scalars and vectors: set_mid_scalar_param, set_mid_vector_param.

Parameter Type Required Description
mid_path string yes Object path of the MID (transient or component-owned full path)
parameter_name string yes Name of a texture parameter of the MID's material
texture_path string yes Content path to the texture to assign

Returns: { mid_path, parameter_name, old_texture_path, new_texture_path, requested_texture_path, set }

set_mid_vector_param

Destructive, idempotent.

Set a vector (color) parameter override on a transient Material Instance Dynamic (MID), found by object path or name as create_material_instance_dynamic or create_dynamic_material_on_actor return it; it takes effect at once and is never saved. param_name must be a global vector parameter of the MID's material (as get_mid_all_params lists it); any other name is refused and nothing is written. set is the read-back of the new color. Scalars and textures: set_mid_scalar_param, set_mid_texture_param.

Parameter Type Required Description
mid_object_path string yes Object path of the MID (from create_material_instance_dynamic)
param_name string yes Name of a vector parameter of the MID's material
value object yes Color object {r, g, b, a}; a missing component is 0, a missing a is 1
r number no Not read at the top level: the red component goes in value
g number no Not read at the top level: the green component goes in value
b number no Not read at the top level: the blue component goes in value

Returns: { mid_object_path, param_name, old_value: {r, g, b, a}, new_value: {r, g, b, a}, set }

set_mpci_parent_collection

Destructive, idempotent.

Rebuild the Material Parameter Collection Instance (MPCI: the transient per-world values) of collection_path on a world, the editor world by default. Instances are keyed by their collection, so this cannot move an instance to a different parent: it replaces the instance for collection_path with a fresh one at that collection's defaults, losing its overrides, and leaves other collections' instances alone -- the same effect as create_material_parameter_collection_instance. Runtime only: nothing saved, no undo. previous_parent_path is always the collection itself and already_attached always true.

Parameter Type Required Description
collection_path string yes Full /Game path of the new parent MPC
world_label string no Empty or "editor" for the editor world (the default); otherwise the UWorld name of a live world context, compared case-insensitively (first match)

Returns: { collection_path: string, previous_parent_path: string, world_name: string, is_valid: bool, already_attached: bool, attached: bool }

set_mpci_scalar_parameter_value

Destructive, idempotent.

Override a scalar parameter value on the world's MPCI

Parameter Type Required Description
collection_path string yes Full /Game path of the parent MPC
parameter_name string yes Name of the scalar parameter to override
value number no New float value for the parameter
world_label string no Optional world context label, default editor

Returns: { collection_path: string, parameter_name: string, value: number, readback_value: number, readback_ok: bool, world_name: string }

set_mpci_vector_parameter_value

Destructive, idempotent.

Override one vector parameter on the Material Parameter Collection Instance (MPCI: the transient per-world values) of a collection on a world, the editor world by default, creating the instance when needed, and push it to the renderer. Pass rgba or r/g/b/a: r/g/b/a override the matching rgba entries, and channels given by neither are 0 (alpha 1), not the current value. Runtime only: the asset is untouched (set_collection_param_default edits it), nothing saved, no undo. Errors when parameter_name is not a vector parameter of the collection; scalars: set_mpci_scalar_parameter_value.

Parameter Type Required Description
collection_path string yes Full /Game path of the parent MPC
parameter_name string yes Name of the vector parameter to override
rgba array no Optional [r, g, b, a] color value
r number no Optional red channel, alternative to rgba
g number no Optional green channel
b number no Optional blue channel
a number no Optional alpha channel
world_label string no Empty or "editor" for the editor world (the default); otherwise the UWorld name of a live world context, compared case-insensitively (first match)

Returns: { collection_path: string, parameter_name: string, value_rgba: [number], readback_rgba: [number], readback_ok: bool, world_name: string }

set_substrate_slab_scalar

Destructive, idempotent.

Drive a Substrate Slab BSDF scalar pin with a Constant node. Creates a Constant expression set to value and connects it to the named slab pin (e.g. Roughness, F0, DiffuseAlbedo, Anisotropy). Works regardless of whether Substrate is enabled. Requires create_substrate_slab_node first.

Parameter Type Required Description
material_path string yes Content path to the UMaterial holding the slab node
pin_name string yes Slab input pin to drive (e.g. "Roughness")
value number yes Scalar constant value to feed into the pin

Returns: { material_path: string, slab_node_id: string, constant_node_id: string, pin_name: string, value: number, connected: bool, substrate_enabled: bool, r_substrate_cvar: int, note?: string }

swap_material_layer_parameters

Destructive.

Exchange two layer slots on a layered material instance -- reorder which surface sits above which without rebuilding the whole stack with set_material_layer_stack. Every per-layer parameter moves with the slot, so any index you recorded earlier now points at the other layer; re-read get_material_layer_stack afterwards.

Parameter Type Required Description
material_instance_path string yes Content path to the MIC
original_index number yes The original layer parameter index
new_index number yes The new layer parameter index to swap with

Returns: { material_instance_path: string, original_index: int, new_index: int, success: bool }