# Fit Skeleton

<div align="left"><figure><img src="/files/4MJ4kQAmwsKbqDCzRKUb" alt=""><figcaption></figcaption></figure></div>

```
/**
 * Node that fits a skeleton to a deformed mesh.
 * 
 * Adjusts bone positions and orientations to match
 * the modified mesh geometry, useful after mesh fitting.
 * 
 * Usage:
 * 1. Connect original mesh and deformed mesh
 * 2. Configure start/end bones and options
 * 3. Click Apply to fit skeleton
 */
```

| Parameter                                                         | Description                                                                                                                      |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| <p>StartBone</p><p><code>name</code></p>                          | The Starting bone. Usually "root" but can be configured to meet any requirements                                                 |
| <p>EndBone</p><p><code>name</code></p>                            | The EndBone that receives the last transformation.                                                                               |
| <p>IgnoreBones</p><p><code>stringlist</code> </p>                 | Selected LOD to load.List of bones to skip in bonesnapshot. Can have multiple bones, one per row. Shift + Enter to add a new row |
| <p>IgnoreString</p><p><code>stringlist</code></p>                 | Ignore bones that contain strings. Can have multiple strings one per row. Shift + Enter to add a new row                         |
| <p>OrientBones</p><p><code>string</code></p>                      | BoneList of Bones to update orientation                                                                                          |
| <p>OrientBonesAboveBone</p><p><code>name</code></p>               | Update orientation of all bones above selected bone                                                                              |
| <p>BoneToVertexThreshold</p><p><code>float</code></p>             | Maximum distance at which a bone is deemed to be compatible with a vertex.                                                       |
| <p>BoneToBoneThreshold</p><p><code>float</code></p>               | Maximum distance at which a bone is deemed to be compatible with another bone.                                                   |
| <p>MaxDistanceToSurface</p><p><code>float</code></p>              | Maximum distance to surface                                                                                                      |
| <p>bUseVertexWeights</p><p><code>boolean</code></p>               | Whether to use vertex weights when available                                                                                     |
| <p>bPreserveRelativeBoneTransforms</p><p><code>boolean</code></p> | Whether to preserve relative bone transformations.                                                                               |
| <p>VertexSampleSize</p><p><code>integer</code></p>                | Vertex Sample Size                                                                                                               |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meshmorpher.com/graph/skeleton/fit-skeleton.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
