From d836b3d0ffbd9085bf06724b0aa59967982d627e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 22 Jan 2013 00:24:57 -0800 Subject: [PATCH] Don't try to create animations if there's no text keys and nonaccum node. Such meshes apparently use NiBSAnimationNode, a Bethesda-specific extension which has animation-related info in its flags (values currently unknown). --- components/nifogre/ogre_nif_loader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index 4ae9c79f3..adc05f7e7 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -414,6 +414,13 @@ void loadResource(Ogre::Resource *resource) return; } + if(!nonaccum) + { + warn(Ogre::StringConverter::toString(ctrls.size())+" animated node(s) in "+ + skel->getName()+", but no text keys. Uses NiBSAnimationNode?"); + return; + } + Ogre::UserObjectBindings &bindings = nonaccum->getUserObjectBindings(); bindings.setUserAny(sTextKeyExtraDataID, Ogre::Any(true));