Skip to content

Commit

Permalink
PopcornFX Gem 2.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ValPKFX committed Jan 27, 2023
1 parent 4aba22b commit 58c151a
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 143 deletions.
32 changes: 24 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,37 @@ set(PK_O3DE_ENGINE_VERSION_LATEST "2210.0")

if (${PK_O3DE_ENGINE_VERSION})
set(o3de_build_number ${PK_O3DE_ENGINE_VERSION})
elseif (${INSTALLED_ENGINE})
o3de_read_json_key(o3de_build_number ${LY_ROOT_FOLDER}/engine.json "O3DEBuildNumber")
if (o3de_build_number STREQUAL "" OR o3de_build_number STREQUAL "0")
message(FATAL_ERROR "Invalid O3DEBuildNumber in 'engine.json'. Please set PK_O3DE_ENGINE_VERSION in the PopcornFX CMakeLists.txt.")
endif()
else()
o3de_read_json_key(o3de_version ${LY_ROOT_FOLDER}/engine.json "O3DEVersion")
if (o3de_version STREQUAL "0.1.0.0")
ly_file_read(${LY_ROOT_FOLDER}/engine.json manifest_json_data)

# Use the engine.json file version to determine the version and build fields
string(JSON file_version ERROR_VARIABLE manifest_json_error GET ${manifest_json_data} "file_version")
if(file_version GREATER_EQUAL 2)
set(o3de_build_number_key "build")
set(o3de_display_version_key "display_version")
set(o3de_version_key "version")
else()
set(o3de_build_number_key "O3DEBuildNumber")
set(o3de_display_version_key "O3DEVersion")
set(o3de_version_key "O3DEVersion")
endif()

string(JSON o3de_display_version ERROR_VARIABLE manifest_json_error GET ${manifest_json_data} ${o3de_display_version_key})

# During development the engine display version is not used
if (o3de_display_version STREQUAL "00.00" OR o3de_display_version STREQUAL "0.1.0.0")
set(PK_O3DE_DEVELOPMENT ON)
set(o3de_build_number ${PK_O3DE_ENGINE_VERSION_LATEST})
else ()
message(FATAL_ERROR "Could not determine the engine version using O3DEVersion in 'engine.json'. Please set PK_O3DE_ENGINE_VERSION in the PopcornFX CMakeLists.txt.")
string(JSON o3de_build_number ERROR_VARIABLE manifest_json_error GET ${manifest_json_data} ${o3de_build_number_key})
if (manifest_json_error OR o3de_build_number STREQUAL "" OR o3de_build_number STREQUAL "0")
message(FATAL_ERROR "Invalid ${o3de_build_number_key} or ${o3de_display_version_key} in 'engine.json'. Please set PK_O3DE_ENGINE_VERSION in the PopcornFX CMakeLists.txt.")
endif()
endif()
endif()

# Note: converting a float to string may result in a bad conversion
# e.g. 2111.2 becomes the string 2111.1999999999998
string(REPLACE "." ";" o3de_version_list ${o3de_build_number})
list(GET o3de_version_list 0 PK_O3DE_MAJOR_VERSION)
list(GET o3de_version_list 1 PK_O3DE_PATCH_VERSION)
Expand Down
6 changes: 3 additions & 3 deletions Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://www.popcornfx.com/terms-and-conditions/
#----------------------------------------------------------------------------

set(POPCORNFX_VERSION 2.15.0)
set(POPCORNFX_VERSION 2.15.1)
set(POPCORNFX_LICENSE O3DE)

if (PK_O3DE_MAJOR_VERSION GREATER_EQUAL 2205)
Expand Down Expand Up @@ -70,10 +70,10 @@ ly_add_target(
Gem::EMotionFXStaticLib
Gem::PhysX.Static
AUTOGEN_RULES
*.ScriptCanvasGrammar.xml,ScriptCanvasGrammar_Header.jinja,$path/$fileprefix.generated.h
*.ScriptCanvasGrammar.xml,ScriptCanvasGrammar_Source.jinja,$path/$fileprefix.generated.cpp
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Header.jinja,$path/$fileprefix.generated.h
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Source.jinja,$path/$fileprefix.generated.cpp
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeableRegistry_Header.jinja,AutoGenNodeableRegistry.generated.h
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeableRegistry_Source.jinja,AutoGenNodeableRegistry.generated.cpp
)

