KillzXGaming / Switch-Toolbox

A tool to edit many video game file formats
GNU General Public License v3.0
971 stars 155 forks source link

Support for changing existing mesh's skin count #655

Closed MediaMoots closed 1 year ago

MediaMoots commented 1 year ago

This PR adds support for increasing skin count.

To increase the skin count, just edit the skin count from the displayed box. image

The maximum skin count is arbitrarily capped at 16. The minimum skin count is calculated per mesh, usually the default imported value.

Increasing skin count is very useful, for example, if you have an earring model, it will usually only be weighted to 1 bone, thus a skin count of 1, but if you have a material that only supports, say, 3 skin count, being able to increase the skin count will save a lot of time (instead of using keep skin count).   Decreasing is not and can't be supported because (as far as I understand) it will cause information loss on the mesh. To decrease skin count, use the limit total weights tool in blender in weight paint mode.

Tested Games:

@KillzXGaming I think more testing on other games might be needed. But since this PR does not break anything else (hopefully) this could be merged.