2
0
Эх сурвалжийг харах

- Bug fix for exporting issue with no blender instance
- Bug fix for material issue with multiple Geometry Nodes Objects
- minor cleanup

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

Jason Dela Cruz 2 жил өмнө
parent
commit
ea74fc7f8d

+ 26 - 0
Gems/O3DE/GeomNodes/Code/Source/Editor/Common/GNConstants.h

@@ -2,6 +2,32 @@
 
 namespace GeomNodes
 {
+	namespace Field
+	{
+		static constexpr char Initialized[] = "Initialized";
+		static constexpr char Heartbeat[] = "Heartbeat";
+		static constexpr char ObjectNames[] = "ObjectNames";
+		static constexpr char Objects[] = "Objects";
+		static constexpr char Object[] = "Object";
+		static constexpr char SHMOpen[] = "SHMOpen";
+		static constexpr char SHMClose[] = "SHMClose";
+		static constexpr char MapId[] = "MapId";
+		static constexpr char Export[] = "Export";
+		static constexpr char Error[] = "Error";
+
+		static constexpr char Params[] = "Params";
+		static constexpr char Materials[] = "Materials";
+		static constexpr char Id[] = "Id";
+		static constexpr char Name[] = "Name";
+		static constexpr char Type[] = "Type";
+		static constexpr char DefaultValue[] = "DefaultValue";
+		static constexpr char Value[] = "Value";
+		static constexpr char MinValue[] = "MinValue";
+		static constexpr char MaxValue[] = "MaxValue";
+
+		static constexpr char FBXPath[] = "FBXPath";
+	}
+
 	//! Attributes for mesh vertices.
 	enum class AttributeType
 	{

+ 19 - 138
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.cpp

@@ -59,7 +59,7 @@ namespace GeomNodes
                         ->Attribute(Attributes::FuncValidator, ConvertFunctorToVoid(&Validators::ValidBlenderOrEmpty))
                         ->Attribute(Attributes::SelectFunction, blendFunctor)
                         ->Attribute(Attributes::ValidationChange, &EditorGeomNodesComponent::OnPathChange)
-                        ->Attribute(AZ::Edit::Attributes::ReadOnly, &EditorGeomNodesComponent::IsWorkInProgress)
+                        ->Attribute(AZ::Edit::Attributes::ReadOnly, &EditorGeomNodesComponent::GetWorkInProgress)
 					->DataElement(nullptr, &EditorGeomNodesComponent::m_paramContext, "Geom Nodes Parameters", "Parameter template")
                     ->SetDynamicEditDataProvider(&EditorGeomNodesComponent::GetParamsEditData)
                         ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
@@ -68,7 +68,7 @@ namespace GeomNodes
 					->Attribute(AZ::Edit::Attributes::ButtonText, &EditorGeomNodesComponent::ExportButtonText)
                     ->Attribute(AZ::Edit::Attributes::Visibility, &EditorGeomNodesComponent::IsBlenderFileLoaded)
                     ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree)
-                    ->Attribute(AZ::Edit::Attributes::ReadOnly, &EditorGeomNodesComponent::IsWorkInProgress)
+                    ->Attribute(AZ::Edit::Attributes::ReadOnly, &EditorGeomNodesComponent::GetWorkInProgress)
                     ;
 
                 ec->Class<GNParamContext>("Geom Nodes Parameter Context", "Adding exposed Geometry Nodes parameters to the entity!")
@@ -180,26 +180,10 @@ namespace GeomNodes
             m_instance->RestartProcess();
         }
 
-        auto msg = AZStd::string::format(
-            R"JSON(
-                {
-                    "%s": [ %s ],
-                    "%s": "%s",
-                    "Frame": 0,
-                    "ParamUpdate": true
-                }
-            )JSON"
-            , Field::Params
-            , m_paramContext.m_group
-                .GetGroup(m_currentObject.c_str())
-                ->GetProperties().c_str()
-            , Field::Object
-            , m_currentObject.c_str()
-        );
-
-        m_instance->SendIPCMsg(msg);
+        m_instance->SendParamUpdates(m_paramContext.m_group
+            .GetGroup(m_currentObject.c_str())->GetProperties()
+            , m_currentObject);
         
-
         AZ_Printf("EditorGeomNodesComponent", "Parameter has changed");
     }
 
