mpfb_set_macro_details
Change a MakeHuman character's phenotype sliders and rebuild its shape from them; omit any slider to leave it unchanged.
Instructions
Change a MakeHuman character's macro details - its phenotype sliders - and rebuild the shape from them, exactly as MPFB's own sliders do.
Every slider is optional and an omitted one is left alone, so a
relative change is one call: read the character with
mpfb_get_macro_details, then pass only what should differ. Passing a
slider its current value is not the same as omitting it - it is
reported in changes with previous_value equal to new_value.
Sliders are 0.0-1.0, and 0.5 is neutral for all but the three race
weights, whose neutral is 0.33 each. age runs 0.0 = baby, 0.1875 =
child, 0.5 = young adult, 1.0 = old; gender 0.0 = fully female, 1.0 =
fully male. The three race weights are independent and MPFB does not
normalize them: setting race_asian to 1.0 does not reduce the other
two, and the default sums to 0.99. Set all three when changing one, or
read race_sum in the response and decide.
prune (default true, MPFB's own) deletes macro shape keys whose
weight falls to zero, keeping the shape key list from growing as
sliders move. refit (default false, MPFB's own) re-fits the mesh
assets and the rig to the new body shape. The default is false because a refit
is expensive, not because it is unnecessary: leave it false, read
assets_possibly_stale, and call mpfb_refit_human once after a
series of changes rather than paying for a refit per slider.
result carries changes (one {name, previous_value, new_value}
per slider named), the full macro_details after the change,
race_sum, macro_shapekeys_before/_after with shapekeys_removed
and shapekeys_added - all four naming shape keys as the mesh stores
them ($md-$as-$fe-$yn), so a name from here can be looked up rather
than only read - plus recalculated, refit_performed,
assets_possibly_stale and basemesh_name.
Two situations answer rather than fail, both with changes: []: a
subject that resolves to no basemesh (found: false,
subject_not_found), and a basemesh that is not ready to be modified -
left in edit mode, or with no shape keys at all (ready: false,
blocked_by naming which). A call that
names no slider also does nothing, deliberately, rather than paying for
a shape rebuild that would change nothing; it comes back performed: false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | No | ||
| name | No | ||
| prune | No | ||
| refit | No | ||
| gender | No | ||
| height | No | ||
| muscle | No | ||
| weight | No | ||
| cupsize | No | ||
| firmness | No | ||
| race_asian | No | ||
| proportions | No | ||
| race_african | No | ||
| race_caucasian | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||