> For the complete documentation index, see [llms.txt](https://docs.meshmorpher.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meshmorpher.com/graph/skeleton/fit-skeleton.md).

# 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                                                                                                               |
