From b14d1f0c6b154c77e06fc7c51a4d09c4eca3dd6d Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Wed, 8 Feb 2023 14:10:35 +0300 Subject: [PATCH] Don't discard root node transformations for Gamebryo meshes --- components/nif/node.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/nif/node.cpp b/components/nif/node.cpp index 6347de932e..8d9391b6b2 100644 --- a/components/nif/node.cpp +++ b/components/nif/node.cpp @@ -118,10 +118,16 @@ namespace Nif if (nif->getBethVersion() < NIFFile::BethVersion::BETHVER_FO4) readRecordList(nif, effects); + // FIXME: stopgap solution until we figure out what Oblivion does if it does anything + if (nif->getVersion() > NIFFile::NIFVersion::VER_MW) + return; + // Discard transformations for the root node, otherwise some meshes // occasionally get wrong orientation. Only for NiNode-s for now, but // can be expanded if needed. // FIXME: if node 0 is *not* the only root node, this must not happen. + // FIXME: doing this here is awful. + // We want to do this on world scene graph level rather than local scene graph level. if (0 == recIndex && !Misc::StringUtils::ciEqual(name, "bip01")) { trafo = Nif::Transformation::getIdentity();