mpfb_remove_asset
Removes a garment, body part, or body proxy from a MakeHuman character in Blender, cleaning up mask modifiers and sub-rigs so the character has no leftover holes or orphaned data.
Instructions
Take one mesh asset - a garment, a body part or the body proxy - off a MakeHuman character and clean up after it, the way MPFB's own "unload" does.
Use this rather than deleting the object. MPFB hides the body under a garment with a mask modifier on the basemesh (and on the body proxy, for garments), and a garment may have brought a sub-rig of its own. Deleting the object with a generic Blender tool leaves both behind, and the character keeps a hole in it with nothing visible to explain it.
name is required and is the asset object's own Blender name, as
mpfb_list_objects reports it or as mpfb_add_asset returned it in
asset_object_name. There is no active-object fallback: this deletes
an object. Equipping two copies of one asset gives ...hat and
...hat.001, so check which you are naming. This is not undoable
across the socket: the object and its mesh data are gone when the
call returns.
On removed: true, result carries asset_object_name, object_type
and asset_source - all read before the deletion - plus
basemesh_name, objects_removed naming everything the call deleted,
mask_modifiers_removed naming the objects and modifiers that went,
subrig_removed, and two things MPFB leaves behind and never mentions:
vertex_groups_left_behind (the Delete.<name> groups themselves;
only the modifiers referencing them are removed) and
mesh_data_orphaned (the mesh datablock, which keeps no users until
the file is saved and reloaded). Both are harmless and both are
invisible unless reported.
Refusals come back as removed: false (and so performed: false) with
a blocked_by and a sentence: subject_not_found, basemesh_not_found,
not_object_mode, asset_source_missing - without it the mask
modifier cannot be identified and removal would be silently partial -
and not_a_mesh_asset, which refuses a basemesh or a skeleton
outright, because the underlying MPFB function would happily delete
either.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||