瀏覽代碼

Proper implementation of saving parameters and the state of the EditorGeomNodesComponent
Fixed issue with installed/distributable o3de setup.

Signed-off-by: Jason Dela Cruz <[email protected]>

Jason Dela Cruz 2 年之前
父節點
當前提交
ba13c63858
共有 32 個文件被更改,包括 508 次插入194 次删除
  1. 15 3
      Gems/O3DE/GeomNodes/CMakeLists.txt
  2. 51 43
      Gems/O3DE/GeomNodes/Code/CMakeLists.txt
  3. 4 2
      Gems/O3DE/GeomNodes/Code/Include/GeomNodes/GeomNodesBus.h
  4. 31 0
      Gems/O3DE/GeomNodes/Code/Include/GeomNodes/GeomNodesTypeIds.h
  5. 78 0
      Gems/O3DE/GeomNodes/Code/Source/Editor/Common/GNAPI.cpp
  6. 30 0
      Gems/O3DE/GeomNodes/Code/Source/Editor/Common/GNAPI.h
  7. 97 39
      Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.cpp
  8. 5 3
      Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.h
  9. 5 0
      Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesSystemComponent.cpp
  10. 2 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesSystemComponent.h
  11. 2 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Modules/GeomNodesEditorModule.cpp
  12. 22 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNMeshData.cpp
  13. 6 0
      Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNMeshData.h
  14. 5 5
      Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNModelData.cpp
  15. 2 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNRenderMesh.h
  16. 2 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNRenderMeshInterface.h
  17. 5 3
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNInstance.cpp
  18. 1 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNInstance.h
  19. 71 40
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNProperty.cpp
  20. 8 6
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNProperty.h
  21. 2 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNSystemInterface.h
  22. 3 3
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GeomNodesSystem.cpp
  23. 2 1
      Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GeomNodesSystem.h
  24. 7 13
      Gems/O3DE/GeomNodes/Code/Source/GeomNodes/Components/GeomNodesSystemComponent.cpp
  25. 2 2
      Gems/O3DE/GeomNodes/Code/Source/GeomNodes/Components/GeomNodesSystemComponent.h
  26. 2 3
      Gems/O3DE/GeomNodes/Code/Source/GeomNodes/Modules/GeomNodesModule.cpp
  27. 33 0
      Gems/O3DE/GeomNodes/Code/Source/GeomNodesModuleInterface.cpp
  28. 8 20
      Gems/O3DE/GeomNodes/Code/Source/GeomNodesModuleInterface.h
  29. 1 0
      Gems/O3DE/GeomNodes/Code/geomnodes_api_files.cmake
  30. 2 0
      Gems/O3DE/GeomNodes/Code/geomnodes_editor_private_files.cmake
  31. 1 0
      Gems/O3DE/GeomNodes/Code/geomnodes_private_files.cmake
  32. 3 1
      Gems/O3DE/GeomNodes/External/Bridge/CMakeLists.txt

+ 15 - 3
Gems/O3DE/GeomNodes/CMakeLists.txt

@@ -1,11 +1,23 @@
 