@@ -212,31 +196,21 @@ namespace GeomNodes
             // send back an "Alive" message to the client when it asks for a heartbeat. 
             if (jsonDocument.HasMember(Field::Heartbeat))
             {
-				AZStd::string msg = R"JSON(
-                                        {
-                                            "Alive": true 
-                                        }
-                                    )JSON";
-				m_instance->SendIPCMsg(msg);
+                m_instance->SendHeartbeat();
             }
             else if (jsonDocument.HasMember(Field::Initialized))
             {
-                AZStd::string msg;
                 if (!m_initialized)
                 {
-                    msg = R"JSON(
-                        {
-                            "FetchObjectParams": true 
-                        }
-                    )JSON";
+                    m_instance->RequestObjectParams();
                     m_initialized = true;
                 }
                 else
                 {
                     // send messages that are queued.
-                    SetWorkInProgress(false);
+                    //SetWorkInProgress(false);
                 }
-                m_instance->SendIPCMsg(msg);
+                
             }
             else if (jsonDocument.HasMember(Field::ObjectNames) && jsonDocument.HasMember(Field::Objects) && jsonDocument.HasMember(Field::Materials))
             {
@@ -255,20 +229,8 @@ namespace GeomNodes
             {
                 AZ::u64 mapId = jsonDocument[Field::MapId].GetInt64();
                 m_controller->ReadData(mapId);
-                auto msg = AZStd::string::format(
-                    R"JSON(
-                    {
-                        "%s": true,
-                        "%s": %llu
-                    }
-                    )JSON",
-                    Field::SHMClose,
-                    Field::MapId,
-                    mapId);
-                m_instance->SendIPCMsg(msg);
-
+                m_instance->CloseMap(mapId);
                 SetWorkInProgress(false);
-
                 m_controller->RebuildRenderMesh();
             }
             else if (jsonDocument.HasMember(Field::Export) && jsonDocument.HasMember(Field::Error))
@@ -294,21 +256,7 @@ namespace GeomNodes
     {
         if (!m_workInProgress)
         {
-            auto msg = AZStd::string::format(
-				R"JSON(
-                    {
-                        "%s": true,
-                        "%s": "%s",
-                        "%s": "%s"
-                    }
-                    )JSON",
-				Field::Export,
-				Field::Object,
-                m_currentObject.c_str(),
-                Field::FBXPath,
-                m_controller->GenerateFBXPath().c_str());
-			m_instance->SendIPCMsg(msg);
-            AZ_TracePrintf("EditorGeomNodesComponent", "[ExportToStaticMesh] m_workInProgress has changed")
+            m_instance->RequestExport(m_controller->GenerateFBXPath(), m_currentObject);
             SetWorkInProgress(true);
         }
     }
@@ -318,11 +266,6 @@ namespace GeomNodes
         return m_initialized;
     }
 
-    bool EditorGeomNodesComponent::IsWorkInProgress()
-    {
-        return m_workInProgress;
-    }
-
     void EditorGeomNodesComponent::SetWorkInProgress(bool flag)
     {
 		AZ::SystemTickBus::QueueFunction(
@@ -340,6 +283,14 @@ namespace GeomNodes
         return m_workInProgress;
     }
 
+    void EditorGeomNodesComponent::SendIPCMsg(const AZStd::string& msg)
+    {
+        if (m_instance != nullptr)
+        {
+            m_instance->SendIPCMsg(msg);
+        }
+    }
+
     AZStd::string EditorGeomNodesComponent::ExportButtonText()
     {
         return m_workInProgress ? "Working on your request" : "Export";
@@ -558,11 +509,6 @@ namespace GeomNodes
         }
     }
 
-    GNMeshData EditorGeomNodesComponent::GetMeshData(AZ::u64 entityId)
-    {
-        return m_modelData.GetMeshData(entityId);
-    }
-
     void EditorGeomNodesComponent::Clear()
     {
         m_controller.reset();
@@ -602,71 +548,6 @@ namespace GeomNodes
         return m_cachedStrings.insert(AZStd::make_pair(str, AZStd::string(str))).first->second.c_str();
     }
 
