diff --git a/components/nif/controller.cpp b/components/nif/controller.cpp index f35f87aba4..e1755bbedb 100644 --- a/components/nif/controller.cpp +++ b/components/nif/controller.cpp @@ -807,4 +807,30 @@ namespace Nif mBasisData.post(nif); } + void NiBSplineFloatInterpolator::read(NIFStream* nif) + { + NiBSplineInterpolator::read(nif); + + nif->read(mValue); + nif->read(mHandle); + } + + void NiBSplinePoint3Interpolator::read(NIFStream* nif) + { + NiBSplineInterpolator::read(nif); + + nif->read(mValue); + nif->read(mHandle); + } + + void NiBSplineTransformInterpolator::read(NIFStream* nif) + { + NiBSplineInterpolator::read(nif); + + nif->read(mValue); + nif->read(mTranslationHandle); + nif->read(mRotationHandle); + nif->read(mScaleHandle); + } + } diff --git a/components/nif/controller.hpp b/components/nif/controller.hpp index 760fef6cff..928d9d2dc0 100644 --- a/components/nif/controller.hpp +++ b/components/nif/controller.hpp @@ -560,5 +560,34 @@ namespace Nif void post(Reader& nif) override; }; + // Abstract + struct NiBSplineFloatInterpolator : public NiBSplineInterpolator + { + float mValue; + uint32_t mHandle; + + void read(NIFStream* nif) override; + }; + + // Abstract + struct NiBSplinePoint3Interpolator : public NiBSplineInterpolator + { + osg::Vec3f mValue; + uint32_t mHandle; + + void read(NIFStream* nif) override; + }; + + struct NiBSplineTransformInterpolator : public NiBSplineInterpolator + { + NiQuatTransform mValue; + uint32_t mTranslationHandle; + uint32_t mRotationHandle; + uint32_t mScaleHandle; + + void read(NIFStream* nif) override; + }; + + } #endif diff --git a/components/nif/niffile.cpp b/components/nif/niffile.cpp index a8bffd0f14..0983525b91 100644 --- a/components/nif/niffile.cpp +++ b/components/nif/niffile.cpp @@ -164,6 +164,7 @@ namespace Nif { "NiLightRadiusController", &construct }, // Interpolators, Gamebryo + { "NiBSplineTransformInterpolator", &construct }, { "NiBlendBoolInterpolator", &construct }, { "NiBlendFloatInterpolator", &construct }, { "NiBlendPoint3Interpolator", &construct }, diff --git a/components/nif/record.hpp b/components/nif/record.hpp index 1911de658b..4e439d0b74 100644 --- a/components/nif/record.hpp +++ b/components/nif/record.hpp @@ -164,6 +164,7 @@ namespace Nif RC_NiBSParticleNode, RC_NiBSplineData, RC_NiBSplineBasisData, + RC_NiBSplineTransformInterpolator, RC_NiCamera, RC_NiClusterAccumulator, RC_NiCollisionObject,