Skip to content

Commit

Permalink
Merge branch 'v2.15-LTS' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
PopcornFX Bot committed Nov 30, 2023
2 parents c75cbd7 + 1ee0dbb commit 2937d0d
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 8 deletions.
1 change: 1 addition & 0 deletions Assets/PopcornFX_Dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@
<Dependency path="shaders/depth/billboard/depthpasstransparentminbillboard.azshadervarianttree" optional="true" />
<Dependency path="shaders/mesh/legacy/mesh_legacy.azshadervarianttree" optional="true" />
<Dependency path="shaders/mesh/legacy/meshlit_legacy.azshadervarianttree" optional="true" />
<Dependency path="library/popcornfxcore/materials/defaulttextures/*.streamingimage" optional="true" />
</EngineDependencies>
22 changes: 19 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.18.1)
set(POPCORNFX_VERSION 2.18.2)
set(POPCORNFX_LICENSE O3DE)

if (PK_O3DE_MAJOR_VERSION GREATER_EQUAL 2205)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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(
Expand Down
19 changes: 19 additions & 0 deletions Code/Source/Integration/Startup/PopcornFxStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

//----------------------------------------------------------------------------
Expand All @@ -95,6 +112,8 @@ namespace PopcornFX {

#ifndef PK_RETAIL
CLog::AddGlobalListener(PK_NEW(CLogListenerO3DE));
#else
CLog::AddGlobalListener(PK_NEW(CLogListenerO3DERelease));
#endif
}

Expand Down
4 changes: 4 additions & 0 deletions Code/Source/PopcornFXSystemComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <AutoGenNodeableRegistry.generated.h>
#include <AutoGenGrammarRegistry.generated.h>

REGISTER_SCRIPTCANVAS_AUTOGEN_NODEABLE(PopcornFXStatic);
#endif

namespace PopcornFX {

Expand Down
17 changes: 15 additions & 2 deletions Code/popcornfx_autogen_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gem.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 2937d0d

Please sign in to comment.