mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 02:15:32 +00:00
Recognize NiBSAnimationNode as a record type
And don't warn about animated nodes without textkeys
This commit is contained in:
parent
1d934e3112
commit
41ce5464c9
3 changed files with 6 additions and 8 deletions
|
@ -209,7 +209,7 @@ static const RecordFactoryEntry recordFactories [] = {
|
||||||
{ "NiNode", &construct <NiNode >, RC_NiNode },
|
{ "NiNode", &construct <NiNode >, RC_NiNode },
|
||||||
{ "AvoidNode", &construct <NiNode >, RC_NiNode },
|
{ "AvoidNode", &construct <NiNode >, RC_NiNode },
|
||||||
{ "NiBSParticleNode", &construct <NiNode >, RC_NiNode },
|
{ "NiBSParticleNode", &construct <NiNode >, RC_NiNode },
|
||||||
{ "NiBSAnimationNode", &construct <NiNode >, RC_NiNode },
|
{ "NiBSAnimationNode", &construct <NiNode >, RC_NiBSAnimationNode },
|
||||||
{ "NiBillboardNode", &construct <NiNode >, RC_NiNode },
|
{ "NiBillboardNode", &construct <NiNode >, RC_NiNode },
|
||||||
{ "NiTriShape", &construct <NiTriShape >, RC_NiTriShape },
|
{ "NiTriShape", &construct <NiTriShape >, RC_NiTriShape },
|
||||||
{ "NiRotatingParticles", &construct <NiRotatingParticles >, RC_NiRotatingParticles },
|
{ "NiRotatingParticles", &construct <NiRotatingParticles >, RC_NiRotatingParticles },
|
||||||
|
|
|
@ -59,6 +59,7 @@ enum RecordType
|
||||||
RC_NiMaterialColorController,
|
RC_NiMaterialColorController,
|
||||||
RC_NiBSPArrayController,
|
RC_NiBSPArrayController,
|
||||||
RC_NiParticleSystemController,
|
RC_NiParticleSystemController,
|
||||||
|
RC_NiBSAnimationNode,
|
||||||
RC_NiLight,
|
RC_NiLight,
|
||||||
RC_NiTextureEffect,
|
RC_NiTextureEffect,
|
||||||
RC_NiVertWeightsExtraData,
|
RC_NiVertWeightsExtraData,
|
||||||
|
|
|
@ -464,6 +464,10 @@ void loadResource(Ogre::Resource *resource)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Animations without textkeys don't get Ogre::Animation objects. */
|
||||||
|
if(!animroot)
|
||||||
|
return;
|
||||||
|
|
||||||
std::vector<std::string> targets;
|
std::vector<std::string> targets;
|
||||||
// TODO: If ctrls.size() == 0, check for a .kf file sharing the name of the .nif file
|
// 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.
|
if(ctrls.size() == 0) // No animations? Then we're done.
|
||||||
|
@ -486,13 +490,6 @@ void loadResource(Ogre::Resource *resource)
|
||||||
return;
|
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();
|
Ogre::UserObjectBindings &bindings = animroot->getUserObjectBindings();
|
||||||
bindings.setUserAny(sTextKeyExtraDataID, Ogre::Any(true));
|
bindings.setUserAny(sTextKeyExtraDataID, Ogre::Any(true));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue