diff --git a/OutfitProject.cpp b/OutfitProject.cpp index 68a4caac..f986fd86 100644 --- a/OutfitProject.cpp +++ b/OutfitProject.cpp @@ -1024,6 +1024,8 @@ void OutfitProject::SetTexture(const string& shapeName, const string& textureFil } } } + else + workNif.GetTextureForShape(shapeName, texFile); } else workNif.GetTextureForShape(shapeName, texFile); @@ -1032,11 +1034,11 @@ void OutfitProject::SetTexture(const string& shapeName, const string& textureFil texFile = "noimg.dds"; string texturesDir = appConfig["GameDataPath"]; - wxString combinedTexFile = texturesDir + texFile; - shapeTextures[shapeName] = combinedTexFile.ToStdString(); + string combinedTexFile = texturesDir + texFile; + shapeTextures[shapeName] = combinedTexFile.c_str(); } else - shapeTextures[shapeName] = textureFile; + shapeTextures[shapeName] = textureFile.c_str(); } bool OutfitProject::IsValidShape(const string& shapeName) { diff --git a/PreviewWindow.cpp b/PreviewWindow.cpp index 94515110..8e2ee612 100644 --- a/PreviewWindow.cpp +++ b/PreviewWindow.cpp @@ -201,11 +201,14 @@ void PreviewWindow::AddNifShapeTexture(NifFile* fromNif, const string& shapeName } } } + else + fromNif->GetTextureForShape(shapeName, texFile); } else - fromNif->GetTextureForShape(shapeName, texFile, 0); + fromNif->GetTextureForShape(shapeName, texFile); - SetShapeTexture(shapeName, baseDataPath + texFile, isSkin); + string combinedTexFile = baseDataPath + texFile; + SetShapeTexture(shapeName, combinedTexFile.c_str(), isSkin); } void PreviewWindow::RightDrag(int dX, int dY) {