mpfb_set_targets
Set a MakeHuman character's modeling targets in Blender — category modifiers or raw shape keys — in one batch call. All entries must resolve or no changes are applied.
Instructions
Change a MakeHuman character's modeling targets - one modifier (a per-category slider), one raw target, or fifty of them in one call.
Send the whole change as one call. A round trip costs about half a second and the work inside costs milliseconds.
modifiers is the level to use normally. Each entry is {section, category, value, side}, naming a target.json section and one of its
categories exactly as mpfb_list_targets reports them:
valueruns -1.0..+1.0 for a category that hasopposites- the sign picks which of the opposing pair is loaded, and the other is driven to zero - and 0.0..1.0 for one that does not.sideis"left","right"or"unsided". Required for a category withhas_left_and_right: true, and omitted or"unsided"for one without.
targets is the escape hatch, for a user-installed target that
belongs to no category. Each entry is {shapekey_name, value} with
value in 0.0..1.0, the range Blender clamps a shape key to. Use the
shapekey_name mpfb_list_targets reports, not the filename:
above 60 characters MPFB encodes the name, and a filename then
addresses nothing at all, silently.
Both lists are optional and either may be empty; a call naming neither does nothing and says so.
Nothing is applied unless everything resolves. Every entry is
checked inside Blender first - the section and category exist, the side
fits the category, the value is in that category's range, the target
file can be found - and if any entry fails, resolution_errors names
which and zero changes are made. Fix them and resend the whole
batch; known_sections and known_categories_in_section come back
with the error.
symmetry (default false, MPFB's own) also applies a sided change to
the other side, so one entry touches up to four shape keys. prune
(default true, MPFB's own) deletes a target's shape key once its value
reaches zero. refit (default false, MPFB's own) re-fits the mesh assets and
the rig afterwards; leave it false, read assets_possibly_stale, and
call mpfb_refit_human once when the modeling is done.
result carries changes - one entry per requested change, in request
order, each listing every target file touched with present_before,
previous_value, new_value, loaded_from (set when the target was
read off disk on this call) and pruned - plus shapekeys_added and
shapekeys_removed, refit_performed, assets_possibly_stale and
basemesh_name. An unresolvable subject answers found: false with
blocked_by: "subject_not_found", and a basemesh in edit mode or
without shape keys ready: false with blocked_by. performed is false whenever changes is empty, the
all-or-nothing resolution failure included.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| prune | No | ||
| refit | No | ||
| targets | No | ||
| symmetry | No | ||
| modifiers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||