-  //  void EditorGeomNodesComponent::ManageChildEntities()
-  //  {
-		//AzToolsFramework::EntityIdList entityIdList;
-
-		//AZ::s32 entityCount = m_modelData.MeshCount() - m_entityIdList.size();
-		//if (entityCount > 0)
-		//{
-		//	for ([[maybe_unused]] AZ::s32 i = 0; i < entityCount; i++)
-		//	{
-		//		AZ::EntityId entityId;
-		//		EBUS_EVENT_RESULT(entityId, AzToolsFramework::EditorRequests::Bus, CreateNewEntity, GetEntityId());
-
-		//		entityIdList.push_back(entityId);
-		//	}
-
-		//	AzToolsFramework::EntityCompositionRequests::AddComponentsOutcome addedComponentsResult = AZ::Failure(AZStd::string("Failed to call AddComponentsToEntities on EntityCompositionRequestBus"));
-		//	AzToolsFramework::EntityCompositionRequestBus::BroadcastResult(addedComponentsResult, &AzToolsFramework::EntityCompositionRequests::AddComponentsToEntities, entityIdList, AZ::ComponentTypeList{ /*AZ::Render::EditorMaterialComponentTypeId, */azrtti_typeid<EditorGeomNodesMeshComponent>() });
-
-		//	if (addedComponentsResult.IsSuccess())
-		//	{
-		//		AzToolsFramework::ToolsApplicationEvents::Bus::Broadcast(&AzToolsFramework::ToolsApplicationEvents::InvalidatePropertyDisplay, AzToolsFramework::Refresh_EntireTree_NewContent);
-		//	}
-
-		//	m_entityIdList.insert(m_entityIdList.begin(), entityIdList.begin(), entityIdList.end());
-		//}
-		//else if (entityCount < 0)
-		//{
-		//	entityCount *= -1; // flipping the sign so we can use it
-
-		//	for ([[maybe_unused]] AZ::s32 i = 0; i < entityCount; i++) {
-		//		entityIdList.insert(entityIdList.begin(), m_entityIdList.back());
-		//		m_entityIdList.pop_back();
-		//	}
-
-		//	AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequests::DeleteEntities, entityIdList);
-		//}
-
-		//// assign the mesh data to the entityId
-		//for (auto entityId : m_entityIdList)
-		//{
-		//	m_modelData.AssignMeshData((AZ::u64)entityId);
-  //          auto meshData = m_modelData.GetMeshData((AZ::u64)entityId);
-
-  //          auto materialPath = meshData.GetMaterialPath();
-  //          AZ_Printf("GeomNodes", "assigned mesh data %s", materialPath.c_str());
-  //          
-  //          if (AZ::IO::FileIOBase::GetInstance()->Exists(materialPath.c_str()))
-  //          {
-		//		AZ::Data::AssetId materialAssetId;
-		//		EBUS_EVENT_RESULT(materialAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, materialPath.c_str(), AZ::Data::s_invalidAssetType, false);
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
-		//		// If found, notify mesh that the mesh data is assigned and material is ready.
-		//		if (materialAssetId.IsValid())
-		//		{
-		//			AZ_Printf("GeomNodes", "    OnMeshDataAssigned called %s", meshData.GetMaterialPath().c_str());
-		//			EditorGeomNodesMeshComponentEventBus::Event(entityId, &EditorGeomNodesMeshComponentEvents::OnMeshDataAssigned, meshData);
-		//		}
-  //          }
-		//}
-
-  //      
-  //      AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequests::MarkEntitiesDeselected, m_entityIdList);
-  //      AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequests::MarkEntitySelected, GetEntityId());
-  //  }
-
     void EditorGeomNodesComponent::ClearDataElements()
     {
         for (auto it = m_dataElements.begin(); it != m_dataElements.end(); ++it)

+ 2 - 4
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.h

@@ -36,9 +36,9 @@ namespace GeomNodes
         void Deactivate() override;
 
 		// EditorGeomNodesComponentRequestBus overrides ...
-        GNMeshData GetMeshData(AZ::u64 entityId) override;
         void SetWorkInProgress(bool flag) override;
         bool GetWorkInProgress() override;
+        void SendIPCMsg(const AZStd::string& msg) override;
 
     private:
 		
@@ -62,7 +62,6 @@ namespace GeomNodes
 
         void ExportToStaticMesh();
         bool IsBlenderFileLoaded();
-        bool IsWorkInProgress();
         
         AZStd::string ExportButtonText();
 
@@ -97,8 +96,7 @@ namespace GeomNodes
 
         AZStd::string m_blenderFile;
         AZStd::string m_currentObject;
-        AZStd::string m_currentBlenderFileName;
-
+        
         GNInstance* m_instance = nullptr;
         AzToolsFramework::EntityIdList m_entityIdList;
 

+ 1 - 2
Gems/O3DE/GeomNodes/Code/Source/Editor/EBus/EditorGeomNodesComponentBus.h

@@ -1,7 +1,6 @@
 #pragma once
 
 #include <AzCore/Component/ComponentBus.h>
-#include <Editor/Rendering/GNMeshData.h>
 
 namespace GeomNodes
 {
@@ -9,9 +8,9 @@ namespace GeomNodes
     class EditorGeomNodesComponentRequests : public AZ::ComponentBus
     {
     public:
-        virtual GNMeshData GetMeshData(AZ::u64 entityId) = 0;
         virtual void SetWorkInProgress(bool flag) = 0;
         virtual bool GetWorkInProgress() = 0;
+        virtual void SendIPCMsg(const AZStd::string& msg) = 0;
 
 	protected:
 		~EditorGeomNodesComponentRequests() = default;

+ 14 - 11
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNMeshController.cpp

@@ -122,28 +122,36 @@ namespace GeomNodes
 	void GNMeshController::ReadData(AZ::u64 mapId)
 	{
 		m_modelData.ReadData(mapId);
+
+		// set the render mesh's material list here so it only get the materials for the current object and not the whole scene.
+		MaterialList materialList;
+		AZStd::string materialFilePath = AZStd::string(AssetsFolderPath) + m_blenderFilename + "/" + MaterialsFolder.data() + "/";
+		for (auto materialName : m_modelData.GetMaterials())
+		{
+			AZStd::string azMaterialPath = materialFilePath + materialName + AzMaterialExtension.data();
+			materialList.push_back(azMaterialPath);
+		}
+
+		m_renderMesh->SetMaterialList(materialList);
 	}
 
 	void GNMeshController::LoadMaterials(const rapidjson::Value& materialArray)
 	{
 		m_materialWaitList.clear();
-		AZStd::vector<AZStd::string> materialList;
 		// iterate through the material arrays and write them into files.
+		AZStd::string projectRootPath = GetProjectRoot() + "/";
+		AZStd::string materialFilePath = AZStd::string(AssetsFolderPath) + m_blenderFilename + "/" + MaterialsFolder.data() + "/";
 		for (rapidjson::Value::ConstValueIterator itr = materialArray.Begin(); itr != materialArray.End(); ++itr)
 		{
 			const auto matItr = itr->MemberBegin();
 			AZStd::string materialName = matItr->name.GetString();
 			AZStd::string materialContent = matItr->value.GetString();
 
-			AZStd::string fullFilePath = GetProjectRoot() + "/";
-			AZStd::string materialFilePath = AZStd::string(AssetsFolderPath) + m_blenderFilename + "/" + MaterialsFolder.data() + "/";
-
-			fullFilePath += materialFilePath + materialName + MaterialExtension.data();
+			AZStd::string fullFilePath = projectRootPath + materialFilePath + materialName + MaterialExtension.data();
 
 			AZ::Utils::WriteFile(materialContent, fullFilePath.c_str());
 
 			AZStd::string azMaterialPath = materialFilePath + materialName + AzMaterialExtension.data();
-			materialList.push_back(azMaterialPath);
 			if (AZ::IO::FileIOBase::GetInstance()->Exists(azMaterialPath.c_str()))
 			{
 				AZ::Data::AssetId materialAssetId;
@@ -156,11 +164,6 @@ namespace GeomNodes
 				}
 			}
 		}
-
-		if (!materialList.empty())
-		{
-			m_renderMesh->SetMaterialList(materialList);
-		}
 	}
 
 	void GNMeshController::SetFileName(const AZStd::string& path)

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

@@ -18,8 +18,7 @@ namespace GeomNodes
     void GNModelData::ReadData(AZ::u64 mapId)
     {
 		m_meshes.clear();
-		m_assignedMeshmap.clear();
-
+		
 		if (OpenSHM(mapId))
 		{
 			AZ::s32 meshCount = Read<AZ::s32>(mapId);
@@ -115,6 +114,7 @@ namespace GeomNodes
 			}
 
 			m_meshes.clear();
+			m_materials.clear();
 
 			// merge all meshes in each mesh group along with their instances
 			AZ::u32 materialIndex = 0;
@@ -132,9 +132,9 @@ namespace GeomNodes
 					meshData.CalculateAABB();
 					m_aabb.AddAabb(meshData.GetAabb()); // add mesh data's aabb to get the aabb for the whole model
 					m_meshes.push_back(meshData);
+					m_materials.push_back(meshGroup.first);
+					materialIndex++;
 				}
-
-				materialIndex++;
 			}
 
 			// Convert to only one buffers/arrays and keep track of the offsets and element counts
@@ -154,17 +154,9 @@ namespace GeomNodes
         return m_meshes;
     }
 
