Skip to content

Commit

Permalink
Release 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFratzl committed Feb 29, 2024
1 parent e30ffde commit d49ff58
Show file tree
Hide file tree
Showing 172 changed files with 59 additions and 35 deletions.
3 changes: 0 additions & 3 deletions Config/DefaultTurboSequence_Lf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
+FunctionRedirects = (OldName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.NumMeshIDsInUpdateGroup_RawID_Concurrent",NewName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.GetNumMeshIDsInUpdateGroup_RawID_Concurrent")
+PropertyRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_MeshAsset_Lf.Reference_Mesh_NoEdit",NewName="/Script/TurboSequence_Lf.TurboSequence_MeshAsset_Lf.ReferenceMeshNative")
+PropertyRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_MeshAsset_Lf.ReferenceMeshNativ",NewName="/Script/TurboSequence_Lf.TurboSequence_MeshAsset_Lf.ReferenceMeshNative")
+FunctionRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.SetCustomDataToInstance",NewName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.SetCustomDataToInstance_RawID_Comcurrent")
+FunctionRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.SetCustomDataToInstance",NewName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.SetCustomDataToInstance_Concurrent")
+FunctionRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.SetCustomDataToInstance_RawID_Comcurrent",NewName="/Script/TurboSequence_Lf.TurboSequence_Manager_Lf.SetCustomDataToInstance_RawID_Concurrent")
+PropertyRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_UpdateContext_Lf.bCollectGarbage",NewName="/Script/TurboSequence_Lf.TurboSequence_UpdateContext_Lf.bCollectGarbageThisFrame")
+PropertyRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_Demo_Lf.bCollectGarbage",NewName="/Script/TurboSequence_Lf.TurboSequence_Demo_Lf.bCollectGarbageThisFrame")
+PropertyRedirects=(OldName="/Script/TurboSequence_Lf.TurboSequence_FeaturesDemo_Lf.bCollectGarbage",NewName="/Script/TurboSequence_Lf.TurboSequence_FeaturesDemo_Lf.bCollectGarbageThisFrame")
Binary file modified Content/Demo/Blueprints/BP_TurboSequence_Demo_Lf.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/Editor/WBP_TurboSequence_ControlPanel_Lf.uasset
Binary file not shown.
Binary file modified Content/Resources/FXS_TurboSequence_Mesh_Lf.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,18 @@ class TURBOSEQUENCE_EDITOR_LF_API UTurboSequence_ControlWidget_Lf : public UEdit


// TODO: move in helpers
static FORCEINLINE_DEBUGGABLE TObjectPtr<UStaticMesh> GenerateStaticMeshFromSkeletalMesh(const TObjectPtr<USkeletalMesh> SkeletalMesh, const int32& LodIndex, const FString& InPath, const FString& InAssetName)
static TObjectPtr<UStaticMesh> GenerateStaticMeshFromSkeletalMesh(const TObjectPtr<USkeletalMesh> SkeletalMesh, const int32& LodIndex, const FString& InPath, const FString& InAssetName)
{

if (FString PackageName; FPackageName::TryConvertFilenameToLongPackageName(InPath, PackageName))
{

if (!IsValid(SkeletalMesh))
{
UE_LOG(LogTurboSequence_Lf, Warning, TEXT("Seems like a caching error while generating %s"), *PackageName);
return nullptr;
}

// Then find/create it.
UPackage* Package = CreatePackage(*PackageName);
check(Package);
Expand Down Expand Up @@ -468,6 +476,10 @@ class TURBOSEQUENCE_EDITOR_LF_API UTurboSequence_ControlWidget_Lf : public UEdit
SrcModel.BuildSettings.DstLightmapIndex = LightMapIndex;
SrcModel.SaveRawMesh(RawMesh);
}
else
{
UE_LOG(LogTurboSequence_Lf, Warning, TEXT("Mesh seems not valid...."))
}

// Copy materials to new mesh
for (const FSkeletalMaterial& Material : SkeletalMesh->GetMaterials())
Expand Down Expand Up @@ -496,17 +508,32 @@ class TURBOSEQUENCE_EDITOR_LF_API UTurboSequence_ControlWidget_Lf : public UEdit
}
StaticMesh->GetOriginalSectionInfoMap().CopyFrom(StaticMesh->GetSectionInfoMap());

// Build mesh from source
StaticMesh->Build(false);
StaticMesh->PostEditChange();

FBoxSphereBounds Bounds = StaticMesh->GetRenderData()->Bounds;
const FVector MinMax = Bounds.BoxExtent * GET2_NUMBER;
const float& WantedZ = MinMax.Z;
Bounds = FBoxSphereBounds(Bounds.Origin, FVector::OneVector * WantedZ, WantedZ);
TArray<FText> OutErrors;
StaticMesh->Build(false, &OutErrors);
for (const FText& Error : OutErrors)
{
UE_LOG(LogTurboSequence_Lf, Error, TEXT("%s"), *Error.ToString());
}
if (OutErrors.Num())
{
return nullptr;
}
if (!StaticMesh->GetRenderData())
{
UE_LOG(LogTurboSequence_Lf, Warning, TEXT("Seems like a caching error while generating %s, please delete this asset manually and try again"), *PackageName);
return nullptr;
}
//StaticMesh->PostEditChange();

StaticMesh->GetRenderData()->Bounds = Bounds;
StaticMesh->SetExtendedBounds(Bounds);
//StaticMesh->MarkPackageDirty();
//
// FBoxSphereBounds Bounds = StaticMesh->GetRenderData()->Bounds;
// const FVector MinMax = Bounds.BoxExtent * GET2_NUMBER;
// const float& WantedZ = MinMax.Z;
// Bounds = FBoxSphereBounds(Bounds.Origin, FVector::OneVector * WantedZ, WantedZ);
//
// StaticMesh->GetRenderData()->Bounds = Bounds;
// StaticMesh->SetExtendedBounds(Bounds);