ly_add_target(
Expand Down
4 changes: 2 additions & 2 deletions Code/Platform/Linux/PAL_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
set(package_name PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-linux)
set(pk_package_hash 4c12e26068dd1a4dbb9e27f4b2a58a8caa9b6d9c06fed95b0b3f053cbf6a725f)
set(pk_package_id rufLTFLedQsA4UhG)
set(pk_package_hash 30f7029a55747110939871b8e986c62286ef57ac7b7ddd43cba0fb5e1384b65a)
set(pk_package_id EdsvY32VSvDQe3qy)

ly_associate_package(PACKAGE_NAME ${package_name} TARGETS PopcornFX PACKAGE_HASH ${pk_package_hash})
pk_download_package_ifn(${package_name} ${pk_package_id})
Expand Down
4 changes: 2 additions & 2 deletions Code/Platform/Mac/PAL_mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
set(package_name PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-mac)
set(pk_package_hash 3adf373359e98b8d23c02e0c6ac0fa04e06870d2e6eb4f0a8e3302768c1409d3)
set(pk_package_id q6d4XffNtKv4qmbp)
set(pk_package_hash 400b05d3f859d7284179f5c74272c8b2f5f39edecaf1ac24a69ba259b15eda6f)
set(pk_package_id Mz7M3nRZ2UUnB6wA)

ly_associate_package(PACKAGE_NAME ${package_name} TARGETS PopcornFX PACKAGE_HASH ${pk_package_hash})
pk_download_package_ifn(${package_name} ${pk_package_id})
Expand Down
4 changes: 2 additions & 2 deletions Code/Platform/Windows/PAL_windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
set(package_name PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-windows)
set(pk_package_hash 6ae1caf1b3cba3a654a3e005645280c53175cfa6b41da2a56946a73aa12a7946)
set(pk_package_id Dhc7UYALnRcGdDG6)
set(pk_package_hash 5a7e8d039ff0afca2258ffc18f0d898b187df4295fa5fbeff8a8a8b219db49bf)
set(pk_package_id JZ5xq6pVT8uMutN8)

ly_associate_package(PACKAGE_NAME ${package_name} TARGETS PopcornFX PACKAGE_HASH ${pk_package_hash})
pk_download_package_ifn(${package_name} ${pk_package_id})
Expand Down
6 changes: 0 additions & 6 deletions Code/Source/PopcornFXModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "Components/Helpers/PopcornFXHelperProfilerGameComponent.h"

#include "PopcornFXSystemComponent.h"
#include "ScriptCanvas/PopcornFXLibrary.h"

namespace PopcornFX {

Expand Down Expand Up @@ -86,11 +85,6 @@ namespace PopcornFX {
PopcornFXBuilderComponent::CreateDescriptor(),
#endif // POPCORNFX_BUILDER
});

//-------- ScriptCanvas Folder
AZStd::vector<AZ::ComponentDescriptor*> componentDescriptors(PopcornFXLibrary::GetComponentDescriptors());
m_descriptors.insert(m_descriptors.end(), componentDescriptors.begin(), componentDescriptors.end());
//--------
}

