Skip to content

Commit

Permalink
fix: ビルドエラー UE5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ruyo committed Apr 23, 2024
1 parent 71bc49b commit 18f283a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Source/VRM4ULoader/Private/VrmConvertModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ bool VRMConverter::ConvertModel(UVrmAssetListObject *vrmAssetList) {
if (VRMConverter::Options::Get().IsVRMAModel()) {
auto &presetList = vrmAssetList->VrmMetaObject->VRMAnimationMeta.expressionPreset;
for (auto& p : presetList) {
if (NodeName != p.expressionNodeName) continue;
if (NodeName != *p.expressionNodeName) continue;

FFloatCurve c;
c.SetCurveTypeFlag(AACF_Editable, true);
Expand All @@ -2408,7 +2408,17 @@ bool VRMConverter::ConvertModel(UVrmAssetListObject *vrmAssetList) {
c.UpdateOrAddKey(RawTrack.PosKeys[i].X / 100.f, i * AnimDeltaTime);
}
}
#if UE_VERSION_OLDER_THAN(5,3,0)
FSmartName sm;
{
TArray<FName> a = {*p.expressionName };
k->RemoveSmartnamesAndModify(USkeleton::AnimCurveMappingName, a);
}
k->AddSmartNameAndModify(USkeleton::AnimCurveMappingName, *p.expressionName, sm);
FAnimationCurveIdentifier f(sm, ERawCurveTrackTypes::RCT_Float);
#else
FAnimationCurveIdentifier f(*p.expressionName, ERawCurveTrackTypes::RCT_Float);
#endif
FName name;
Controller.AddCurve(f);
Controller.SetCurveKeys(f, c.FloatCurve.GetConstRefOfKeys());
Expand Down

0 comments on commit 18f283a

Please sign in to comment.