diff --git a/components/nif/extra.cpp b/components/nif/extra.cpp index 69f66014d6..1fc24e5f89 100644 --- a/components/nif/extra.cpp +++ b/components/nif/extra.cpp @@ -136,4 +136,30 @@ namespace Nif nif->readVector(mData, nif->get()); } + void BSConnectPoint::Point::read(NIFStream* nif) + { + mParent = nif->getSizedString(); + mName = nif->getSizedString(); + nif->read(mTransform.mRotation); + nif->read(mTransform.mTranslation); + nif->read(mTransform.mScale); + } + + void BSConnectPoint::Parents::read(NIFStream* nif) + { + NiExtraData::read(nif); + + mPoints.resize(nif->get()); + for (Point& point : mPoints) + point.read(nif); + } + + void BSConnectPoint::Children::read(NIFStream* nif) + { + NiExtraData::read(nif); + + nif->read(mSkinned); + nif->getSizedStrings(mPointNames, nif->get()); + } + } diff --git a/components/nif/extra.hpp b/components/nif/extra.hpp index 49c77723fb..0808e91b16 100644 --- a/components/nif/extra.hpp +++ b/components/nif/extra.hpp @@ -45,6 +45,8 @@ namespace Nif using NiFloatsExtraData = TypedVectorExtra; using NiIntegersExtraData = TypedVectorExtra; + using BSEyeCenterExtraData = TypedVectorExtra; + using BSPositionData = TypedVectorExtra; using BSWArray = TypedVectorExtra; // Distinct from NiBinaryExtraData, uses mRecordSize as its size @@ -170,5 +172,32 @@ namespace Nif void read(NIFStream* nif) override; }; + struct BSConnectPoint + { + struct Point + { + std::string mParent; + std::string mName; + NiQuatTransform mTransform; + + void read(NIFStream* nif); + }; + + struct Parents : NiExtraData + { + std::vector mPoints; + + void read(NIFStream* nif) override; + }; + + struct Children : NiExtraData + { + bool mSkinned; + std::vector mPointNames; + + void read(NIFStream* nif) override; + }; + }; + } #endif diff --git a/components/nif/niffile.cpp b/components/nif/niffile.cpp index 524be1f5d1..89559a9149 100644 --- a/components/nif/niffile.cpp +++ b/components/nif/niffile.cpp @@ -246,11 +246,15 @@ namespace Nif { "BSBehaviorGraphExtraData", &construct }, { "BSBoneLODExtraData", &construct }, { "BSClothExtraData", &construct }, + { "BSConnectPoint::Children", &construct }, + { "BSConnectPoint::Parents", &construct }, { "BSDecalPlacementVectorExtraData", &construct }, { "BSDistantObjectExtraData", &construct }, { "BSDistantObjectLargeRefExtraData", &construct }, + { "BSEyeCenterExtraData", &construct }, + { "BSPositionData", &construct }, { "BSWArray", &construct }, { "BSXFlags", &construct }, diff --git a/components/nif/record.hpp b/components/nif/record.hpp index 612ec199a5..a06dcfe2a9 100644 --- a/components/nif/record.hpp +++ b/components/nif/record.hpp @@ -77,6 +77,8 @@ namespace Nif RC_BSBound, RC_BSBoneLODExtraData, RC_BSClothExtraData, + RC_BSConnectPointChildren, + RC_BSConnectPointParents, RC_BSDecalPlacementVectorExtraData, RC_BSDistantTreeShaderProperty, RC_BSDynamicTriShape, @@ -87,6 +89,7 @@ namespace Nif RC_BSEffectShaderPropertyColorController, RC_BSEffectShaderPropertyFloatController, RC_BSExtraData, + RC_BSEyeCenterExtraData, RC_BSFrustumFOVController, RC_BSFurnitureMarker, RC_BSInvMarker, @@ -105,6 +108,7 @@ namespace Nif RC_BSNiAlphaPropertyTestRefController, RC_BSPackedAdditionalGeometryData, RC_BSParentVelocityModifier, + RC_BSPositionData, RC_BSProceduralLightningController, RC_BSPSysArrayEmitter, RC_BSPSysHavokUpdateModifier,