Add NPC base skeleton files to the optimizer blacklist (Fixes #4159)

pull/333/head
scrawl 7 years ago
parent b06512a60d
commit a5adc5b018

@ -432,13 +432,18 @@ namespace Resource
bool canOptimize(const std::string& filename) bool canOptimize(const std::string& filename)
{ {
// xmesh.nif can not be optimized because there are keyframes added in post
size_t slashpos = filename.find_last_of("\\/"); size_t slashpos = filename.find_last_of("\\/");
if (slashpos != std::string::npos && slashpos+1 < filename.size()) if (slashpos != std::string::npos && slashpos+1 < filename.size())
{ {
std::string basename = filename.substr(slashpos+1); std::string basename = filename.substr(slashpos+1);
// xmesh.nif can not be optimized because there are keyframes added in post
if (!basename.empty() && basename[0] == 'x') if (!basename.empty() && basename[0] == 'x')
return false; return false;
// NPC skeleton files can not be optimized because of keyframes added in post
// (most of them are usually named like 'xbase_anim.nif' anyway, but not all of them :( )
if (basename.compare(0, 9, "base_anim") == 0 || basename.compare(0, 4, "skin") == 0)
return false;
} }
// For spell VFX, DummyXX nodes must remain intact. Not adding those to reservedNames to avoid being overly cautious - instead, decide on filename // For spell VFX, DummyXX nodes must remain intact. Not adding those to reservedNames to avoid being overly cautious - instead, decide on filename

Loading…
Cancel
Save