Skip to content

Commit

Permalink
Fixed material diffuse loading cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ousnius committed Jan 3, 2016
1 parent 02d8cfa commit fa5acde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions OutfitProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,8 @@ void OutfitProject::SetTexture(const string& shapeName, const string& textureFil
}
}
}
else
workNif.GetTextureForShape(shapeName, texFile);
}
else
workNif.GetTextureForShape(shapeName, texFile);
Expand All @@ -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) {
Expand Down
7 changes: 5 additions & 2 deletions PreviewWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fa5acde

Please sign in to comment.