if (SkinnedMeshVertices != StaticMesh->GetNumVertices(GET0_NUMBER))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ class TURBOSEQUENCE_HELPERMODULE_LF_API FTurboSequence_Helper_Lf
UE::Anim::FStackAttributeContainer Attributes;

FAnimationPoseData PoseData(CompactPose, Curve, Attributes);
FAnimExtractContext Context(0.f, EvaluationOptions.bExtractRootMotion);
FAnimExtractContext Context(0.0, EvaluationOptions.bExtractRootMotion);

FCompactPose BasePose;
BasePose.SetBoneContainer(&RequiredBones);
Expand Down Expand Up @@ -690,7 +690,7 @@ class TURBOSEQUENCE_HELPERMODULE_LF_API FTurboSequence_Helper_Lf
UE::Anim::FStackAttributeContainer Attributes;

FAnimationPoseData PoseData(CompactPose, Curve, Attributes);
FAnimExtractContext Context(0.f, EvaluationOptions.bExtractRootMotion);
FAnimExtractContext Context(0.0, EvaluationOptions.bExtractRootMotion);

FCompactPose BasePose;
BasePose.SetBoneContainer(&RequiredBones);
Expand Down Expand Up @@ -1910,11 +1910,11 @@ class TURBOSEQUENCE_HELPERMODULE_LF_API FTurboSequence_Helper_Lf
// Save the package and all its contents
if (!PlatformFile.IsReadOnly(*PackagePath) && UPackage::SavePackage(Package, Asset, *PackagePath, Args))
{
// FAssetData AssetData(Asset);
// TArray<FAssetData> Data;
// Data.Add(AssetData);
// FAssetRegistryModule::AssetsSaved(MoveTemp(Data));
FAssetRegistryModule::AssetSaved(*Asset);
FAssetData AssetData(Asset);
TArray<FAssetData> Data;
Data.Add(AssetData);
FAssetRegistryModule::AssetsSaved(MoveTemp(Data));
//FAssetRegistryModule::AssetSaved(*Asset);
UE_LOG(LogTurboSequence_Lf, Display, TEXT("Saved Asset -> %s"), *Package->GetName());
}
}
Expand Down Expand Up @@ -1963,11 +1963,11 @@ class TURBOSEQUENCE_HELPERMODULE_LF_API FTurboSequence_Helper_Lf
// Save the package and all its contents
if (UPackage::SavePackage(Package, Asset, *PackagePath, Args))
{
// FAssetData AssetData(Asset);
// TArray<FAssetData> Data;
// Data.Add(AssetData);
// FAssetRegistryModule::AssetsSaved(MoveTemp(Data));
FAssetRegistryModule::AssetSaved(*Asset);
FAssetData AssetData(Asset);
TArray<FAssetData> Data;
Data.Add(AssetData);
FAssetRegistryModule::AssetsSaved(MoveTemp(Data));
//FAssetRegistryModule::AssetSaved(*Asset);
UE_LOG(LogTurboSequence_Lf, Display, TEXT("Saved Asset -> %s"), *Package->GetName());
}
}
Expand Down
16 changes: 8 additions & 8 deletions Source/TurboSequence_Lf/Public/TurboSequence_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ class TURBOSEQUENCE_LF_API ATurboSequence_Test : public AActor

static FORCEINLINE_DEBUGGABLE void GetBoneTransformFromAnimationSafe(FTransform& OutAtom, const TObjectPtr<UAnimSequence> Animation, const uint16& SkeletonBoneIndex, const TMap<int32, int32>& SkeletonBoneMap, const float& AnimationTime, const FReferenceSkeleton& ReferenceSkeleton)
{
if (const int32& TrackIndex = SkeletonBoneMap.Contains(SkeletonBoneIndex) ? SkeletonBoneMap[SkeletonBoneIndex] : INDEX_NONE; TrackIndex != INDEX_NONE)
{
Animation->GetBoneTransform(OutAtom, TrackIndex, AnimationTime, !Animation->IsCompressedDataValid());
}
else
{
OutAtom = ReferenceSkeleton.GetRefBonePose()[SkeletonBoneIndex];
}
// if (const int32& TrackIndex = SkeletonBoneMap.Contains(SkeletonBoneIndex) ? SkeletonBoneMap[SkeletonBoneIndex] : INDEX_NONE; TrackIndex != INDEX_NONE)
// {
// Animation->GetBoneTransform(OutAtom, TrackIndex, AnimationTime, !Animation->IsCompressedDataValid());
// }
// else
// {
// OutAtom = ReferenceSkeleton.GetRefBonePose()[SkeletonBoneIndex];
// }
}


Expand Down
2 changes: 1 addition & 1 deletion Source/TurboSequence_Lf/Public/TurboSequence_Utility_Lf.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ class TURBOSEQUENCE_LF_API FTurboSequence_Utility_Lf
//Reference_RenderThread.SkinWeightTextureOffsetPerLevelOfDetail.Add(FUintVector2(GPUSkinWeightOffset, GET0_NUMBER));
}
}
if (!bIsMeshVisible || !bIsIncluded)
if ((!bIsMeshVisible || !bIsIncluded) && FromAsset->MeshData.Num())
{
SkinWightOffsetIndex += FromAsset->MeshData[LodElement.CollectionIndex].NumVertices *
FTurboSequence_Helper_Lf::NumSkinWeightPixels;
Expand Down

0 comments on commit d49ff58

Please sign in to comment.