SkinLayerStudio API (Beta) / API Reference / Skin

quick_skin()

Download Markdown

Builds weights from the mesh and the bones you already have, and puts them on one chosen layer.

If you do not name a layer, it paints the layer that is selected now. Select Layer 1 and then call this, and only Layer 1 changes. [Base] stays as it was. Keeping the other layers is the default.

Omit falloff and resolution and the values chosen by scan are used. Resolution may only be 64, 128, 256, or 512. A number outside that list, such as 300, is rejected. It is not snapped to a nearby value. error is bad_resolution. If falloff is not between 0 and 1, error is bad_falloff.

Names in bones are the only bones that receive weight. The other bones stay in the influence list with weight 0. If none of the names match, error is no_bones. If there is no mesh, error is no_mesh.

unseeded_bones can be non-empty even when the call succeeds. Those bones sat outside the mesh and did not land on the grid. Their weight is 0, so later it looks like only that bone does not move. Print this list before you trust the result.

If Trial has locked Quick Skin, error is trial_feature_locked. If the call is stopped midway, error is cancelled and the layers return to how they were before the call.

Signature

skin.quick_skin(
    falloff=None,
    resolution=None,
    max_influences=4,
    keep_other_layers=True,
    bones=None,
) -> result
Argument Meaning
falloff 0 is soft, 1 is stiff. Omit it to use the suggestion.
resolution 64, 128, 256, or 512. Omit it to use the suggestion.
max_influences How many bones one vertex can take. Default 4.
keep_other_layers True leaves the other layers as they are.
bones Bone names to seed. Omit it to use every bone on the slot.

progress, target_layer_id, seed_gap, smooth_strength, and smooth_iterations are also accepted. The window uses them for its progress bar. In a script, activate the layer you want first and leave those arguments out.

Return

Field Meaning
ok Whether painting finished.
error Failure code. Empty on success.
layer_name Name of the layer that was actually painted.
vert_count Vertex count.
bone_count Bone count.
unseeded_bones Bones that did not land on the grid.
elapsed_s Seconds taken.

Example

skin = api.skin()
result = skin.quick_skin(bones=["Bip001 L UpperArm", "Bip001 L Forearm"])
print(result.ok, result.layer_name)
print(result.unseeded_bones)

To split a whole human rig with a map, use quick_skin_human.

💬

Need help with the API?

Open a support ticket or join the community discussion.

Contact Support