ResavePackagesCommandletでAnimSequenceの圧縮失敗があるので相談です

お世話になっております。

ResavePackagesCommandletで、AnimSequence を再保存した際に圧縮でエラーを起こすことがあります。

以前、いくつか教えていただいた修正CLを取り込んだのですが、まだ​下記のようなエラーが起きるので改善する方法や他の修正CLなど無いでしょうか?

[Content removed]

(CL31293768とCL32542204取り込みました)

LogAnimationCompression: Error: Failed to generate compressed animation data for AnimSequence /Game/Character/NPC/NPC1/Animation/ADD/A_CH_NPC_ADD_Run_Lp.A_CH_NPC1_ADD_Run_Lp with compression scheme AnimBoneCompressionSettings /ACLPlugin/ACLAnimBoneCompressionSettings.ACLAnimBoneCompressionSettings for target platform Windows (Editor)

お世話になっております。

確認ですが、

Engine/Source/Runtime/Engine/Private/Animation/AnimationCompressionDerivedData.cppの中で

`bool FAnimationSequenceAsyncCacheTask::BuildData() const
{
// This is where we should do the compression parts
TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*(FString(TEXT("FAnimationSequenceAsyncCacheTask::BuildData ") + CompressibleAnimPtr->Name)));

// Early out before logging if we are canceled (could be retracting this task)
if (Owner.IsCanceled())
{
return false;
}

UE_LOG(LogAnimationCompression, Display, TEXT(“Building compressed animation data for %s (Required Memory Estimate: %.2f MB)”),
*CompressibleAnimPtr->FullName, double(GetRequiredMemoryEstimate()) / (1024.0 * 1024.0));

check(CompressibleAnimPtr.IsValid());
FCompressibleAnimData& DataToCompress = *CompressibleAnimPtr.Get();
FCompressedAnimSequence& OutData = *CompressedData;

if (Owner.IsCanceled())
{
return false;
}

FCompressibleAnimDataResult CompressionResult;
DataToCompress.FetchData(TargetPlatform);

if (Owner.IsCanceled())
{
return false;
}
DataToCompress.Update(OutData);

const bool bBoneCompressionOk = FAnimationUtils::CompressAnimBones(DataToCompress, CompressionResult);
if (Owner.IsCanceled())
{
return false;
}
const bool bCurveCompressionOk = FAnimationUtils::CompressAnimCurves(DataToCompress, OutData);
const bool bIsCanceled = Owner.IsCanceled();

const bool bCompressionSuccessful = bBoneCompressionOk && bCurveCompressionOk;
const FString CompressionName = DataToCompress.BoneCompressionSettings->GetFullName();

if (bCompressionSuccessful && !bIsCanceled)
{
OutData.CompressedByteStream = MoveTemp(CompressionResult.CompressedByteStream);
OutData.CompressedDataStructure = MoveTemp(CompressionResult.AnimData);
OutData.BoneCompressionCodec = CompressionResult.Codec;
OutData.CompressedRawData = DataToCompress.RawAnimationData;
OutData.OwnerName = DataToCompress.AnimFName;

return true;
}
else if(!bIsCanceled)
{
UE_LOG(LogAnimationCompression, Error, TEXT(“Failed to generate compressed animation data for %s with compression scheme %s for target platform %s”), *CompressibleAnimPtr->FullName, *CompressionName, *TargetPlatform->DisplayName().ToString());
}

return false;
}`はこんあ風になっていますか?

現在、教えていただいたCL以外このコマンドレットに関係あるバグがなくて、もし可能であれば、再現できるプロジェクトをいただけますでしょうか?

お手数ですが、よろしくお願いします。

現在この様に修正を取り込んで対応してます。

いただいたコードに寄せて対応してみます。

`bool FAnimationSequenceAsyncCacheTask::BuildData() const
{
// This is where we should do the compression parts
TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*(FString(TEXT("FAnimationSequenceAsyncCacheTask::BuildData ") + CompressibleAnimPtr->Name)));
UE_LOG(LogAnimationCompression, Display, TEXT(“Building compressed animation data for %s (Required Memory Estimate: %.2f MB)”),
*CompressibleAnimPtr->FullName, double(GetRequiredMemoryEstimate()) / (1024.0 * 1024.0));

check(CompressibleAnimPtr.IsValid());
FCompressibleAnimData& DataToCompress = *CompressibleAnimPtr.Get();
FCompressedAnimSequence& OutData = *CompressedData;

if (Owner.IsCanceled())
{
return false;
}

FCompressibleAnimDataResult CompressionResult;
DataToCompress.FetchData(TargetPlatform);

if (Owner.IsCanceled())
{
return false;
}
DataToCompress.Update(OutData);

const bool bBoneCompressionOk = FAnimationUtils::CompressAnimBones(DataToCompress, CompressionResult);
if (Owner.IsCanceled())
{
return false;
}
const bool bCurveCompressionOk = FAnimationUtils::CompressAnimCurves(DataToCompress, OutData);

const bool bCompressionSuccessful = bBoneCompressionOk && bCurveCompressionOk;
const FString CompressionName = DataToCompress.BoneCompressionSettings->GetFullName();

if (bCompressionSuccessful && !Owner.IsCanceled())
{
OutData.CompressedByteStream = MoveTemp(CompressionResult.CompressedByteStream);
OutData.CompressedDataStructure = MoveTemp(CompressionResult.AnimData);
OutData.BoneCompressionCodec = CompressionResult.Codec;
OutData.CompressedRawData = DataToCompress.RawAnimationData;
OutData.OwnerName = DataToCompress.AnimFName;

return true;
}
else
{
UE_LOG(LogAnimationCompression, Error, TEXT(“Failed to generate compressed animation data for %s with compression scheme %s for target platform %s”), *CompressibleAnimPtr->FullName, *CompressionName, *TargetPlatform->DisplayName().ToString());
}

return false;
}`