# WKit Blender Plugin: AKL Autofitter

## Summary

**Published**: ??? by [mana vortex](https://app.gitbook.com/u/NfZBoxGegfUqB33J9HXuCs6PVaC3 "mention")\
**Last documented edit**: Feb 12 2024 by [mana vortex](https://app.gitbook.com/u/NfZBoxGegfUqB33J9HXuCs6PVaC3 "mention")

The auto-refitter is a tool developed by [AllKnowingLion](https://app.gitbook.com/u/ntwa3K86ZPgEhR4Ds0rOU5qaKHm1 "mention") that automates the tedious process of refitting meshes for the various body mods. This wiki page will show you how to use it.

### Wait, this is not what I want!

* If you want to manually refit an item, check [r-and-r-refitting-step-by-step](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/items-equipment/recolours-and-refits/r-and-r-refitting-step-by-step "mention") or follow the links from there

## How to auto-refit

With a mesh selected, you can find it in the **Mesh Tools** section of the **CP77** panel. Use the dropdown to select a target body, then click the button to apply the changes:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-ecdd9a2349e8f94eb36290f11264f58ef48cc068%2Fblender_plugin_autorefitter.png?alt=media" alt=""><figcaption></figcaption></figure>

#### It shrinks too far!

OK, that's a bit nasty, because it means you'll have to either **merge** the shapekeys, or create [garment-support-from-scratch](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/3d-modelling/garment-support-how-does-it-work/garment-support-from-scratch "mention") (which is easier than it sounds like).

If you want to merge, select the shapekey that you want to change, and set its value as high as you can without clipping. Then, select the "New Shape from Mix" entry in the dropdown menu (see the screenshot above).

You can now delete your original shapekey and rename the newly-created one (which will be called "Key 2" or something like that) to the original's name.

## The body I want is not supported!

The lattice modifier has to be created from hand and added to the Wolvenkit Blender IO suite.

TODO: This section will eventually document the steps how you can

* add a body mod to your local version of the plugin
* share that edit with everyone else by having it added officially

<details>

<summary>Archived: Modifier cannot be applied to a mesh with shapekeys</summary>

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fx0e59bRnUL6jJgTCi4zf%2Fimage.png?alt=media&#x26;token=ec7374d8-f12d-4d32-9fe6-8d41f8a87d59" alt=""><figcaption></figcaption></figure>

Manual process:

1. Duplicate the mesh (Hotkey: `Shift+D`, `Esc`)
2. [Delete the shapekeys](https://wiki.redmodding.org/cyberpunk-2077-modding/3d-modelling/troubleshooting-your-mesh-edits#option-2-guaranteed-to-work-delete-garmentsupport-from-the-mesh) from one of the meshes
3. Delete the modifier from the other mesh
4. After the shapekeys are gone, apply the modifier:

<div align="left"><figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-f522d2895a7381bd2169f1384577a38d6b31bb86%2Fblender_plugin_apply_modifier.png?alt=media" alt=""><figcaption></figcaption></figure></div>

5. Select the mesh **without shapekeys** (the one you changed by applying the modifier)
6. Switch to the Data tab and create a modifyer by hitting the + button
7. Name your new shapekey `Basis`. This is how it's supposed to look when no shapekeys are active.
8. Select the mesh **with shapekeys** (the one with the original shape)
9. Switch to the Data tab, select the second shapekey in the list, and transfer it:

<div align="left"><figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-aa5522fe7c7c35128d17d5d1ae2367ecb4d48672%2Fblender_plugin_transfer_shapekeys.png?alt=media" alt=""><figcaption></figcaption></figure></div>

10. Repeat the process with all other shapekeys
11. You can now delete the original mesh.

</details>
