ousnius / BodySlide-and-Outfit-Studio

BodySlide and Outfit Studio, a tool to convert, create, and customize outfits and bodies for Bethesda games.
GNU General Public License v3.0
293 stars 64 forks source link

Corrupted slider data when replacing partial reference mesh with complete reference. #466

Closed mrudat closed 1 year ago

mrudat commented 2 years ago

Description When I replace the reference in a project with triangles removed from the embedded reference with the complete reference, it appears that the slider data isn't imported correctly, and you end up with corrupt slider data for some triangles.

How to reproduce Using Outfit Studio v5.6.0:

  1. Load "CBBE 3BA Creation Club - Body - Golden Saint Cuirass.osp" from "CBBE 3BA Creation Club" version 1.1
  2. Note that the 3BA mesh has had triangles removed.
  3. Load the complete reference from the file "SE 3BBB Amazing.osp" any project, 3BA shape, default settings.
  4. Everything appears normal at this point.
  5. It is readily apparent that something's not right when checking the "Big Torso" slider (random movement of triangles rather than the motion from the reference), but it appears that similar corruption is present in most sliders.

What also didn't work:

  1. Load the outfit.
  2. Delete the partial reference.
  3. Load the complete reference.
  4. Identical (as far as I can tell) corruption as before.

How I managed to work around the problem; I assume something isn't getting appropriately cleared during the reference load.

  1. Load the outfit.
  2. Delete the reference.
  3. Save the outfit.
  4. Load the outfit again.
  5. Now load the reference.
  6. Things work as expected.

Perhaps loading a reference that doesn't have overlapping triangles may also have worked, eg. load TBD reference, and then load the 3BA reference?

I believe this to be a regression, as I believe this worked as expected in previous versions of Outfit Studio.

ousnius commented 1 year ago

@mrudat This is now fixed. As you can see in the diff, it was a really stupid bug where it didn't replace existing data in the map of slider data.