-	GNMeshData GNModelData::GetMeshData(AZ::u64 entityId)
-	{
-		auto iter = m_assignedMeshmap.find(entityId);
-		AZ_Assert(iter != m_assignedMeshmap.end(), "Mesh data is not assigned yet. Check the entity id.");
-		
-		return m_meshes[iter->second];
-	}
-
-	void GNModelData::AssignMeshData(AZ::u64 entityId)
+	MaterialList GNModelData::GetMaterials()
 	{
-		m_assignedMeshmap.emplace(AZStd::make_pair(entityId, aznumeric_cast<AZ::u32>(m_assignedMeshmap.size())));
+		return m_materials;
 	}
 
 	const U32Vector& GNModelData::GetIndices() const

+ 3 - 6
Gems/O3DE/GeomNodes/Code/Source/Editor/Rendering/GNModelData.h

@@ -9,8 +9,7 @@ namespace GeomNodes
     {
     public:
         using MeshDataList = AZStd::vector<GNMeshData>;
-        using AssignedMeshMap = AZStd::map<AZ::u64, AZ::u32>;
-
+        
         GNModelData();
         GNModelData(AZ::u64 mapId);
         ~GNModelData() = default;
@@ -19,9 +18,7 @@ namespace GeomNodes
 
         const AZ::u32 MeshCount() const;
         const MeshDataList GetMeshes() const;
-
-        GNMeshData GetMeshData(AZ::u64 entityId);
-        void AssignMeshData(AZ::u64 entityId);
+        MaterialList GetMaterials();
 
         // These functions are the combination of all mesh buffers in order based on their position in MeshDataList
 		const U32Vector& GetIndices() const;
@@ -44,7 +41,7 @@ namespace GeomNodes
         T Read(AZ::u64 mapId);
 
         MeshDataList m_meshes;
-        AssignedMeshMap m_assignedMeshmap;
+        MaterialList m_materials;
 
         // These are all data combined from the meshes in single arrays
 		U32Vector m_indices;

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

@@ -234,7 +234,7 @@ namespace GeomNodes
 		}
     }
 
