mpfb_set_material_settings
Set a MakeHuman character's eye, skin, hair, and garment material settings in one all-or-nothing batch that survives preset save and reuse.
Instructions
Change a MakeHuman character's procedural material settings - iris
colours, the LAYERED skin, the tint of hair and garments - as one
all-or-nothing batch that survives mpfb_save_preset and
mpfb_create_human_from_preset. Take section, group and socket names
from mpfb_get_material_settings.
eyes:{socket, value | color}skin:{group, socket, value | color},groupas the read keys itcolor_adjustments:{object_name, socket, value | color}
Exactly one of value (a float socket) and color (a colour socket).
A color is four scene-linear RGBA numbers, like the read's
settings, not sRGB: a colour picked by eye comes out too light
unless converted.
Nothing is written unless every entry resolves; resolution_errors
gives each failure's reason: section not applicable, unknown group
or socket (with closest), wrong key for the socket's kind, a float
outside its range, or a linked socket, which a write cannot change.
Most layered region colours are linked from the color group, and
write_instead names the socket to set.
On the layered skin, color's SkinColor shows fully with no diffuse
texture and over one only as far as SkinOverride raises it; each
region colour has its own *Override. A colour adjustment mixes
Color1 with the texture by Factor, so a low Factor is flat
colour without texture detail.
mpfb_set_skin, mpfb_set_asset_material and re-adding the eyes
rebuild a material from MPFB's defaults, discarding these settings.
result's changes lists each socket in request order with
previous_value/new_value and previous_srgb_hex/new_srgb_hex;
materials_written names other objects sharing a written material,
which changed too.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eyes | No | ||
| name | No | ||
| skin | No | ||
| color_adjustments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||