From 0ecfb1b55724cfa515d41be1a1a2762eadfd8079 Mon Sep 17 00:00:00 2001 From: lsemp3d <58790905+lsemp3d@users.noreply.github.com> Date: Thu, 18 Nov 2021 16:23:55 -0800 Subject: [PATCH] Fixed file saving path for BehaviorClass generation + more node updates Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com> --- ...Framework__SurfaceData__SurfacePoint.names | 141 ++++++++++++++++++ .../Classes/SurfaceTagWeight.names | 3 +- .../Code/Tools/TranslationGeneration.cpp | 3 +- 3 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names new file mode 100644 index 0000000000..dfcbac7dad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names @@ -0,0 +1,141 @@ +{ + "entries": [ + { + "key": "AzFramework::SurfaceData::SurfacePoint", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Surface Point", + "category": "Surface Data" + }, + "methods": [ + { + "key": "Getposition", + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "key": "Setposition", + "details": { + "name": "Set Position" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "key": "Getnormal", + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "key": "Setnormal", + "details": { + "name": "Set Normal" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "key": "GetsurfaceTags", + "details": { + "name": "Get Surface Tags" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Tags" + } + } + ] + }, + { + "key": "SetsurfaceTags", + "details": { + "name": "Set Surface Tags" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Tags" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names index 0f44e4f9c0..0c1b3b7e1d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Surface Tag Weight" + "name": "Surface Tag Weight", + "category": "Surface Data" }, "methods": [ { diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp index a0747f78f0..c374f6e5c2 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp @@ -327,7 +327,8 @@ namespace ScriptCanvasEditorTools translationRoot.m_entries.push_back(entry); - AZStd::string fileName = AZStd::string::format("Classes/%s", className.c_str()); + AZStd::string sanitizedFilename = GraphCanvas::TranslationKey::Sanitize(className); + AZStd::string fileName = AZStd::string::format("Classes/%s", sanitizedFilename.c_str()); SaveJSONData(fileName, translationRoot);