Преглед на файлове

Fix for Object parameter change doesn't trigger a mesh rebuild.

Signed-off-by: Jason Dela Cruz <[email protected]>
Jason Dela Cruz преди 2 години
родител
ревизия
b7114e2891
променени са 1 файла, в които са добавени 23 реда и са изтрити 24 реда
  1. 23 24
      Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.cpp

+ 23 - 24
Gems/O3DE/GeomNodes/Code/Source/Editor/Components/EditorGeomNodesComponent.cpp

@@ -163,33 +163,32 @@ namespace GeomNodes
 
 
             // TODO: send a message to blender since we need to update the object rendered
             // TODO: send a message to blender since we need to update the object rendered
         }
         }
-        else
+        
+        if(m_instance && !m_instance->IsValid())
         {
         {
-            if(m_instance && !m_instance->IsValid())
-            {
-                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->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);
+        
+
         AZ_Printf("EditorGeomNodesComponent", "Parameter has changed");
         AZ_Printf("EditorGeomNodesComponent", "Parameter has changed");
     }
     }