diff --git a/Assets/PopcornFX_Dependencies.xml b/Assets/PopcornFX_Dependencies.xml index 71a5890..4b6bdd9 100644 --- a/Assets/PopcornFX_Dependencies.xml +++ b/Assets/PopcornFX_Dependencies.xml @@ -37,4 +37,5 @@ + diff --git a/Code/CMakeLists.txt b/Code/CMakeLists.txt index 7cbb325..b175bb5 100644 --- a/Code/CMakeLists.txt +++ b/Code/CMakeLists.txt @@ -3,7 +3,7 @@ # https://www.popcornfx.com/terms-and-conditions/ #---------------------------------------------------------------------------- -set(POPCORNFX_VERSION 2.18.1) +set(POPCORNFX_VERSION 2.18.2) set(POPCORNFX_LICENSE O3DE) if (PK_O3DE_MAJOR_VERSION GREATER_EQUAL 2205) @@ -33,6 +33,22 @@ ly_add_target( Include ) +set(PK_OPTIONAL_REGISTER_NODEABLE_FILES + *.ScriptCanvasNodeable.xml,ScriptCanvasNodeableRegistry_Header.jinja,AutoGenNodeableRegistry.generated.h + *.ScriptCanvasNodeable.xml,ScriptCanvasNodeableRegistry_Source.jinja,AutoGenNodeableRegistry.generated.cpp + ) +set(PK_OPTIONAL_REGISTER_NODEABLE_DEFINES PK_REGISTER_NODEABLE) + +if(DEFINED O3DE_VERSION_MAJOR) + # O3DE 3.x.x and higher no longer need the autogen nodeable registry source files + # Also include special case to handle bug where SDK 23.05.0 engine version was set to the display version + if(O3DE_VERSION_MAJOR GREATER_EQUAL 3 AND + NOT (O3DE_VERSION_MAJOR EQUAL 23 AND O3DE_VERSION_MINOR EQUAL 05 AND O3DE_VERSION_PATCH EQUAL 0)) + unset(PK_OPTIONAL_REGISTER_NODEABLE_FILES) + unset(PK_OPTIONAL_REGISTER_NODEABLE_DEFINES) + endif() +endif() + ly_add_target( NAME PopcornFX.Static STATIC NAMESPACE Gem @@ -46,6 +62,7 @@ ly_add_target( PK_USE_PHYSX PK_USE_EMOTIONFX PK_USE_STARTINGPOINTINPUT + ${PK_OPTIONAL_REGISTER_NODEABLE_DEFINES} INCLUDE_DIRECTORIES PRIVATE Source @@ -72,8 +89,7 @@ ly_add_target( AUTOGEN_RULES *.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 + ${PK_OPTIONAL_REGISTER_NODEABLE_FILES} ) ly_add_target( diff --git a/Code/Source/Integration/Startup/PopcornFxStartup.cpp b/Code/Source/Integration/Startup/PopcornFxStartup.cpp index 0e48a0e..5822530 100644 --- a/Code/Source/Integration/Startup/PopcornFxStartup.cpp +++ b/Code/Source/Integration/Startup/PopcornFxStartup.cpp @@ -85,6 +85,23 @@ namespace PopcornFX { }; } }; +#else + class CLogListenerO3DERelease : public ILogListener + { + public: + virtual void Notify(CLog::ELogLevel level, CGuid logClass, const char* message) override + { + const CString s = CString::Format("[%s] ERROR: %s", CLog::LogClassToString(logClass), message); + + switch (level) + { + case PopcornFX::CLog::Level_Error: + case PopcornFX::CLog::Level_ErrorCritical: + AZ_Printf("PopcornFX", s.Data()); + break; + }; + } + }; #endif //---------------------------------------------------------------------------- @@ -95,6 +112,8 @@ namespace PopcornFX { #ifndef PK_RETAIL CLog::AddGlobalListener(PK_NEW(CLogListenerO3DE)); +#else + CLog::AddGlobalListener(PK_NEW(CLogListenerO3DERelease)); #endif } diff --git a/Code/Source/PopcornFXSystemComponent.cpp b/Code/Source/PopcornFXSystemComponent.cpp index 231d7ca..8ee3d59 100644 --- a/Code/Source/PopcornFXSystemComponent.cpp +++ b/Code/Source/PopcornFXSystemComponent.cpp @@ -20,10 +20,14 @@ #include "Asset/PopcornFXAsset.h" #include "Asset/PopcornFXAssetHandler.h" +// Logic for setting PK_REGISTER_NODEABLE is in Code/CMakeLists.txt +#if PK_REGISTER_NODEABLE +// In O3DE versions less than 3.x.x we need to register autogenerated nodeables #include #include REGISTER_SCRIPTCANVAS_AUTOGEN_NODEABLE(PopcornFXStatic); +#endif namespace PopcornFX { diff --git a/Code/popcornfx_autogen_files.cmake b/Code/popcornfx_autogen_files.cmake index a40dc29..68eaa61 100644 --- a/Code/popcornfx_autogen_files.cmake +++ b/Code/popcornfx_autogen_files.cmake @@ -5,10 +5,23 @@ get_property(scriptcanvas_gem_root GLOBAL PROPERTY "@GEMROOT:ScriptCanvas@") +set(PK_OPTIONAL_REGISTER_NODEABLE_FILES + ${scriptcanvas_gem_root}/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeableRegistry_Header.jinja + ${scriptcanvas_gem_root}/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeableRegistry_Source.jinja + ) + +if(DEFINED O3DE_VERSION_MAJOR) + # O3DE 3.x.x and higher no longer need the registry source files + # Also include special case to handle bug where SDK 23.05.0 engine version was set to the display version + if(O3DE_VERSION_MAJOR GREATER_EQUAL 3 AND + NOT (O3DE_VERSION_MAJOR EQUAL 23 AND O3DE_VERSION_MINOR EQUAL 05 AND O3DE_VERSION_PATCH EQUAL 0)) + unset(PK_OPTIONAL_REGISTER_NODEABLE_FILES) + endif() +endif() + set(FILES ${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 + ${PK_OPTIONAL_REGISTER_NODEABLE_FILES} ) diff --git a/README.md b/README.md index 83f0a41..7b5466b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # O3DE PopcornFX Plugin Integrates the **PopcornFX Runtime SDK** into **O3DE** as a Gem. -* **Version:** `v2.18.1` -* **O3DE:** `23.05` +* **Version:** `v2.18.2` +* **O3DE:** `23.05`, `23.10` * **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android` **Note:** Mobile platforms are in an experimental stage. [Contact-us](http://www.popcornfx.com/contact-us/) to request access. diff --git a/gem.json b/gem.json index c268769..5d45fce 100644 --- a/gem.json +++ b/gem.json @@ -1,6 +1,6 @@ { "gem_name": "PopcornFX", - "display_name": "PopcornFX 2.18.1", + "display_name": "PopcornFX 2.18.2", "license": "Community", "license_url": "https://www.popcornfx.com/popcornfx-community-license", "origin": "Persistant Studios - popcornfx.com",