Merge pull request #7075 from aws-lumberyard-dev/scripting/text_issues
Addressed a few Script Canvas translation issues
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
"context": "BehaviorClass",
|
||||
"variant": "",
|
||||
"details": {
|
||||
"name": "Material Data"
|
||||
"name": "Material Data",
|
||||
"category": "Rendering"
|
||||
},
|
||||
"methods": [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"base": "{0B0AC61B-4BBA-42BF-BDCD-DAF2D3CA41A8}",
|
||||
"base": "{0A2EB488-5A6A-E166-BB62-23FF81499E33}",
|
||||
"context": "ScriptCanvas::Node",
|
||||
"variant": "",
|
||||
"details": {
|
||||
@@ -10,6 +10,13 @@
|
||||
"tooltip": "Handle processed input events found in input binding assets"
|
||||
},
|
||||
"slots": [
|
||||
{
|
||||
"base": "Input_Connect Event_0",
|
||||
"details": {
|
||||
"name": "Connect Event",
|
||||
"tooltip": "Connect to input event name as defined in an input binding asset."
|
||||
}
|
||||
},
|
||||
{
|
||||
"base": "DataInput_Event Name_0",
|
||||
"details": {
|
||||
@@ -17,27 +24,34 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"base": "DataOutput_Value_0",
|
||||
"base": "Output_On Connect Event_0",
|
||||
"details": {
|
||||
"name": "Value"
|
||||
"name": "On Connect Event",
|
||||
"tooltip": "Connect to input event name as defined in an input binding asset."
|
||||
}
|
||||
},
|
||||
{
|
||||
"base": "Output_Pressed_0",
|
||||
"base": "Output_Pressed_1",
|
||||
"details": {
|
||||
"name": "Pressed",
|
||||
"tooltip": "Signaled when the input event begins."
|
||||
}
|
||||
},
|
||||
{
|
||||
"base": "Output_Held_1",
|
||||
"base": "DataOutput_value_0",
|
||||
"details": {
|
||||
"name": "value"
|
||||
}
|
||||
},
|
||||
{
|
||||
"base": "Output_Held_2",
|
||||
"details": {
|
||||
"name": "Held",
|
||||
"tooltip": "Signaled while the input event is active."
|
||||
}
|
||||
},
|
||||
{
|
||||
"base": "Output_Released_2",
|
||||
"base": "Output_Released_3",
|
||||
"details": {
|
||||
"name": "Released",
|
||||
"tooltip": "Signaled when the input event ends."
|
||||
|
||||
@@ -881,6 +881,23 @@ namespace ScriptCanvasEditor
|
||||
return "";
|
||||
}
|
||||
|
||||
void NodePaletteDockWidget::NavigateToTranslationFile(GraphCanvas::NodePaletteTreeItem* nodePaletteItem)
|
||||
{
|
||||
if (nodePaletteItem)
|
||||
{
|
||||
AZ::IO::Path gemPath = GetGemPath("ScriptCanvas.Editor");
|
||||
gemPath = gemPath / AZ::IO::Path("TranslationAssets");
|
||||
gemPath = gemPath / nodePaletteItem->GetTranslationDataPath();
|
||||
gemPath.ReplaceExtension(".names");
|
||||
|
||||
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
|
||||
if (fileIO && fileIO->Exists(gemPath.c_str()))
|
||||
{
|
||||
AzQtComponents::ShowFileOnDesktop(gemPath.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NodePaletteDockWidget::GenerateTranslation()
|
||||
{
|
||||
QModelIndexList indexList = GetTreeView()->selectionModel()->selectedRows();
|
||||
@@ -894,6 +911,16 @@ namespace ScriptCanvasEditor
|
||||
GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast<GraphCanvas::NodePaletteTreeItem*>(sourceIndex.internalPointer());
|
||||
nodePaletteItem->GenerateTranslationData();
|
||||
}
|
||||
|
||||
if (indexList.size() == 1)
|
||||
{
|
||||
QModelIndex sourceIndex = filterModel->mapToSource(indexList[0]);
|
||||
if (sourceIndex.isValid())
|
||||
{
|
||||
GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast<GraphCanvas::NodePaletteTreeItem*>(sourceIndex.internalPointer());
|
||||
NavigateToTranslationFile(nodePaletteItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NodePaletteDockWidget::OpenTranslationData()
|
||||
@@ -909,19 +936,7 @@ namespace ScriptCanvasEditor
|
||||
QModelIndex sourceIndex = filterModel->mapToSource(index);
|
||||
|
||||
GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast<GraphCanvas::NodePaletteTreeItem*>(sourceIndex.internalPointer());
|
||||
if (nodePaletteItem)
|
||||
{
|
||||
AZ::IO::Path gemPath = GetGemPath("ScriptCanvas.Editor");
|
||||
gemPath = gemPath / AZ::IO::Path("TranslationAssets");
|
||||
gemPath = gemPath / nodePaletteItem->GetTranslationDataPath();
|
||||
gemPath.ReplaceExtension(".names");
|
||||
|
||||
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
|
||||
if (fileIO->Exists(gemPath.c_str()))
|
||||
{
|
||||
AzQtComponents::ShowFileOnDesktop(gemPath.c_str());
|
||||
}
|
||||
}
|
||||
NavigateToTranslationFile(nodePaletteItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +209,7 @@ namespace ScriptCanvasEditor
|
||||
void HandleTreeItemDoubleClicked(GraphCanvas::GraphCanvasTreeItem* treeItem);
|
||||
void OpenTranslationData();
|
||||
void GenerateTranslation();
|
||||
void NavigateToTranslationFile(GraphCanvas::NodePaletteTreeItem*);
|
||||
|
||||
void ConfigureHelper();
|
||||
void ParseCycleTargets(GraphCanvas::GraphCanvasTreeItem* treeItem);
|
||||
|
||||
Reference in New Issue
Block a user