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
290 stars 64 forks source link

Sliders have no effects for a baseshape #412

Closed enpinion closed 2 years ago

enpinion commented 2 years ago

Description commit: 0f8b04a Adjusting slider has no effect for a baseshape (aka reference)

Also, code side question: So I'm writing a patch for this, but I'm not sure how should it be treated. When a project gets loaded, shapeAttribute map for its baseshape will be cleared by project->DeleteShape(). However, morphing meshes done by called OutfitProject::GetLiveVerts() and to get a target data of shape it calls ShapeToDataName() which requires shapeAttributes. So it will return an empty string so it does nothing. And I'm not sure what is the best way to fix this.

  1. Load slider attributes for the baseshape after project->LoadReferenceNif() to restore this map.
  2. Put slider value for targetData rather than by ShapeToDataName() (of course this can't catch if no slider available for the baseshape)

Once unset and set as reference shape again will bring the shapeAttribute for the baseshape back.

How to reproduce

  1. Load any project with reference
  2. Adjust any slider
  3. Slider has no effect on the shape.
ousnius commented 2 years ago

@daz001 will be looking at the issue, thanks for reporting. It was a recent regression.

ousnius commented 2 years ago

@enpinion Should be fixed.