-    void GNRenderMesh::SetMaterialList(const AZStd::vector<AZStd::string> materials)
+    void GNRenderMesh::SetMaterialList(const AZStd::vector<AZStd::string>& materials)
     {
         m_materialList = materials;
     }

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

@@ -56,7 +56,7 @@ namespace GeomNodes
 
         AZ::Data::Instance<AZ::RPI::Model> GetModel() const;
 
-        void SetMaterialList(const AZStd::vector<AZStd::string> materials);
+        void SetMaterialList(const AZStd::vector<AZStd::string>& materials);
     private:
         //! Creates an attribute buffer in the slot dictated by AttributeTypeT.
         template<AttributeType AttributeTypeT, typename VertexStreamDataType>

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

@@ -1,6 +1,7 @@
 #include "GNInstance.h"
 #include "Bridge.h"
 #include <Editor/Systems/GeomNodesSystem.h>
+#include <Editor/Common/GNConstants.h>
 
 namespace GeomNodes
 {
@@ -100,5 +101,76 @@ namespace GeomNodes
 
         return true;
     }
-    
+
+    void GNInstance::SendParamUpdates(const AZStd::string& params, const AZStd::string& objectName)
+    {
+		auto msg = AZStd::string::format(
+			R"JSON(
+                {
+                    "%s": [ %s ],
+                    "%s": "%s",
+                    "Frame": 0,
+                    "ParamUpdate": true
+                }
+            )JSON"
+			, Field::Params
+			, params.c_str()
+			, Field::Object
+			, objectName.c_str()
+		);
+
+		SendIPCMsg(msg);
+    }
+
+    void GNInstance::SendHeartbeat()
+    {
+		SendIPCMsg(R"JSON(
+                        {
+                            "Alive": true 
+                        }
+                    )JSON");
+    }
+
+    void GNInstance::RequestObjectParams()
+    {
+		SendIPCMsg(R"JSON(
+                        {
+                            "FetchObjectParams": true 
+                        }
+                    )JSON");
+    }
+
+    void GNInstance::CloseMap(AZ::u64 mapId)
+    {
+		auto msg = AZStd::string::format(
+			R"JSON(
+                    {
+                        "%s": true,
+                        "%s": %llu
+                    }
+                    )JSON",
+			Field::SHMClose,
+			Field::MapId,
+			mapId);
+		SendIPCMsg(msg);
+    }
+
+    void GNInstance::RequestExport(const AZStd::string& fbxPath, const AZStd::string& objectName)
+    {
+		auto msg = AZStd::string::format(
+			R"JSON(
+                    {
+                        "%s": true,
+                        "%s": "%s",
+                        "%s": "%s"
+                    }
+                    )JSON",
+			Field::Export,
+			Field::Object,
+			objectName.c_str(),
+			Field::FBXPath,
+			fbxPath.c_str());
+		SendIPCMsg(msg);
+    }
+
 } // namespace GeomNodes

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

