Read NiMultiTargetTransformController

crashfix_debugdraw
Alexei Kotov 2 years ago
parent 8df0587793
commit 44fbb5cdc3

@ -180,6 +180,23 @@ namespace Nif
interpolator.post(nif); interpolator.post(nif);
} }
void NiMultiTargetTransformController::read(NIFStream *nif)
{
Controller::read(nif);
size_t numTargets = nif->getUShort();
std::vector<NodePtr> targets;
targets.resize(numTargets);
for (size_t i = 0; i < targets.size(); i++)
targets[i].read(nif);
mExtraTargets = targets;
}
void NiMultiTargetTransformController::post(NIFFile *nif)
{
Controller::post(nif);
mExtraTargets.post(nif);
}
void NiFloatInterpController::read(NIFStream *nif) void NiFloatInterpController::read(NIFStream *nif)
{ {
Controller::read(nif); Controller::read(nif);

@ -148,6 +148,14 @@ struct NiKeyframeController : public Controller
void post(NIFFile *nif) override; void post(NIFFile *nif) override;
}; };
struct NiMultiTargetTransformController : public Controller
{
NodeList mExtraTargets;
void read(NIFStream *nif) override;
void post(NIFFile *nif) override;
};
struct NiFloatInterpController : public Controller struct NiFloatInterpController : public Controller
{ {
NiFloatDataPtr data; NiFloatDataPtr data;

@ -137,6 +137,7 @@ static std::map<std::string, CreateRecord> makeFactory()
{"NiBoolInterpolator" , &construct <NiBoolInterpolator , RC_NiBoolInterpolator >}, {"NiBoolInterpolator" , &construct <NiBoolInterpolator , RC_NiBoolInterpolator >},
{"NiPoint3Interpolator" , &construct <NiPoint3Interpolator , RC_NiPoint3Interpolator >}, {"NiPoint3Interpolator" , &construct <NiPoint3Interpolator , RC_NiPoint3Interpolator >},
{"NiTransformController" , &construct <NiKeyframeController , RC_NiKeyframeController >}, {"NiTransformController" , &construct <NiKeyframeController , RC_NiKeyframeController >},
{"NiMultiTargetTransformController" , &construct <NiMultiTargetTransformController , RC_NiMultiTargetTransformController >},
{"NiTransformInterpolator" , &construct <NiTransformInterpolator , RC_NiTransformInterpolator >}, {"NiTransformInterpolator" , &construct <NiTransformInterpolator , RC_NiTransformInterpolator >},
{"NiColorInterpolator" , &construct <NiColorInterpolator , RC_NiColorInterpolator >}, {"NiColorInterpolator" , &construct <NiColorInterpolator , RC_NiColorInterpolator >},
{"BSShaderTextureSet" , &construct <BSShaderTextureSet , RC_BSShaderTextureSet >}, {"BSShaderTextureSet" , &construct <BSShaderTextureSet , RC_BSShaderTextureSet >},

@ -144,7 +144,8 @@ enum RecordType
RC_BSLightingShaderProperty, RC_BSLightingShaderProperty,
RC_NiClusterAccumulator, RC_NiClusterAccumulator,
RC_NiAlphaAccumulator, RC_NiAlphaAccumulator,
RC_NiSortAdjustNode RC_NiSortAdjustNode,
RC_NiMultiTargetTransformController
}; };
/// Base class for all records /// Base class for all records

Loading…
Cancel
Save