1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 20:53:50 +00:00

Recognize NiBSAnimationNode as a record type

And don't warn about animated nodes without textkeys
This commit is contained in:
Chris Robinson 2013-04-06 05:00:19 -07:00
parent 1d934e3112
commit 41ce5464c9
3 changed files with 6 additions and 8 deletions

View file

@ -209,7 +209,7 @@ static const RecordFactoryEntry recordFactories [] = {
{ "NiNode", &construct <NiNode >, RC_NiNode },
{ "AvoidNode", &construct <NiNode >, RC_NiNode },
{ "NiBSParticleNode", &construct <NiNode >, RC_NiNode },
{ "NiBSAnimationNode", &construct <NiNode >, RC_NiNode },
{ "NiBSAnimationNode", &construct <NiNode >, RC_NiBSAnimationNode },
{ "NiBillboardNode", &construct <NiNode >, RC_NiNode },
{ "NiTriShape", &construct <NiTriShape >, RC_NiTriShape },
{ "NiRotatingParticles", &construct <NiRotatingParticles >, RC_NiRotatingParticles },

View file

@ -59,6 +59,7 @@ enum RecordType
RC_NiMaterialColorController,
RC_NiBSPArrayController,
RC_NiParticleSystemController,
RC_NiBSAnimationNode,
RC_NiLight,
RC_NiTextureEffect,
RC_NiVertWeightsExtraData,

View file

@ -464,6 +464,10 @@ void loadResource(Ogre::Resource *resource)
return;
}
/* Animations without textkeys don't get Ogre::Animation objects. */
if(!animroot)
return;
std::vector<std::string> targets;
// TODO: If ctrls.size() == 0, check for a .kf file sharing the name of the .nif file
if(ctrls.size() == 0) // No animations? Then we're done.
@ -486,13 +490,6 @@ void loadResource(Ogre::Resource *resource)
return;
}
if(!animroot)
{
warn(Ogre::StringConverter::toString(ctrls.size())+" animated node(s) in "+
skel->getName()+", but no text keys.");
return;
}
Ogre::UserObjectBindings &bindings = animroot->getUserObjectBindings();
bindings.setUserAny(sTextKeyExtraDataID, Ogre::Any(true));