Recognize NiBSAnimationNode as a record type

And don't warn about animated nodes without textkeys
actorid
Chris Robinson 12 years ago
parent 1d934e3112
commit 41ce5464c9

@ -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 },

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

@ -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));

Loading…
Cancel
Save