From 93c73509e8ded113d3af5275fc29ed85fbc6e0e7 Mon Sep 17 00:00:00 2001 From: PopcornFX Bot Date: Thu, 16 May 2024 17:29:59 +0200 Subject: [PATCH] PopcornFX Plugin v2.19.3 --- .../Materials/MFunc_PK_DiffuseRemap.uasset | 4 ++-- Content/Materials/MFunc_PK_RemapAlpha.uasset | 4 ++-- Download_SDK_Desktop.bat | 2 +- Download_SDK_Mobile.bat | 2 +- PopcornFX.uplugin | 4 ++-- README.md | 2 +- .../Attributes/PopcornFXAttributeSamplers.cpp | 22 ++++++++++++++++++- .../PopcornFXDetailsAttributeSamplerShape.cpp | 5 +++++ ...cornFXCustomizationSubRendererMaterial.cpp | 2 +- .../Public/PopcornFXAttributeSamplerShape.h | 6 +++++ .../Public/PopcornFXVersionGenerated.h | 2 +- 11 files changed, 43 insertions(+), 12 deletions(-) diff --git a/Content/Materials/MFunc_PK_DiffuseRemap.uasset b/Content/Materials/MFunc_PK_DiffuseRemap.uasset index e8b634a..6d5a5dc 100644 --- a/Content/Materials/MFunc_PK_DiffuseRemap.uasset +++ b/Content/Materials/MFunc_PK_DiffuseRemap.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b75cdcdc292b0026c3f137cba9119a636e72e27061912157f44102dbd26dbfc7 -size 106720 +oid sha256:f745ea990bcc3974a52869c1b7ba22dcece7a020a6eb9d9fddfa283f3da90b0d +size 16469 diff --git a/Content/Materials/MFunc_PK_RemapAlpha.uasset b/Content/Materials/MFunc_PK_RemapAlpha.uasset index 691161f..775521e 100644 --- a/Content/Materials/MFunc_PK_RemapAlpha.uasset +++ b/Content/Materials/MFunc_PK_RemapAlpha.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ecd67723c91bb3a76b3a3514ed6121f5ef14c630e76bc2777fd7ca697c0ff79 -size 105767 +oid sha256:300bdfaadf85617568a82743772f65ab7b7638ec712a96ac84c9a8703a018f71 +size 14906 diff --git a/Download_SDK_Desktop.bat b/Download_SDK_Desktop.bat index 794a468..a538612 100644 --- a/Download_SDK_Desktop.bat +++ b/Download_SDK_Desktop.bat @@ -6,7 +6,7 @@ setlocal bitsadmin /reset bitsadmin /create third_party_download_desktop -bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.19.2_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z" +bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.19.3_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z" bitsadmin /setpriority third_party_download_desktop "FOREGROUND" bitsadmin /resume third_party_download_desktop diff --git a/Download_SDK_Mobile.bat b/Download_SDK_Mobile.bat index f654e72..a749e36 100644 --- a/Download_SDK_Mobile.bat +++ b/Download_SDK_Mobile.bat @@ -6,7 +6,7 @@ setlocal bitsadmin /reset bitsadmin /create third_party_download_mobile -bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.19.2_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z" +bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.19.3_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z" bitsadmin /setpriority third_party_download_mobile "FOREGROUND" bitsadmin /resume third_party_download_mobile diff --git a/PopcornFX.uplugin b/PopcornFX.uplugin index 864836f..d8120af 100644 --- a/PopcornFX.uplugin +++ b/PopcornFX.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, - "Version": 21902, - "VersionName": "2.19.2", + "Version": 21903, + "VersionName": "2.19.3", "FriendlyName": "PopcornFX", "Description": "PopcornFX Realtime Particle Solution integration into Unreal Engine", "Category": "PopcornFX", diff --git a/README.md b/README.md index c624334..7ab9637 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Unreal Engine PopcornFX Plugin Integrates the **PopcornFX Runtime SDK** into **Unreal Engine 5** as a Plugin. -* **Version:** `v2.19.2` +* **Version:** `v2.19.3` * **Unreal Engine:** `5.1`, `5.2` and `5.3` * **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android`, `PS4`, `PS5`, `XboxOne`, `Xbox Series`, `Switch` diff --git a/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp b/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp index 8a9fff3..25351d2 100644 --- a/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp +++ b/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp @@ -638,7 +638,11 @@ namespace if (!PK_VERIFY(batch->RawMesh() != null)) return null; - PopcornFX::CShapeDescriptor_Mesh *shapeDesc = PK_NEW(PopcornFX::CShapeDescriptor_Mesh(batch->RawMesh())); + PK_ASSERT(self->Scale.GetMin() >= 0.0f); + const FVector3f safeMeshScale = FVector3f(self->Scale); + const CFloat3 scale = ToPk(safeMeshScale); + + PopcornFX::CShapeDescriptor_Mesh *shapeDesc = PK_NEW(PopcornFX::CShapeDescriptor_Mesh(batch->RawMesh(), scale)); _RebuildSamplingStructs(self, shapeDesc); @@ -651,6 +655,12 @@ namespace { const UPopcornFXAttributeSamplerShape *self = params.self; PopcornFX::CShapeDescriptor_Mesh *shapeDesc = static_cast(params.shape); + + PK_ASSERT(self->Scale.GetMin() >= 0.0f); + const FVector3f safeScale = FVector3f(self->Scale); + const CFloat3 scale = ToPk(safeScale); + + shapeDesc->SetScale(scale); _RebuildSamplingStructs(self, shapeDesc); } @@ -779,6 +789,7 @@ UPopcornFXAttributeSamplerShape::UPopcornFXAttributeSamplerShape(const FObjectIn ShapeType = EPopcornFXAttribSamplerShapeType::Sphere; BoxDimension = FVector(100.f); Radius = 100.f; + Scale = FVector::OneVector; InnerRadius = 0.f; Height = 100.f; StaticMesh = null; @@ -849,6 +860,14 @@ void UPopcornFXAttributeSamplerShape::SetHeight(float height) //---------------------------------------------------------------------------- +void UPopcornFXAttributeSamplerShape::SetScale(FVector scale) +{ + Scale = scale; + UpdateShapeProperties(); +} + +//---------------------------------------------------------------------------- + PopcornFX::CMeshSurfaceSamplerStructuresRandom *UPopcornFXAttributeSamplerShape::SamplerSurface() const { return &m_Data->m_SamplerSurface; @@ -908,6 +927,7 @@ void UPopcornFXAttributeSamplerShape::PostEditChangeProperty(FPropertyChangedEve propertyName == TEXT("Radius") || propertyName == TEXT("InnerRadius") || propertyName == TEXT("Height") || + propertyName == TEXT("Scale") || #if 0 // To re-enable when shape collections are supported by PopcornFX v2 propertyName == TEXT("CollectionSamplingHeuristic") || propertyName == TEXT("CollectionUseShapeWeights") || diff --git a/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeSamplerShape.cpp b/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeSamplerShape.cpp index eba2d40..e81030e 100644 --- a/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeSamplerShape.cpp +++ b/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeSamplerShape.cpp @@ -68,6 +68,7 @@ void FPopcornFXDetailsAttributeSamplerShape::CustomizeDetails(IDetailLayoutBuild detailLayout.HideProperty("StaticMesh"); detailLayout.HideProperty("StaticMeshSubIndex"); detailLayout.HideProperty("Shapes"); + detailLayout.HideProperty("Scale"); #if 0 // To re-enable when shape collections are supported by PopcornFX v2 detailLayout.HideProperty("CollectionSamplingHeuristic"); detailLayout.HideProperty("CollectionUseShapeWeights"); @@ -82,6 +83,7 @@ void FPopcornFXDetailsAttributeSamplerShape::CustomizeDetails(IDetailLayoutBuild detailLayout.HideProperty("StaticMesh"); detailLayout.HideProperty("StaticMeshSubIndex"); detailLayout.HideProperty("Shapes"); + detailLayout.HideProperty("Scale"); #if 0 // To re-enable when shape collections are supported by PopcornFX v2 detailLayout.HideProperty("CollectionSamplingHeuristic"); detailLayout.HideProperty("CollectionUseShapeWeights"); @@ -108,6 +110,7 @@ void FPopcornFXDetailsAttributeSamplerShape::CustomizeDetails(IDetailLayoutBuild detailLayout.HideProperty("StaticMesh"); detailLayout.HideProperty("StaticMeshSubIndex"); detailLayout.HideProperty("Shapes"); + detailLayout.HideProperty("Scale"); #if 0 // To re-enable when shape collections are supported by PopcornFX v2 detailLayout.HideProperty("CollectionSamplingHeuristic"); detailLayout.HideProperty("CollectionUseShapeWeights"); @@ -121,6 +124,7 @@ void FPopcornFXDetailsAttributeSamplerShape::CustomizeDetails(IDetailLayoutBuild detailLayout.HideProperty("StaticMesh"); detailLayout.HideProperty("StaticMeshSubIndex"); detailLayout.HideProperty("Shapes"); + detailLayout.HideProperty("Scale"); #if 0 // To re-enable when shape collections are supported by PopcornFX v2 detailLayout.HideProperty("CollectionSamplingHeuristic"); detailLayout.HideProperty("CollectionUseShapeWeights"); @@ -136,6 +140,7 @@ void FPopcornFXDetailsAttributeSamplerShape::CustomizeDetails(IDetailLayoutBuild detailLayout.HideProperty("InnerRadius"); detailLayout.HideProperty("Height"); detailLayout.HideProperty("StaticMesh"); + detailLayout.HideProperty("Scale"); detailLayout.HideProperty("StaticMeshSubIndex"); detailLayout.HideProperty("ShapeSamplingMode"); detailLayout.HideProperty("DensityColorChannel"); diff --git a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp index 3bada8a..a4e7acb 100644 --- a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp +++ b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp @@ -254,7 +254,7 @@ FText FPopcornFXCustomizationSubRendererMaterial::OnGetThumbnailToolTip(int32 th check(thumbId >= 0 && thumbId < PK_ARRAY_COUNT(m_Thumbs)); if (!m_Thumbs[thumbId].m_Pty->IsValidHandle()) return FText::FromString(TEXT("Invalid")); - UObject *obj; + UObject *obj = null; m_Thumbs[thumbId].m_Pty->GetValue(obj); if (obj == null) return FText::FromString(TEXT("null")); diff --git a/Source/PopcornFX/Public/PopcornFXAttributeSamplerShape.h b/Source/PopcornFX/Public/PopcornFXAttributeSamplerShape.h index f46ed80..6cc4cb7 100644 --- a/Source/PopcornFX/Public/PopcornFXAttributeSamplerShape.h +++ b/Source/PopcornFX/Public/PopcornFXAttributeSamplerShape.h @@ -53,6 +53,9 @@ class POPCORNFX_API UPopcornFXAttributeSamplerShape : public UPopcornFXAttribute UFUNCTION(Category = "PopcornFX AttributeSampler", BlueprintCallable) void SetHeight(float height); + + UFUNCTION(Category = "PopcornFX AttributeSampler", BlueprintCallable) + void SetScale(FVector scale); public: UPROPERTY(Category="PopcornFX AttributeSampler", EditAnywhere) TEnumAsByte ShapeType; @@ -75,6 +78,9 @@ class POPCORNFX_API UPopcornFXAttributeSamplerShape : public UPopcornFXAttribute UPROPERTY(Category="PopcornFX AttributeSampler", EditAnywhere, BlueprintReadOnly, meta=(ClampMin = "0.0", UIMin = "0.0")) float Height; + UPROPERTY(Category="PopcornFX AttributeSampler", EditAnywhere, BlueprintReadOnly, meta=(ClampMin = "0.0", UIMin = "0.0")) + FVector Scale; + /** Distribute sampling by the given CollectionSamplingHeuristic of sub-Shapes */ UPROPERTY(Category="PopcornFX AttributeSampler", EditAnywhere) TEnumAsByte CollectionSamplingHeuristic; diff --git a/Source/PopcornFX/Public/PopcornFXVersionGenerated.h b/Source/PopcornFX/Public/PopcornFXVersionGenerated.h index 41ac0f6..637ea1a 100644 --- a/Source/PopcornFX/Public/PopcornFXVersionGenerated.h +++ b/Source/PopcornFX/Public/PopcornFXVersionGenerated.h @@ -7,5 +7,5 @@ #define POPCORNFX_PLUGIN_VERSION_MAJOR 2 #define POPCORNFX_PLUGIN_VERSION_MINOR 19 -#define POPCORNFX_PLUGIN_VERSION_PATCH 2 +#define POPCORNFX_PLUGIN_VERSION_PATCH 3 #define POPCORNFX_PLUGIN_VERSION_TAG ""