@@ -15,19 +15,20 @@ namespace GeomNodes
         virtual ~GNInstance();
 
         bool Init(const AZStd::string& filePath, const AZStd::string& scriptPath, const AZStd::string& exePath, AZ::EntityId entityId);
-
         void Cleanup();
-
         bool IsValid();
-
         void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
-
         bool IsSamePath(const AZStd::string& path);
-
         void SendIPCMsg(const AZStd::string& content);
-
         bool RestartProcess();
 
+        // Ipc messaging
+        void SendParamUpdates(const AZStd::string& params, const AZStd::string& objectName);
+        void SendHeartbeat();
+        void RequestObjectParams();
+        void CloseMap(AZ::u64 mapId);
+        void RequestExport(const AZStd::string& fbxPath, const AZStd::string& objectName);
+
     private:
         AZStd::unique_ptr<AzFramework::ProcessWatcher> m_blenderProcessWatcher = nullptr;
 

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

@@ -3,6 +3,7 @@
 #include <AzCore/RTTI/ReflectContext.h>
 #include <AzCore/JSON/document.h>
 #include <AzCore/JSON/rapidjson.h>
+#include <Editor/Common/GNConstants.h>
 
 namespace GeomNodes
 {
@@ -10,32 +11,6 @@ namespace GeomNodes
     class GNParamContextImpl;
     class GNParamContext;
 
-    namespace Field
-    {
-        static constexpr char Initialized[] = "Initialized";
-        static constexpr char Heartbeat[] = "Heartbeat";
-        static constexpr char ObjectNames[] = "ObjectNames";
-        static constexpr char Objects[] = "Objects";
-        static constexpr char Object[] = "Object";
-        static constexpr char SHMOpen[] = "SHMOpen";
-        static constexpr char SHMClose[] = "SHMClose";
-        static constexpr char MapId[] = "MapId";
-        static constexpr char Export[] = "Export";
-        static constexpr char Error[] = "Error";
-
-        static constexpr char Params[] = "Params";
-        static constexpr char Materials[] = "Materials";
-        static constexpr char Id[] = "Id";
-        static constexpr char Name[] = "Name";
-        static constexpr char Type[] = "Type";
-        static constexpr char DefaultValue[] = "DefaultValue";
-        static constexpr char Value[] = "Value";
-        static constexpr char MinValue[] = "MinValue";
-        static constexpr char MaxValue[] = "MaxValue";
-
-        static constexpr char FBXPath[] = "FBXPath";
-    }
-
     enum class ParamType : AZ::u8
     {
         Bool,