/**
Expand Down
19 changes: 19 additions & 0 deletions Code/Source/PopcornFXPreviewersSystemComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,29 @@

#include "PopcornFXPreviewersSystemComponent.h"

#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/StringFunc/StringFunc.h>

namespace PopcornFX {

void PopcornFXPreviewersSystemComponent::Reflect(AZ::ReflectContext *context)
{
if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context); serialize)
{
serialize->Class<PopcornFXPreviewersSystemComponent>()->Version(0);
}
}

void PopcornFXPreviewersSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType &provided)
{
provided.push_back(AZ_CRC("PopcornFXPreviewersService"));
}

void PopcornFXPreviewersSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType &incompatible)
{
incompatible.push_back(AZ_CRC("PopcornFXPreviewersService"));
}

void PopcornFXPreviewersSystemComponent::Init()
{
// Curently, only one previewer factory for effect assets, we could have others added in a list.
Expand Down
6 changes: 3 additions & 3 deletions Code/Source/PopcornFXPreviewersSystemComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ namespace PopcornFX {
PopcornFXPreviewersSystemComponent() = default;
~PopcornFXPreviewersSystemComponent() override = default;

static void Reflect(AZ::ReflectContext *context) { AZ_UNUSED(context); }
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType &provided) { AZ_UNUSED(provided); }
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType &incompatible) { AZ_UNUSED(incompatible); }
static void Reflect(AZ::ReflectContext *context);
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType &provided);
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType &incompatible);
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType &required) { AZ_UNUSED(required); }
static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType &dependent) { AZ_UNUSED(dependent); }

Expand Down
13 changes: 6 additions & 7 deletions Code/Source/PopcornFXSystemComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
#include "Integration/Render/AtomIntegration/PopcornFXFeatureProcessor.h"
#include "Asset/PopcornFXAsset.h"
#include "Asset/PopcornFXAssetHandler.h"
#include "ScriptCanvas/PopcornFXLibrary.h"

#include <AutoGenNodeableRegistry.generated.h>
#include <AutoGenGrammarRegistry.generated.h>

REGISTER_SCRIPTCANVAS_AUTOGEN_NODEABLE(PopcornFXStatic);

namespace PopcornFX {

Expand Down Expand Up @@ -77,7 +81,6 @@ namespace PopcornFX {
->Event("ProfilerSetEnable", &PopcornFXProfilerRequestBus::Events::ProfilerSetEnable)
;
}
PopcornFXLibrary::Reflect(context);
}

void PopcornFXSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType &provided)
Expand All @@ -92,7 +95,7 @@ namespace PopcornFX {

void PopcornFXSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType &required)
{
(void)required;
AZ_UNUSED(required);
}

void PopcornFXSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType &dependent)
Expand All @@ -103,10 +106,6 @@ namespace PopcornFX {

void PopcornFXSystemComponent::Init()
{
if (ScriptCanvas::GetNodeRegistry().IsConstructed())
{
PopcornFXLibrary::InitNodeRegistry(ScriptCanvas::GetNodeRegistry().Get());
}
}

void PopcornFXSystemComponent::Activate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

<ScriptCanvas Include="Source/ScriptCanvas/PopcornFXBroadcastNodeable.h" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Class Name="PopcornFXBroadcastNodeable"
Namespace="PopcornFX"
QualifiedName="PopcornFX::PopcornFXBroadcastNodeable"
PreferredClassName="PopcornFX Broadcast"
Base="ScriptCanvas::Nodeable"
Icon="Icons/ScriptCanvas/Bus.png"
EditAttributes="AZ::Edit::Attributes::Category@PopcornFX/Event"
GraphEntryPoint="True"
GeneratePropertyFriend="True"
Description="PopcornFX Broadcast">
Namespace="PopcornFX"
QualifiedName="PopcornFX::PopcornFXBroadcastNodeable"
PreferredClassName="PopcornFX Broadcast"
Category="PopcornFX"
GraphEntryPoint="True"
Description="PopcornFX Broadcast">

<Output Name="Broadcast" Description="Signal triggered when the FX broadcast an event." />
<Output Name="Broadcast" Description="Signal triggered when the FX broadcast an event." />

<Input Name="Connect Event" Description="Connect to FX event name.">
<Parameter Name="Event Name" Type="AZStd::string" Description="The broadcasted event name we listen to."/>
<Parameter Name="Entity Id" Type="AZ::EntityId" Description="The entity id of the effect."/>
</Input>/>
<Input Name="Connect Event" Description="Connect to FX event name.">
<Parameter Name="Event Name" Type="AZStd::string" Description="The broadcasted event name we listen to."/>
<Parameter Name="Entity Id" Type="AZ::EntityId" Description="The entity id of the effect."/>
</Input>/>
</Class>
</ScriptCanvas>
52 changes: 0 additions & 52 deletions Code/Source/ScriptCanvas/PopcornFXLibrary.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions Code/Source/ScriptCanvas/PopcornFXLibrary.h

This file was deleted.

10 changes: 6 additions & 4 deletions Code/popcornfx_autogen_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# https://www.popcornfx.com/terms-and-conditions/
#----------------------------------------------------------------------------

get_property(scriptcanvas_gem_root GLOBAL PROPERTY "@GEMROOT:ScriptCanvas@")

set(FILES
${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Header.jinja
${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Source.jinja
${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Header.jinja
${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Source.jinja
${scriptcanvas_gem_root}/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Header.jinja
${scriptcanvas_gem_root}/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Source.jinja
${scriptcanvas_gem_root}/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeableRegistry_Header.jinja
${scriptcanvas_gem_root}/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeableRegistry_Source.jinja
)

2 changes: 0 additions & 2 deletions Code/popcornfx_shared_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ set(FILES
Source/ScriptCanvas/PopcornFXBroadcastNodeable.cpp
Source/ScriptCanvas/PopcornFXBroadcastNodeable.h
Source/ScriptCanvas/PopcornFXBroadcastNodeable.ScriptCanvasNodeable.xml
Source/ScriptCanvas/PopcornFXLibrary.cpp
Source/ScriptCanvas/PopcornFXLibrary.h
Source/Integration/PopcornFXStartUpdate.cpp
Source/Integration/PopcornFXStartUpdate.h
Source/Integration/PopcornFXStopUpdate.cpp
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# O3DE PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **O3DE** as a Gem.
* **Version:** `v2.15.0`
* **Version:** `v2.15.1`
* **O3DE:** `21.11`, `21.11.2`, `22.05.0`, `22.10.0`
* **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android`

Expand Down
8 changes: 4 additions & 4 deletions gem.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"gem_name": "PopcornFX",
"display_name": "PopcornFX",
"display_name": "PopcornFX 2.15.1",
"license": "Community",
"license_url": "https://www.popcornfx.com/popcornfx-community-license",
"origin": "Persistant Studios - popcornfx.com",
"repo_uri": "https://downloads.popcornfx.com/o3de-repo",
"origin_uri": "https://downloads.popcornfx.com/o3de-repo/PopcornFX-2.15/O3DE_PopcornFXGem_v2.15.0_Win64_Linux64_Mac64.zip",
"version": "2.15.0",
"last_updated": "2023-01-19",
"origin_uri": "https://downloads.popcornfx.com/o3de-repo/PopcornFX-2.15/O3DE_PopcornFXGem_v2.15.1_Win64_Linux64_Mac64.zip",
"version": "2.15.1",
"last_updated": "2023-01-26",
"type": "Code",
"summary": "The PopcornFX Gem provides real-time FX solution for particle effects.",
"canonical_tags": [
Expand Down

0 comments on commit 58c151a

Please sign in to comment.