-set(gem_path ${CMAKE_CURRENT_LIST_DIR})
+# Query the gem name from the gem.json file if possible
+# otherwise fallback to using GeomNodes
+o3de_find_ancestor_gem_root(gem_path gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
+if (NOT gem_name)
+    set(gem_name "GeomNodes")
+endif()
+
+# Fallback to using the current source CMakeLists.txt directory as the gem root path
+if (NOT gem_path)
+    set(gem_path ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
+
 set(gem_json ${gem_path}/gem.json)
+
 o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
 
-o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
 
-ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty)
+ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
 
 add_subdirectory(External)
 add_subdirectory(Code)

+ 51 - 43
Gems/O3DE/GeomNodes/Code/CMakeLists.txt

@@ -12,9 +12,14 @@ o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${
 # is supported by this platform.
 include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
 
-# The GeomNodes.API target declares the common interface that users of this gem should depend on in their targets
+# Check to see if building the Gem Modules are supported for the current platform
+if(NOT PAL_TRAIT_GEOMNODES_SUPPORTED)
+    return()
+endif()
+
+# The ${gem_name}.API target declares the common interface that users of this gem should depend on in their targets
 ly_add_target(
-    NAME GeomNodes.API INTERFACE
+    NAME ${gem_name}.API INTERFACE
     NAMESPACE Gem
     FILES_CMAKE
         geomnodes_api_files.cmake
@@ -24,13 +29,13 @@ ly_add_target(
             Include
     BUILD_DEPENDENCIES
         INTERFACE
-           AZ::AzCore
+            AZ::AzCore
 )
 
-# The GeomNodes.Private.Object target is an internal target
+# The ${gem_name}.Private.Object target is an internal target
 # It should not be used outside of this Gems CMakeLists.txt
 ly_add_target(
-    NAME GeomNodes.Private.Object STATIC
+    NAME ${gem_name}.Private.Object STATIC
     NAMESPACE Gem
     FILES_CMAKE
         geomnodes_private_files.cmake
@@ -47,9 +52,9 @@ ly_add_target(
             AZ::AzFramework
 )
 
-# Here add GeomNodes target, it depends on the Private Object library and Public API interface
+# Here add ${gem_name} target, it depends on the Private Object library and Public API interface
 ly_add_target(
-    NAME GeomNodes ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
+    NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
     NAMESPACE Gem
     FILES_CMAKE
         geomnodes_shared_files.cmake
@@ -61,26 +66,26 @@ ly_add_target(
             Source
     BUILD_DEPENDENCIES
         PUBLIC
-            Gem::GeomNodes.API
+            Gem::${gem_name}.API
         PRIVATE
-            Gem::GeomNodes.Private.Object
+            Gem::${gem_name}.Private.Object
 )
 
-# By default, we will specify that the above target GeomNodes would be used by
+# By default, we will specify that the above target ${gem_name} would be used by
 # Client and Server type targets when this gem is enabled.  If you don't want it
 # active in Clients or Servers by default, delete one of both of the following lines:
-ly_create_alias(NAME GeomNodes.Clients NAMESPACE Gem TARGETS Gem::GeomNodes)
-ly_create_alias(NAME GeomNodes.Servers NAMESPACE Gem TARGETS Gem::GeomNodes)
+ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
+ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
 
-# For the Client and Server variants of GeomNodes Gem, an alias to the GeomNodes.API target will be made
-ly_create_alias(NAME GeomNodes.Clients.API NAMESPACE Gem TARGETS Gem::GeomNodes.API)
-ly_create_alias(NAME GeomNodes.Servers.API NAMESPACE Gem TARGETS Gem::GeomNodes.API)
+# For the Client and Server variants of ${gem_name} Gem, an alias to the ${gem_name}.API target will be made
+ly_create_alias(NAME ${gem_name}.Clients.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
+ly_create_alias(NAME ${gem_name}.Servers.API NAMESPACE Gem TARGETS Gem::${gem_name}.API)
 
-# If we are on a host platform, we want to add the host tools targets like the GeomNodes.Editor MODULE target
+# If we are on a host platform, we want to add the host tools targets like the ${gem_name}.Editor MODULE target
 if(PAL_TRAIT_BUILD_HOST_TOOLS)
-    # The GeomNodes.Editor.API target can be used by other gems that want to interact with the GeomNodes.Editor module
+    # The ${gem_name}.Editor.API target can be used by other gems that want to interact with the ${gem_name}.Editor module
     ly_add_target(
-        NAME GeomNodes.Editor.API INTERFACE
+        NAME ${gem_name}.Editor.API INTERFACE
         NAMESPACE Gem
         FILES_CMAKE
             geomnodes_editor_api_files.cmake
@@ -93,37 +98,38 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
                 AZ::AzToolsFramework
     )
 
-    # The GeomNodes.Editor.Private.Object target is an internal target
+    # The ${gem_name}.Editor.Private.Object target is an internal target
     # which is only to be used by this gems CMakeLists.txt and any subdirectories
     # Other gems should not use this target
     ly_add_target(
-        NAME GeomNodes.Editor.Private.Object STATIC
+        NAME ${gem_name}.Editor.Private.Object STATIC
         NAMESPACE Gem
         AUTOMOC
         AUTOUIC
         FILES_CMAKE
             geomnodes_editor_private_files.cmake
+            ../External/Bridge/bridge_files.cmake
         TARGET_PROPERTIES
             O3DE_PRIVATE_TARGET TRUE
         INCLUDE_DIRECTORIES
             PRIVATE
                 Include
                 Source
+                ../External/Bridge
         # COMPILE_DEFINITIONS
         #     PRIVATE
         #         DEBUG_SCRIPT_USING_ID=123456
         BUILD_DEPENDENCIES
             PUBLIC
                 AZ::AzToolsFramework
+                $<TARGET_OBJECTS:Gem::${gem_name}.Private.Object>
                 Gem::Atom_RPI.Public
                 Gem::Atom_Feature_Common.Static
                 Gem::AtomLyIntegration_CommonFeatures.Static
-                $<TARGET_OBJECTS:Gem::GeomNodes.Private.Object>
-                GeomNodes::Bridge
     )
 
     ly_add_target(
-        NAME GeomNodes.Editor GEM_MODULE
+        NAME ${gem_name}.Editor GEM_MODULE
         NAMESPACE Gem
         AUTOMOC
         FILES_CMAKE
@@ -135,20 +141,20 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
                 Include
         BUILD_DEPENDENCIES
             PUBLIC
-                Gem::GeomNodes.Editor.API
+                Gem::${gem_name}.Editor.API
             PRIVATE
-                Gem::GeomNodes.Editor.Private.Object
+                Gem::${gem_name}.Editor.Private.Object
     )
 
-    # By default, we will specify that the above target GeomNodes would be used by
+    # By default, we will specify that the above target ${gem_name} would be used by
     # Tool and Builder type targets when this gem is enabled.  If you don't want it
     # active in Tools or Builders by default, delete one of both of the following lines:
-    ly_create_alias(NAME GeomNodes.Tools    NAMESPACE Gem TARGETS Gem::GeomNodes.Editor)
-    ly_create_alias(NAME GeomNodes.Builders NAMESPACE Gem TARGETS Gem::GeomNodes.Editor)
+    ly_create_alias(NAME ${gem_name}.Tools    NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
+    ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
 
-    # For the Tools and Builders variants of GeomNodes Gem, an alias to the GeomNodes.Editor API target will be made
-    ly_create_alias(NAME GeomNodes.Tools.API NAMESPACE Gem TARGETS Gem::GeomNodes.Editor.API)
-    ly_create_alias(NAME GeomNodes.Builders.API NAMESPACE Gem TARGETS Gem::GeomNodes.Editor.API)
+    # For the Tools and Builders variants of ${gem_name} Gem, an alias to the ${gem_name}.Editor API target will be made
+    ly_create_alias(NAME ${gem_name}.Tools.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
+    ly_create_alias(NAME ${gem_name}.Builders.API NAMESPACE Gem TARGETS Gem::${gem_name}.Editor.API)
 
 endif()
 
@@ -157,11 +163,11 @@ endif()
 ################################################################################
 # See if globally, tests are supported
 if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
-    # We globally support tests, see if we support tests on this platform for GeomNodes.Tests
+    # We globally support tests, see if we support tests on this platform for ${gem_name}.Tests
     if(PAL_TRAIT_GEOMNODES_TEST_SUPPORTED)
-        # We support GeomNodes.Tests on this platform, add dependency on the Private Object target
+        # We support ${gem_name}.Tests on this platform, add dependency on the Private Object target
         ly_add_target(
-            NAME GeomNodes.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+            NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
             NAMESPACE Gem
             FILES_CMAKE
                 geomnodes_tests_files.cmake
@@ -169,16 +175,17 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
                 PRIVATE
                     Tests
                     Source
+                    Include
             BUILD_DEPENDENCIES
                 PRIVATE
                     AZ::AzTest
                     AZ::AzFramework
-                    Gem::GeomNodes.Private.Object
+                    Gem::${gem_name}.Private.Object
         )
 
-        # Add GeomNodes.Tests to googletest
+        # Add ${gem_name}.Tests to googletest
         ly_add_googletest(
-            NAME Gem::GeomNodes.Tests
+            NAME Gem::${gem_name}.Tests
         )
     endif()
 
@@ -186,10 +193,10 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
     if(PAL_TRAIT_BUILD_HOST_TOOLS)
         # We are a host platform, see if Editor tests are supported on this platform
         if(PAL_TRAIT_GEOMNODES_EDITOR_TEST_SUPPORTED)
-            # We support GeomNodes.Editor.Tests on this platform, add GeomNodes.Editor.Tests target which depends on
-            # private GeomNodes.Editor.Private.Object target
+            # We support ${gem_name}.Editor.Tests on this platform, add ${gem_name}.Editor.Tests target which depends on
+            # private ${gem_name}.Editor.Private.Object target
             ly_add_target(
-                NAME GeomNodes.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
+                NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
                 NAMESPACE Gem
                 FILES_CMAKE
                     geomnodes_editor_tests_files.cmake
@@ -197,15 +204,16 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
                     PRIVATE
                         Tests
                         Source
+                        Include
                 BUILD_DEPENDENCIES
                     PRIVATE
                         AZ::AzTest
-                        Gem::GeomNodes.Private.Object
+                        Gem::${gem_name}.Editor.Private.Object
             )
 
-            # Add GeomNodes.Editor.Tests to googletest
+            # Add ${gem_name}.Editor.Tests to googletest
             ly_add_googletest(
-                NAME Gem::GeomNodes.Editor.Tests
+                NAME Gem::${gem_name}.Editor.Tests
             )
         endif()
     endif()

+ 4 - 2
Gems/O3DE/GeomNodes/Code/Include/GeomNodes/GeomNodesBus.h

@@ -1,6 +1,8 @@
 
 #pragma once
 
+#include <GeomNodes/GeomNodesTypeIds.h>
+
 #include <AzCore/EBus/EBus.h>
 #include <AzCore/Interface/Interface.h>
 
@@ -9,11 +11,11 @@ namespace GeomNodes
     class GeomNodesRequests
     {
     public:
-        AZ_RTTI(GeomNodesRequests, "{B09157F9-452C-41AE-91F5-578D6EB2C425}");
+        AZ_RTTI(GeomNodesRequests, GeomNodesRequestsTypeId);
         virtual ~GeomNodesRequests() = default;
         // Put your public methods here
     };
-    
+
     class GeomNodesBusTraits
         : public AZ::EBusTraits
     {

+ 31 - 0
Gems/O3DE/GeomNodes/Code/Include/GeomNodes/GeomNodesTypeIds.h

@@ -0,0 +1,31 @@
+
+#pragma once
+
+namespace GeomNodes
+{
+    // System Component TypeIds
+    inline constexpr const char* GeomNodesSystemComponentTypeId = "{E9264AFB-2C90-4438-B689-52AD2A9A0D67}";
+    inline constexpr const char* GeomNodesEditorSystemComponentTypeId = "{EACD840D-4AEC-44FB-A6BD-BCF091E07761}";
+
+    // Module derived classes TypeIds
+    inline constexpr const char* GeomNodesModuleInterfaceTypeId = "{835A3807-95B6-4420-948E-2790015DDA39}";
+    inline constexpr const char* GeomNodesModuleTypeId = "{0B4471BC-6720-4B1A-846E-CFA27F5C64CB}";
+    // The Editor Module by default is mutually exclusive with the Client Module
+    // so they use the Same TypeId
+    inline constexpr const char* GeomNodesEditorModuleTypeId = GeomNodesModuleTypeId;
+
+    // Interface TypeIds
+    inline constexpr const char* GeomNodesRequestsTypeId = "{A5ECC740-0242-4ED8-A4BB-DFC9B5CBAD44}";
+
+    // Other TypeIds
+    inline constexpr const char* GNRenderMeshTypeId = "{4E293CD2-F9E6-417C-92B7-DDAF312F46CF}";
+    inline constexpr const char* GNRenderMeshInterfaceTypeId = "{908CB056-4814-42FF-9D60-2D67A720D829}";
+    inline constexpr const char* GeomNodesSystemTypeId = "{23791BF8-D9DE-4827-88D8-37DA39258570}";
+    inline constexpr const char* GNPropertyTypeId = "{71904E43-F0A1-45EA-B87F-4CC5234E1E52}";
+    inline constexpr const char* GNParamNilTypeId = "{519D98C7-054A-4047-BCEB-28DCD38CFCD4}";
+    inline constexpr const char* GNParamBooleanTypeId = "{6A05BCAB-50F7-4988-96E1-0EDB6B76C3A3}";
+    inline constexpr const char* GNParamIntTypeId = "{B2457A3D-F30C-43F9-90F0-5BFAFFFD0F59}";
+    inline constexpr const char* GNParamValueTypeId = "{4790660B-B942-4421-B942-AE27DF67BF4F}";
+    inline constexpr const char* GNParamStringTypeId = "{9296C827-0281-4DBF-AC1A-B6636BCEC716}";
+    inline constexpr const char* GNSystemInterfaceTypeId = "{83173679-DAF6-4496-BEFA-B0D252C40366}";
+} // namespace GeomNodes

+ 78 - 0
Gems/O3DE/GeomNodes/Code/Source/Editor/Common/GNAPI.cpp

@@ -0,0 +1,78 @@
+#include <Editor/Common/GNAPI.h>
+
+namespace GeomNodes
+{
+    namespace API
+    {
+        bool Init(u64 id, HandlerCallback cb)
+        {
+#ifdef USE_BRIDGE
+            return ::Init(id, cb);
+#else
+            (void)id;
+            (void)cb;
+            return false;
+#endif
+        }
+
+        void Uninitialize()
+        {
+#ifdef USE_BRIDGE
+            ::Uninitialize();
+#endif
+        }
+
+        void SendMsg(const char* data, u64 length, u64 id)
+        {
+#ifdef USE_BRIDGE
+            ::SendMsg(data, length, id);
+#else
+            (void)data;
+            (void)length;
+            (void)id;
+#endif
+        }
+
+        bool ReadMsg(char* buffer, u64 length)
+        {
+#ifdef USE_BRIDGE
+            return ::ReadMsg(buffer, length);
+#else
+            (void)buffer;
+            (void)length;
+            return false;
+#endif
+        }
+
+        bool OpenSHM(u64 mapId)
+        {
+#ifdef USE_BRIDGE
+            return ::OpenSHM(mapId);
+#else
+            (void)mapId;
+            return false;
+#endif
+        }
+
+        bool ReadSHM(u64 uId, void** address, u64* length)
+        {
+#ifdef USE_BRIDGE
+            return ::ReadSHM(uId, address, length);
+#else
+            (void)uId;
+            (void)address;
+            (void)length;
+            return false;
+#endif
+        }
+
+        void ClearSHM(u64 uId)
+        {
+#ifdef USE_BRIDGE
+            ::ClearSHM(uId);
+#else
+            (void)uId;
+#endif
+        }
+    } // namespace API
+} // namespace GeomNodes

+ 30 - 0
Gems/O3DE/GeomNodes/Code/Source/Editor/Common/GNAPI.h

@@ -0,0 +1,30 @@
+
+#pragma once
+#define USE_BRIDGE
+#ifdef USE_BRIDGE
+#include <Bridge.h>
+#else
+#ifndef SERVER_ID
+#define SERVER_ID 1
+#endif
+
+typedef unsigned long long u64;
+typedef unsigned int u32;
+
+typedef long (*HandlerCallback)(u64, const char*, u64);
+#endif
+namespace GeomNodes
+{
+    namespace API
+    {
+        bool Init(u64 id, HandlerCallback cb);
+        void Uninitialize();
+        void SendMsg(const char* data, u64 length, u64 id);
+        bool ReadMsg(char* buffer, u64 length);
+
+        // map related
+        bool OpenSHM(u64 mapId);
+        bool ReadSHM(u64 uId, void** address, u64* length);
+        void ClearSHM(u64 uId);
+    } // namespace API
+} // namespace GeomNodes

+ 97 - 39
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.cpp

@@ -13,6 +13,7 @@
 #include <Atom/Feature/Mesh/MeshFeatureProcessorInterface.h>
 #include <Atom/RPI.Public/Scene.h>
 #include <AzCore/Component/NonUniformScaleBus.h>
+#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
 
 namespace GeomNodes
 {
@@ -33,7 +34,13 @@ namespace GeomNodes
             serializeContext->Class<EditorGeomNodesComponent, EditorComponentBase>()
                 ->Version(1)
                 ->Field("GNParamContext", &EditorGeomNodesComponent::m_paramContext)
-                ->Field("BlenderFile", &EditorGeomNodesComponent::m_blenderFile);
+                ->Field("BlenderFile", &EditorGeomNodesComponent::m_blenderFile)
+				->Field("ObjectNameList", &EditorGeomNodesComponent::m_enumValues)
+				->Field("ObjectInfos", &EditorGeomNodesComponent::m_defaultObjectInfos)
+				//->Field("CurrentObject", &EditorGeomNodesComponent::m_currentObject)
+                ->Field("CurrentObjectInfo", &EditorGeomNodesComponent::m_currentObjectInfo)
+                ->Field("IsInitialized", &EditorGeomNodesComponent::m_initialized)
+                ;
             
             GNParamContext::Reflect(context);
             
@@ -136,21 +143,50 @@ namespace GeomNodes
                 m_paramContext.m_group.Clear();
                 ClearDataElements();
                 m_initialized = false;
+                m_currentObjectInfo.clear();
+                SetWorkInProgress(true);
             }
 
             if (!m_instance || bClearParams || (m_instance && !m_instance->IsValid()))
             {
-				SetWorkInProgress(true);
-
                 if (m_instance)
                     delete m_instance;
+                else
+                    SetWorkInProgress(true);
 
                 const AZ::IO::FixedMaxPath gemPath = AZ::Utils::GetGemPath("GeomNodes");
                 const AZ::IO::FixedMaxPath exePath = AZ::Utils::GetExecutableDirectory();
+                AZ::IO::FixedMaxPath bridgePath = exePath / "Bridge.dll"; //TODO: make this platform agnostic
+                if (!AZ::IO::SystemFile::Exists(bridgePath.c_str()))
+                {
+                    auto registry = AZ::SettingsRegistry::Get();
+                    AZ::IO::FixedMaxPath projectBuildPath;
+                    if (!registry->Get(projectBuildPath.Native(), AZ::SettingsRegistryMergeUtils::ProjectBuildPath))
+                    {
+                        //TODO: error check
+                        //"No project build path setting was found in the user registry folder"
+                        return;
+                    }
+
+                    bridgePath = projectBuildPath / "bin/profile/Bridge.dll"; //TODO: check if there is a way to get "bin/profile" in the registry or somewhere and not hard coded.
+                    if (!AZ::IO::SystemFile::Exists(bridgePath.c_str()))
+                    {
+                        //TODO: bail out
+                        // we can't find the Bridge.dll
+                        return;
+                    }
+
+                    bridgePath = projectBuildPath / "bin/profile";
+                }
+                else
+                {
+                    bridgePath = exePath.c_str();
+                }
+
                 AZStd::string scriptPath = AZStd::string::format(R"(%s\External\Scripts\__init__.py)", gemPath.c_str());
 
                 m_instance = new GNInstance;
-                m_instance->Init(path, scriptPath, exePath.c_str(), GetEntityId());
+                m_instance->Init(path, scriptPath, bridgePath.c_str(), GetEntityId());
                 if (m_instance->IsValid())
                 {
                     //AZ::EntityId entityId = AZ::EntityId(123456);
@@ -167,23 +203,29 @@ namespace GeomNodes
     {
         SetWorkInProgress(true);
         
-        auto gnParam = reinterpret_cast<GNParamString*>(m_paramContext.m_group.GetProperty(Field::Objects));
-        if (gnParam->m_value != m_currentObject)
+        if (m_paramContext.m_group.m_properties.size() > 0)
         {
-            m_currentObject = gnParam->m_value;
-            m_paramContext.m_group.Clear(); // clear the group/properties
-            CreateDataElements(m_paramContext.m_group);
+            // this checks if the user chooses another object.
+			auto gnParam = reinterpret_cast<GNParamString*>(m_paramContext.m_group.GetProperty(Field::Objects));
+			if (gnParam->m_value != m_currentObject)
+			{
+				m_currentObject = gnParam->m_value;
+				m_paramContext.m_group.Clear(); // clear the group/properties
+                CreateDataElements(m_paramContext.m_group);
+			}
         }
         
-        if(m_instance && !m_instance->IsValid())
+        if(m_instance)
         {
-            m_instance->RestartProcess();
+            if (!m_instance->IsValid())
+            {
+                m_instance->RestartProcess();
+            }
+            
+			m_currentObjectInfo = m_instance->SendParamUpdates(m_paramContext.m_group
+				.GetGroup(m_currentObject.c_str())->GetProperties(), m_currentObject);
         }
 
-        m_instance->SendParamUpdates(m_paramContext.m_group
-            .GetGroup(m_currentObject.c_str())->GetProperties()
-            , m_currentObject);
-        
         AZ_Printf("EditorGeomNodesComponent", "Parameter has changed");
     }
 
@@ -205,12 +247,11 @@ namespace GeomNodes
                     m_instance->RequestObjectParams();
                     m_initialized = true;
                 }
-                else
+                else if(m_fromActivate)
                 {
-                    // send messages that are queued.
-                    //SetWorkInProgress(false);
+                    OnParamChange();
                 }
-                
+                m_fromActivate = false;
             }
             else if (jsonDocument.HasMember(Field::ObjectNames) && jsonDocument.HasMember(Field::Objects) && jsonDocument.HasMember(Field::Materials))
             {
@@ -307,7 +348,6 @@ namespace GeomNodes
         // Load and save our param list object from json. Need this so it's faster to switch between objects and not need to send a request via IPC.
         LoadParams(objectArray);
 
-        // TODO: load from save point if any
         m_currentObject = m_enumValues[0];
     }
 
@@ -335,7 +375,7 @@ namespace GeomNodes
             rapidjson::PrettyWriter<rapidjson::StringBuffer> jsonDatawriter(jsonDataBuffer);
             (*itr).Accept(jsonDatawriter);
 
-            m_objectInfos.insert(AZStd::make_pair(objectName, jsonDataBuffer.GetString()));
+            m_defaultObjectInfos.insert(AZStd::make_pair(objectName, jsonDataBuffer.GetString()));
         }
     }
 
@@ -344,7 +384,7 @@ namespace GeomNodes
         ClearDataElements();
 
         // Create the combo box that will show the object names.
-        CreateObjectNames(m_enumValues, group);
+        CreateObjectNames(m_currentObject, m_enumValues, group);
 
         // Create the currently selected Object parameters and attributes. Load only the first or saved object.
         CreateParam(m_currentObject, group);
@@ -354,7 +394,7 @@ namespace GeomNodes
             &AzToolsFramework::ToolsApplicationRequests::Bus::Events::AddDirtyEntity, GetEntityId());
     }
 
-    void EditorGeomNodesComponent::CreateObjectNames(const StringVector& enumValues, GNPropertyGroup& group)
+    void EditorGeomNodesComponent::CreateObjectNames(const AZStd::string& objectName, const StringVector& enumValues, GNPropertyGroup& group)
     {
         ElementInfo ei;
         ei.m_editData.m_name = CacheString(Field::Objects);
@@ -363,7 +403,7 @@ namespace GeomNodes
         ei.m_sortOrder = FLT_MAX;
 
         auto gnParam = aznew GNParamString(Field::Objects, "", &m_workInProgress, GetEntityId());
-        gnParam->m_value = m_currentObject;
+        gnParam->m_value = objectName;
         
         ei.m_editData.m_attributes.push_back(
             AZ::Edit::AttributePair(AZ::Edit::Attributes::StringList, aznew AZ::AttributeContainerType<StringVector>(enumValues)));
@@ -375,22 +415,36 @@ namespace GeomNodes
 
     void EditorGeomNodesComponent::CreateParam(const AZStd::string& objectName, GNPropertyGroup& group)
     {
-        auto it = m_objectInfos.find(objectName);
-        if (it != m_objectInfos.end())
+        AZStd::string jsonBuffer;
+
+        if (m_currentObjectInfo.empty())
         {
-            rapidjson::Document jsonDocument;
-            jsonDocument.Parse((const char*)it->second.c_str(), it->second.size());
-            if (!jsonDocument.HasParseError())
-            {
-                GNPropertyGroup* subGroup = group.GetGroup(objectName.c_str());
-                if (subGroup == nullptr)
-                {
-                    group.m_groups.emplace_back();
-                    subGroup = &group.m_groups.back();
-                    subGroup->m_name = objectName;
-                }
-                LoadProperties(jsonDocument[Field::Params], *subGroup);
-            }
+			auto it = m_defaultObjectInfos.find(objectName);
+			if (it != m_defaultObjectInfos.end())
+			{
+				jsonBuffer = it->second;
+			}
+        }
+        else {
+			jsonBuffer = m_currentObjectInfo;
+        }
+        
+
+        if (!jsonBuffer.empty())
+        {
+			rapidjson::Document jsonDocument;
+			jsonDocument.Parse(jsonBuffer.c_str(), jsonBuffer.size());
+			if (!jsonDocument.HasParseError())
+			{
+				GNPropertyGroup* subGroup = group.GetGroup(objectName.c_str());
+				if (subGroup == nullptr)
+				{
+					group.m_groups.emplace_back();
+					subGroup = &group.m_groups.back();
+					subGroup->m_name = objectName;
+				}
+				LoadProperties(jsonDocument[Field::Params], *subGroup);
+			}
         }
     }
 
@@ -497,6 +551,10 @@ namespace GeomNodes
         EditorGeomNodesComponentRequestBus::Handler::BusConnect(GetEntityId());
         
         m_controller = AZStd::make_unique<GNMeshController>(GetEntityId());
+
+        m_fromActivate = true;
+
+        OnPathChange(m_blenderFile);
     }
 
     void EditorGeomNodesComponent::Deactivate()

+ 5 - 3
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.h

@@ -69,7 +69,7 @@ namespace GeomNodes
         void LoadObjectNames(const rapidjson::Value& objectNames);
         void LoadParams(const rapidjson::Value& objectArray);
         void CreateDataElements(GNPropertyGroup& group);
-        void CreateObjectNames(const StringVector& enumValues, GNPropertyGroup& group);
+        void CreateObjectNames(const AZStd::string& objectName, const StringVector& enumValues, GNPropertyGroup& group);
         void CreateParam(const AZStd::string& objectName, GNPropertyGroup& group);
         bool LoadProperties(const rapidjson::Value& paramVal, GNPropertyGroup& group);
         void LoadAttribute(ParamType type, AZ::Edit::ElementData& ed, GNProperty* prop);
@@ -86,7 +86,7 @@ namespace GeomNodes
         const char* CacheString(const char* str);
         AZStd::unordered_map<const void*, AZStd::string> m_cachedStrings;
         AZStd::unordered_map<const void*, ElementInfo> m_dataElements;
-        AZStd::unordered_map<AZStd::string, AZStd::string> m_objectInfos;
+        AZStd::unordered_map<AZStd::string, AZStd::string> m_defaultObjectInfos;
 
         StringVector m_enumValues;
 
@@ -96,11 +96,13 @@ namespace GeomNodes
 
         AZStd::string m_blenderFile;
         AZStd::string m_currentObject;
-        
+        AZStd::string m_currentObjectInfo; //!< in JSON form. This is the representation of the current selected object along with the current parameters.
+
         GNInstance* m_instance = nullptr;
         AzToolsFramework::EntityIdList m_entityIdList;
 
         bool m_initialized = false;
         bool m_workInProgress = false;
+        bool m_fromActivate = false;
     };
 }

+ 5 - 0
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesSystemComponent.cpp

@@ -4,10 +4,15 @@
 #include "EditorGeomNodesSystemComponent.h"
 #include <Editor/UI/EditorWindow.h>
 
+#include <GeomNodes/GeomNodesTypeIds.h>
+
 AZ_DEFINE_BUDGET(GeomNodes);
 
 namespace GeomNodes
 {
+    AZ_COMPONENT_IMPL(EditorGeomNodesSystemComponent, "EditorGeomNodesSystemComponent",
+        GeomNodesEditorSystemComponentTypeId, BaseSystemComponent);
+
     void EditorGeomNodesSystemComponent::Reflect(AZ::ReflectContext* context)
     {
         GNConfiguration::Reflect(context);

+ 2 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesSystemComponent.h

@@ -17,7 +17,8 @@ namespace GeomNodes
     {
         using BaseSystemComponent = GeomNodesSystemComponent;
     public:
-        AZ_COMPONENT(EditorGeomNodesSystemComponent, "{3B2D4C6C-C359-4890-8D78-0DDA7864131C}", BaseSystemComponent);
+        AZ_COMPONENT_DECL(EditorGeomNodesSystemComponent);
+        
         static void Reflect(AZ::ReflectContext* context);
 
         EditorGeomNodesSystemComponent();

+ 2 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Modules/GeomNodesEditorModule.cpp

@@ -1,4 +1,5 @@
 
+#include <GeomNodes/GeomNodesTypeIds.h>
 #include <GeomNodesModuleInterface.h>
 #include "Editor/Components/EditorGeomNodesSystemComponent.h"
 #include "Editor/Components/EditorGeomNodesComponent.h"
@@ -11,7 +12,7 @@ namespace GeomNodes
         : public GeomNodesModuleInterface
     {
     public:
-        AZ_RTTI(GeomNodesEditorModule, "{49C42A73-EF4E-4D42-8ECF-0ADE7F942CCD}", GeomNodesModuleInterface);
+        AZ_RTTI(GeomNodesEditorModule, GeomNodesEditorModuleTypeId, GeomNodesModuleInterface);
         AZ_CLASS_ALLOCATOR(GeomNodesEditorModule, AZ::SystemAllocator);
 
         GeomNodesEditorModule()

+ 22 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNMeshData.cpp

@@ -1,6 +1,5 @@
 #include <Editor/Rendering/GNMeshData.h>
 #include <AzCore/std/containers/unordered_map.h>
-#include "Bridge.h"
 
 namespace GeomNodes
 {
@@ -255,6 +254,12 @@ namespace GeomNodes
 		}
     }
 
+    template<AttributeType AttributeTypeT>
+    void GNMeshData::SetCount(AZ::u64 count)
+    {
+        SetCount<AttributeTypeT>(aznumeric_cast<AZ::u32>(count));
+    }
+
     template<AttributeType AttributeTypeT>
     void GNMeshData::SetOffset(AZ::u32 offset)
     {
@@ -278,6 +283,12 @@ namespace GeomNodes
 		}
     }
 
+    template<AttributeType AttributeTypeT>
+    void GNMeshData::SetOffset(AZ::u64 offset)
+    {
+        SetOffset<AttributeTypeT>(aznumeric_cast<AZ::u32>(offset));
+    }
+
     template<AttributeType AttributeTypeT>
     const auto& GNMeshData::GetDataBuffer() const
     {
@@ -316,11 +327,21 @@ namespace GeomNodes
         m_indicesRange.offset = offset;
     }
 
+    void GNMeshData::SetIndexOffset(AZ::u64 offset)
+    {
+        SetIndexOffset(aznumeric_cast<AZ::u32>(offset));
+    }
+
     void GNMeshData::SetIndexCount(AZ::u32 count)
     {
         m_indicesRange.count = count;
     }
 
+    void GNMeshData::SetIndexCount(AZ::u64 count)
+    {
+        SetIndexCount(aznumeric_cast<AZ::u32>(count));
+    }
+
     const U32Vector& GNMeshData::GetIndices() const
     {
         return m_indices;

+ 6 - 0
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNMeshData.h

@@ -38,7 +38,9 @@ namespace GeomNodes
         AZ::u32 GetIndexCount() const;
         AZ::u32 GetIndexOffset() const;
         void SetIndexOffset(AZ::u32 offset);
+        void SetIndexOffset(AZ::u64 offset);
         void SetIndexCount(AZ::u32 count);
+        void SetIndexCount(AZ::u64 count);
 
 		template<AttributeType AttributeTypeT>
 		AZ::u32 GetCount() const;
@@ -46,8 +48,12 @@ namespace GeomNodes
 		AZ::u32 GetOffset() const;
 		template<AttributeType AttributeTypeT>
 		void SetCount(AZ::u32 count);
+        template<AttributeType AttributeTypeT>
+        void SetCount(AZ::u64 count);
 		template<AttributeType AttributeTypeT>
 		void SetOffset(AZ::u32 offset);
+        template<AttributeType AttributeTypeT>
+        void SetOffset(AZ::u64 offset);
 
         const U32Vector& GetIndices() const;
         void SetIndices(const U32Vector& indices);

+ 5 - 5
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNModelData.cpp

@@ -2,7 +2,7 @@
 #include <Editor/Systems/GNParamContext.h>
 #include <AzCore/std/containers/set.h>
 #include <AzCore/std/containers/map.h>
-#include "Bridge.h"
+#include <Editor/Common/GNAPI.h>
 
 namespace GeomNodes
 {
@@ -19,7 +19,7 @@ namespace GeomNodes
     {
 		m_meshes.clear();
 		
-		if (OpenSHM(mapId))
+		if (API::OpenSHM(mapId))
 		{
 			AZ::s32 meshCount = Read<AZ::s32>(mapId);
 			AZ::s32 instanceCount = Read<AZ::s32>(mapId);
@@ -140,7 +140,7 @@ namespace GeomNodes
 			// Convert to only one buffers/arrays and keep track of the offsets and element counts
 			MergeMeshBuffers();
 
-			ClearSHM(mapId);
+			API::ClearSHM(mapId);
 		}
     }
 
@@ -242,7 +242,7 @@ namespace GeomNodes
     {
         AZ::u64 length;
         void* address;
-        ReadSHM(mapId, &address, &length);
+        API::ReadSHM(mapId, &address, &length);
 
         T* array = static_cast<T*>(address);
         return AZStd::vector<T>(array, array + (length / sizeof(T)));
@@ -253,7 +253,7 @@ namespace GeomNodes
     {
         AZ::u64 length;
         void* address;
-        ReadSHM(mapId, &address, &length);
+        API::ReadSHM(mapId, &address, &length);
         T value{};
         memcpy(&value, address, length);
         return value;

+ 2 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNRenderMesh.h

@@ -11,6 +11,7 @@
 #include <AzCore/Component/TransformBus.h>
 #include <AzCore/Name/Name.h>
 
+#include <GeomNodes/GeomNodesTypeIds.h>
 namespace AZ::RPI
 {
     class ModelLodAsset;
@@ -29,7 +30,7 @@ namespace GeomNodes
         , private AZ::TickBus::Handler
     {
     public:
-        AZ_RTTI(GNRenderMesh, "{4E293CD2-F9E6-417C-92B7-DDAF312F46CF}");
+        AZ_RTTI(GNRenderMesh, GNRenderMeshTypeId);
 
         explicit GNRenderMesh(AZ::EntityId entityId);
         ~GNRenderMesh();

+ 2 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNRenderMeshInterface.h

@@ -1,4 +1,5 @@
 #include <AzCore/Component/Component.h>
+#include <GeomNodes/GeomNodesTypeIds.h>
 
 namespace AZ
 {
@@ -15,7 +16,7 @@ namespace GeomNodes
     class GNRenderMeshInterface
     {
     public:
-        AZ_RTTI(GNRenderMeshInterface, "{908CB056-4814-42FF-9D60-2D67A720D829}");
+        AZ_RTTI(GNRenderMeshInterface, GNRenderMeshInterfaceTypeId);
 
         virtual ~GNRenderMeshInterface() = 0;
 

+ 5 - 3
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNInstance.cpp

@@ -1,5 +1,5 @@
 #include "GNInstance.h"
-#include "Bridge.h"
+#include <Editor/Common/GNAPI.h>
 #include <Editor/Systems/GeomNodesSystem.h>
 #include <Editor/Common/GNConstants.h>
 
@@ -58,7 +58,7 @@ namespace GeomNodes
     {
         //AZ::u64 entityId = 123456;
         AZ::u64 entityId = (AZ::u64)m_entityId;
-        SendMsg(content.c_str(), content.size(), entityId);
+        API::SendMsg(content.c_str(), content.size(), entityId);
     }
 
     bool GNInstance::RestartProcess()
@@ -102,7 +102,7 @@ namespace GeomNodes
         return true;
     }
 
-    void GNInstance::SendParamUpdates(const AZStd::string& params, const AZStd::string& objectName)
+    AZStd::string GNInstance::SendParamUpdates(const AZStd::string& params, const AZStd::string& objectName)
     {
 		auto msg = AZStd::string::format(
 			R"JSON(
@@ -119,6 +119,8 @@ namespace GeomNodes
 		);
 
 		SendIPCMsg(msg);
+
+        return msg;
     }
 
     void GNInstance::SendHeartbeat()

+ 1 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNInstance.h

@@ -23,7 +23,7 @@ namespace GeomNodes
         bool RestartProcess();
 
         // Ipc messaging
-        void SendParamUpdates(const AZStd::string& params, const AZStd::string& objectName);
+        AZStd::string SendParamUpdates(const AZStd::string& params, const AZStd::string& objectName);
         void SendHeartbeat();
         void RequestObjectParams();
         void CloseMap(AZ::u64 mapId);

+ 71 - 40
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNProperty.cpp

@@ -26,7 +26,9 @@ namespace GeomNodes
                         return reinterpret_cast<const GNProperty*>(instance)->m_id;
                     })
                 ->Field("id", &GNProperty::m_id)
-                ->Field("name", &GNProperty::m_name);
+                ->Field("name", &GNProperty::m_name)
+                ->Field("gnId", &GNProperty::m_gnId)
+                ;
         }
     }
 
@@ -128,11 +130,16 @@ namespace GeomNodes
         if (context.IsBoolean(valueIndex))
         {
             bool value;
-            if (context.ReadValue(value, Field::DefaultValue))
+            if (!context.ReadValue(value, Field::DefaultValue))
             {
-                retVal = aznew GNParamBoolean(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
-                retVal->ReadSetGNId(context);
+                if (!context.ReadValue(value, Field::Value))
+                {
+                    AZ_Error("GNParamBoolean", false, "Missing DefaultValue or Value keys in the JSON data\n");
+                }
             }
+
+			retVal = aznew GNParamBoolean(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
+			retVal->ReadSetGNId(context);
         }
 
         return retVal;
@@ -150,16 +157,19 @@ namespace GeomNodes
             R"JSON(
                     {
                         "%s": "%s",
-                        "%s": %s,
+                        "%s": %i,
+                        "%s": "%s",
                         "%s": "%s"
                     }
                 )JSON"
             , Field::Id
             , m_gnId.c_str()
             , Field::Value
-            , m_value ? "true" : "false"
+            , m_value ? 1 : 0
             , Field::Type
             , m_type.c_str()
+			, Field::Name
+			, m_name.c_str()
         );
         return jsonString;
     }
@@ -200,24 +210,28 @@ namespace GeomNodes
         if (context.IsInt(valueIndex))
         {
             int value;
-            if (context.ReadValue(value, Field::DefaultValue))
+			if (!context.ReadValue(value, Field::DefaultValue))
+			{
+				if (!context.ReadValue(value, Field::Value))
+				{
+					AZ_Error("GNParamInt", false, "Missing DefaultValue or Value keys in the JSON data\n");
+				}
+			}
+            auto paramInt = aznew GNParamInt(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
+
+            int min, max;
+            if (context.ReadValue(min, Field::MinValue))
             {
-                auto paramInt = aznew GNParamInt(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
-
-                int min, max;
-                if (context.ReadValue(min, Field::MinValue))
-                {
-                    paramInt->SetMinValue(min);
-                }
-
-                if (context.ReadValue(max, Field::MaxValue))
-                {
-                    paramInt->SetMaxValue(max);
-                }
+                paramInt->SetMinValue(min);
+            }
 
-                retVal = paramInt;
-                retVal->ReadSetGNId(context);
+            if (context.ReadValue(max, Field::MaxValue))
+            {
+                paramInt->SetMaxValue(max);
             }
+
+            retVal = paramInt;
+            retVal->ReadSetGNId(context);
         }
 
         return retVal;
@@ -242,6 +256,7 @@ namespace GeomNodes
                     {
                         "%s": "%s",
                         "%s": %i,
+                        "%s": "%s",
                         "%s": "%s"
                     }
                 )JSON"
@@ -251,6 +266,8 @@ namespace GeomNodes
             , m_value
             , Field::Type
             , m_type.c_str()
+			, Field::Name
+			, m_name.c_str()
         );
         return jsonString;
     }
@@ -287,23 +304,27 @@ namespace GeomNodes
         if (context.IsValue(valueIndex))
         {
             double value;
-            if (context.ReadValue(value, Field::DefaultValue))
+			if (!context.ReadValue(value, Field::DefaultValue))
+			{
+				if (!context.ReadValue(value, Field::Value))
+				{
+					AZ_Error("GNParamValue", false, "Missing DefaultValue or Value keys in the JSON data\n");
+				}
+			}
+            auto paramValue = aznew GNParamValue(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
+            double min, max;
+            if (context.ReadValue(min, Field::MinValue))
             {
-                auto paramValue = aznew GNParamValue(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
-                double min, max;
-                if (context.ReadValue(min, Field::MinValue))
-                {
-                    paramValue->SetMinValue(min);
-                }
-
-                if (context.ReadValue(max, Field::MaxValue))
-                {
-                    paramValue->SetMaxValue(max);
-                }
+                paramValue->SetMinValue(min);
+            }
 
-                retVal = paramValue;
-                retVal->ReadSetGNId(context);
+            if (context.ReadValue(max, Field::MaxValue))
+            {
+                paramValue->SetMaxValue(max);
             }
+
+            retVal = paramValue;
+            retVal->ReadSetGNId(context);
         }
 
         return retVal;
@@ -326,6 +347,7 @@ namespace GeomNodes
                     {
                         "%s": "%s",
                         "%s": %.17f,
+                        "%s": "%s",
                         "%s": "%s"
                     }
                 )JSON"
@@ -335,6 +357,8 @@ namespace GeomNodes
             , m_value
             , Field::Type
             , m_type.c_str()
+			, Field::Name
+			, m_name.c_str()
         );
         return jsonString;
     }
@@ -370,11 +394,15 @@ namespace GeomNodes
         if (context.IsString(valueIndex))
         {
             const char* value = nullptr;
-            if (context.ReadValue(value, Field::DefaultValue))
-            {
-                retVal = aznew GNParamString(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
-                retVal->ReadSetGNId(context);
-            }
+			if (!context.ReadValue(value, Field::DefaultValue))
+			{
+				if (!context.ReadValue(value, Field::Value))
+				{
+					AZ_Error("GNParamString", false, "Missing DefaultValue or Value keys in the JSON data\n");
+				}
+			}
+            retVal = aznew GNParamString(name, value, context.GetReadOnlyPointer(), context.GetEntityId());
+            retVal->ReadSetGNId(context);
         }
 
         return retVal;
@@ -395,6 +423,7 @@ namespace GeomNodes
         auto jsonString = AZStd::string::format(
             R"JSON(
                     {
+                        "%s": "%s",
                         "%s": "%s",
                         "%s": "%s",
                         "%s": "%s"
@@ -406,6 +435,8 @@ namespace GeomNodes
             , m_value.c_str()
             , Field::Type
             , m_type.c_str()
+			, Field::Name
+			, m_name.c_str()
         );
         return jsonString;
     }

+ 8 - 6
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNProperty.h

@@ -7,6 +7,8 @@
 #include <AzCore/Component/EntityId.h>
 #include <Editor/Systems/GNParamContext.h>
 #include <AzCore/Serialization/EditContext.h>
+#include <Editor/EBus/EditorGeomNodesComponentBus.h>
+#include <GeomNodes/GeomNodesTypeIds.h>
 
 namespace AZ
 {
@@ -36,7 +38,7 @@ namespace GeomNodes
         virtual ~GNProperty()
         {
         }
-        AZ_RTTI(GeomNodes::GNProperty, "{71904E43-F0A1-45EA-B87F-4CC5234E1E52}");
+        AZ_RTTI(GeomNodes::GNProperty, GNPropertyTypeId);
 
         GNProperty()
         {
@@ -107,7 +109,7 @@ namespace GeomNodes
     {
     public:
         AZ_CLASS_ALLOCATOR(GNParamNil, AZ::SystemAllocator);
-        AZ_RTTI(GeomNodes::GNParamNil, "{519D98C7-054A-4047-BCEB-28DCD38CFCD4}", GNProperty);
+        AZ_RTTI(GeomNodes::GNParamNil, GNParamNilTypeId, GNProperty);
 
         static void Reflect(AZ::ReflectContext* reflection);
         static GNProperty* TryCreateProperty(GNParamDataContext& context, int valueIndex, const char* name);
@@ -135,7 +137,7 @@ namespace GeomNodes
     {
     public:
         AZ_CLASS_ALLOCATOR(GNParamBoolean, AZ::SystemAllocator);
-        AZ_RTTI(GeomNodes::GNParamBoolean, "{6A05BCAB-50F7-4988-96E1-0EDB6B76C3A3}", GNProperty);
+        AZ_RTTI(GeomNodes::GNParamBoolean, GNParamBooleanTypeId, GNProperty);
 
         static void Reflect(AZ::ReflectContext* reflection);
         static GNProperty* TryCreateProperty(GNParamDataContext& context, int valueIndex, const char* name);
@@ -176,7 +178,7 @@ namespace GeomNodes
     {
     public:
         AZ_CLASS_ALLOCATOR(GNParamInt, AZ::SystemAllocator);
-        AZ_RTTI(GNParamInt, "{B2457A3D-F30C-43F9-90F0-5BFAFFFD0F59}", GNProperty);
+        AZ_RTTI(GeomNodes::GNParamInt, GNParamIntTypeId, GNProperty);
 
         static void Reflect(AZ::ReflectContext* reflection);
         static GNProperty* TryCreateProperty(GNParamDataContext& context, int valueIndex, const char* name);
@@ -229,7 +231,7 @@ namespace GeomNodes
     {
     public:
         AZ_CLASS_ALLOCATOR(GNParamValue, AZ::SystemAllocator);
-        AZ_RTTI(GeomNodes::GNParamValue, "{4790660B-B942-4421-B942-AE27DF67BF4F}", GNProperty);
+        AZ_RTTI(GeomNodes::GNParamValue, GNParamValueTypeId, GNProperty);
 
         static void Reflect(AZ::ReflectContext* reflection);
         static GNProperty* TryCreateProperty(GNParamDataContext& context, int valueIndex, const char* name);
@@ -282,7 +284,7 @@ namespace GeomNodes
     {
     public:
         AZ_CLASS_ALLOCATOR(GNParamString, AZ::SystemAllocator);
-        AZ_RTTI(GeomNodes::GNParamString, "{9296C827-0281-4DBF-AC1A-B6636BCEC716}", GNProperty);
+        AZ_RTTI(GeomNodes::GNParamString, GNParamStringTypeId, GNProperty);
 
         static void Reflect(AZ::ReflectContext* reflection);
         static GNProperty* TryCreateProperty(GNParamDataContext& context, int valueIndex, const char* name);

+ 2 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GNSystemInterface.h

@@ -3,13 +3,14 @@
 #include <AzCore/EBus/Event.h>
 #include <Editor/Common/GNEvents.h>
 #include <Editor/Configuration/GNConfiguration.h>
+#include <GeomNodes/GeomNodesTypeIds.h>
 
 namespace GeomNodes
 {
     class GNSystemInterface
     {
     public:
-        AZ_RTTI(GNSystemInterface, "{83173679-DAF6-4496-BEFA-B0D252C40366}");
+        AZ_RTTI(GNSystemInterface, GNSystemInterfaceTypeId);
 
         GNSystemInterface() = default;
         virtual ~GNSystemInterface() = default;

+ 3 - 3
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GeomNodesSystem.cpp

@@ -2,7 +2,7 @@
 #include "Editor/UI/PropertyFileSelect.h"
 #include "Editor/UI/ValidationHandler.h"
 #include "Editor/UI/GeomNodesValidator.h"
-#include "Bridge.h"
+#include <Editor/Common/GNAPI.h>
 #include <Editor/EBus/IpcHandlerBus.h>
 
 namespace GeomNodes
@@ -41,7 +41,7 @@ namespace GeomNodes
 
 		m_systemConfig = *config;
 		
-		Init(SERVER_ID, IpcHandlerCB);
+		API::Init(SERVER_ID, IpcHandlerCB);
 
 		RegisterHandlersAndBuses();
 
@@ -57,7 +57,7 @@ namespace GeomNodes
 		}
 
 		UnregisterHandlersAndBuses();
-		Uninitialize();
+		API::Uninitialize();
 
 		m_state = State::Shutdown;
     }

+ 2 - 1
Gems/O3DE/GeomNodes/Code/Source/Editor/Systems/GeomNodesSystem.h

@@ -8,6 +8,7 @@
 #include <AZCore/std/smart_ptr/unique_ptr.h>
 #include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
 #include "Editor/EBus/ValidatorBus.h"
+#include <GeomNodes/GeomNodesTypeIds.h>
 
 namespace GeomNodes
 {
@@ -19,7 +20,7 @@ namespace GeomNodes
         , public ValidatorBus::Handler
     {
     public:
-        AZ_RTTI(GeomNodesSystem, "{23791BF8-D9DE-4827-88D8-37DA39258570}", GeomNodes::GNSystemInterface);
+        AZ_RTTI(GeomNodesSystem, GeomNodesSystemTypeId, GeomNodes::GNSystemInterface);
 
         GeomNodesSystem(AZStd::unique_ptr<GNSettingsRegistryManager> registryManager);
         virtual ~GeomNodesSystem();

+ 7 - 13
Gems/O3DE/GeomNodes/Code/Source/GeomNodes/Components/GeomNodesSystemComponent.cpp

@@ -1,28 +1,22 @@
 
 #include "GeomNodesSystemComponent.h"
 
+#include <GeomNodes/GeomNodesTypeIds.h>
+
 #include <AzCore/Serialization/SerializeContext.h>
-#include <AzCore/Serialization/EditContext.h>
-#include <AzCore/Serialization/EditContextConstants.inl>
 
 namespace GeomNodes
 {
+    AZ_COMPONENT_IMPL(GeomNodesSystemComponent, "GeomNodesSystemComponent",
+        GeomNodesSystemComponentTypeId);
+
     void GeomNodesSystemComponent::Reflect(AZ::ReflectContext* context)
     {
-        if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
+        if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
         {
-            serialize->Class<GeomNodesSystemComponent, AZ::Component>()
+            serializeContext->Class<GeomNodesSystemComponent, AZ::Component>()
                 ->Version(0)
                 ;
-
-            if (AZ::EditContext* ec = serialize->GetEditContext())
-            {
-                ec->Class<GeomNodesSystemComponent>("GeomNodes", "[Description of functionality provided by this System Component]")
-                    ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
-                        ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
-                        ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
-                    ;
-            }
         }
     }
 

+ 2 - 2
Gems/O3DE/GeomNodes/Code/Source/GeomNodes/Components/GeomNodesSystemComponent.h

@@ -13,7 +13,7 @@ namespace GeomNodes
         , public AZ::TickBus::Handler
     {
     public:
-        AZ_COMPONENT(GeomNodesSystemComponent, "{ED1211E8-0025-4A8A-960F-CF405FBF7077}");
+        AZ_COMPONENT_DECL(GeomNodesSystemComponent);
 
         static void Reflect(AZ::ReflectContext* context);
 
@@ -44,4 +44,4 @@ namespace GeomNodes
         ////////////////////////////////////////////////////////////////////////
     };
 
-} // namespace GeomNodes
+} // namespace GeomNodes

+ 2 - 3
Gems/O3DE/GeomNodes/Code/Source/GeomNodes/Modules/GeomNodesModule.cpp

@@ -1,7 +1,6 @@
 
-
+#include <GeomNodes/GeomNodesTypeIds.h>
 #include <GeomNodesModuleInterface.h>
-#include "GeomNodes/Components/GeomNodesSystemComponent.h"
 
 namespace GeomNodes
 {
@@ -9,7 +8,7 @@ namespace GeomNodes
         : public GeomNodesModuleInterface
     {
     public:
-        AZ_RTTI(GeomNodesModule, "{49C42A73-EF4E-4D42-8ECF-0ADE7F942CCD}", GeomNodesModuleInterface);
+        AZ_RTTI(GeomNodesModule, GeomNodesModuleTypeId, GeomNodesModuleInterface);
         AZ_CLASS_ALLOCATOR(GeomNodesModule, AZ::SystemAllocator);
     };
 }// namespace GeomNodes

+ 33 - 0
Gems/O3DE/GeomNodes/Code/Source/GeomNodesModuleInterface.cpp

@@ -0,0 +1,33 @@
+
+#include "GeomNodesModuleInterface.h"
+#include <AzCore/Memory/Memory.h>
+
+#include <GeomNodes/GeomNodesTypeIds.h>
+
+#include <GeomNodes/Components/GeomNodesSystemComponent.h>
+
+namespace GeomNodes
+{
+    AZ_TYPE_INFO_WITH_NAME_IMPL(GeomNodesModuleInterface,
+        "GeomNodesModuleInterface", GeomNodesModuleInterfaceTypeId);
+    AZ_RTTI_NO_TYPE_INFO_IMPL(GeomNodesModuleInterface, AZ::Module);
+    AZ_CLASS_ALLOCATOR_IMPL(GeomNodesModuleInterface, AZ::SystemAllocator);
+
+    GeomNodesModuleInterface::GeomNodesModuleInterface()
+    {
+        // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
+        // Add ALL components descriptors associated with this gem to m_descriptors.
+        // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
+        // This happens through the [MyComponent]::Reflect() function.
+        m_descriptors.insert(m_descriptors.end(), {
+            GeomNodesSystemComponent::CreateDescriptor(),
+            });
+    }
+
+    AZ::ComponentTypeList GeomNodesModuleInterface::GetRequiredSystemComponents() const
+    {
+        return AZ::ComponentTypeList{
+            azrtti_typeid<GeomNodesSystemComponent>(),
+        };
+    }
+} // namespace GeomNodes

+ 8 - 20
Gems/O3DE/GeomNodes/Code/Source/GeomNodesModuleInterface.h

@@ -1,7 +1,8 @@
 
-#include <AzCore/Memory/SystemAllocator.h>
+#include <AzCore/Memory/Memory_fwd.h>
 #include <AzCore/Module/Module.h>
-#include <GeomNodes/Components/GeomNodesSystemComponent.h>
+#include <AzCore/RTTI/RTTIMacros.h>
+#include <AzCore/RTTI/TypeInfoSimple.h>
 
 namespace GeomNodes
 {
@@ -9,28 +10,15 @@ namespace GeomNodes
         : public AZ::Module
     {
     public:
-        AZ_RTTI(GeomNodesModuleInterface, "{2D38307D-709D-4B17-9878-AF59F988FC54}", AZ::Module);
-        AZ_CLASS_ALLOCATOR(GeomNodesModuleInterface, AZ::SystemAllocator);
+        AZ_TYPE_INFO_WITH_NAME_DECL(GeomNodesModuleInterface)
+        AZ_RTTI_NO_TYPE_INFO_DECL()
+        AZ_CLASS_ALLOCATOR_DECL
 
-        GeomNodesModuleInterface()
-        {
-            // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
-            // Add ALL components descriptors associated with this gem to m_descriptors.
-            // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext.
-            // This happens through the [MyComponent]::Reflect() function.
-            m_descriptors.insert(m_descriptors.end(), {
-                GeomNodesSystemComponent::CreateDescriptor(),
-                });
-        }
+        GeomNodesModuleInterface();
 
         /**
          * Add required SystemComponents to the SystemEntity.
          */
-        AZ::ComponentTypeList GetRequiredSystemComponents() const override
-        {
-            return AZ::ComponentTypeList{
-                azrtti_typeid<GeomNodesSystemComponent>(),
-            };
-        }
+        AZ::ComponentTypeList GetRequiredSystemComponents() const override;
     };
 }// namespace GeomNodes

+ 1 - 0
Gems/O3DE/GeomNodes/Code/geomnodes_api_files.cmake

@@ -1,4 +1,5 @@
 
 set(FILES
     Include/GeomNodes/GeomNodesBus.h
+    Include/GeomNodes/GeomNodesTypeIds.h
 )

+ 2 - 0
Gems/O3DE/GeomNodes/Code/geomnodes_editor_private_files.cmake

@@ -3,6 +3,8 @@ set(FILES
     Source/Editor/Commons.h
     Source/Editor/Math/MathHelper.cpp
     Source/Editor/Math/MathHelper.h
+    Source/Editor/Common/GNAPI.cpp
+    Source/Editor/Common/GNAPI.h
     Source/Editor/Common/GNEvents.h
     Source/Editor/Common/GNConstants.h
     Source/Editor/Components/EditorGeomNodesSystemComponent.cpp

+ 1 - 0
Gems/O3DE/GeomNodes/Code/geomnodes_private_files.cmake

@@ -1,5 +1,6 @@
 
 set(FILES
+    Source/GeomNodesModuleInterface.cpp
     Source/GeomNodesModuleInterface.h
     Source/GeomNodes/Components/GeomNodesSystemComponent.cpp
     Source/GeomNodes/Components/GeomNodesSystemComponent.h

+ 3 - 1
Gems/O3DE/GeomNodes/External/Bridge/CMakeLists.txt

@@ -12,11 +12,13 @@
 #     PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
 ly_add_target(
-    NAME Bridge SHARED
+    NAME Bridge ${PAL_TRAIT_MONOLITHIC_DRIVEN_LIBRARY_TYPE}
     NAMESPACE GeomNodes
     FILES_CMAKE
         bridge_files.cmake
     INCLUDE_DIRECTORIES
+        INTERFACE
+            .
         PUBLIC
             .
     BUILD_DEPENDENCIES