Initial fixes for graph update tool

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-08-30 08:30:56 -07:00
parent 34939dcb10
commit 9688832adc
12 changed files with 274 additions and 332 deletions
@@ -79,7 +79,7 @@ namespace ScriptCanvasEditor
{
if (node->GetComponents().empty())
{
AZ_TracePrintf("Script Canvas", "Removing node due to missing components: %s\nVerify that all gems that this script relies on are enabled\n", node->GetName().c_str());
AZ_TracePrintf(ScriptCanvas::k_VersionExplorerWindow.data(), "Removing node due to missing components: %s\nVerify that all gems that this script relies on are enabled\n", node->GetName().c_str());
nodesToRemove.push_back(node);
}
@@ -193,7 +193,7 @@ namespace ScriptCanvasEditor
}
else
{
AZ_Warning("ScriptCanvas", false, "Could not find ScriptCanvas Node with id %llu", static_cast<AZ::u64>(scriptCanvasSourceEndpoint.GetNodeId()));
AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), false, "Could not find ScriptCanvas Node with id %llu", static_cast<AZ::u64>(scriptCanvasSourceEndpoint.GetNodeId()));
}
AZ::EntityId graphCanvasSourceSlotId;
@@ -213,7 +213,7 @@ namespace ScriptCanvasEditor
if (!graphCanvasSourceSlotId.IsValid())
{
AZ_Warning("ScriptCanvas", sm->m_deletedNodes.count(scriptCanvasSourceEndpoint.GetNodeId()) > 0, "Could not create connection(%s) for Node(%s).", connectionId.ToString().c_str(), scriptCanvasSourceEndpoint.GetNodeId().ToString().c_str());
AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), sm->m_deletedNodes.count(scriptCanvasSourceEndpoint.GetNodeId()) > 0, "Could not create connection(%s) for Node(%s).", connectionId.ToString().c_str(), scriptCanvasSourceEndpoint.GetNodeId().ToString().c_str());
graph->DisconnectById(connectionId);
continue;
}
@@ -229,7 +229,7 @@ namespace ScriptCanvasEditor
}
else
{
AZ_Warning("ScriptCanvas", false, "Could not find ScriptCanvas Node with id %llu", static_cast<AZ::u64>(scriptCanvasSourceEndpoint.GetNodeId()));
AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), false, "Could not find ScriptCanvas Node with id %llu", static_cast<AZ::u64>(scriptCanvasSourceEndpoint.GetNodeId()));
}
SlotMappingRequestBus::EventResult(graphCanvasTargetEndpoint.m_slotId, graphCanvasTargetEndpoint.GetNodeId(), &SlotMappingRequests::MapToGraphCanvasId, scriptCanvasTargetEndpoint.GetSlotId());
@@ -245,7 +245,7 @@ namespace ScriptCanvasEditor
if (!graphCanvasTargetEndpoint.IsValid())
{
AZ_Warning("ScriptCanvas", sm->m_deletedNodes.count(scriptCanvasTargetEndpoint.GetNodeId()) > 0, "Could not create connection(%s) for Node(%s).", connectionId.ToString().c_str(), scriptCanvasTargetEndpoint.GetNodeId().ToString().c_str());
AZ_Warning(ScriptCanvas::k_VersionExplorerWindow.data(), sm->m_deletedNodes.count(scriptCanvasTargetEndpoint.GetNodeId()) > 0, "Could not create connection(%s) for Node(%s).", connectionId.ToString().c_str(), scriptCanvasTargetEndpoint.GetNodeId().ToString().c_str());
graph->DisconnectById(connectionId);
continue;
}
@@ -422,7 +422,7 @@ namespace ScriptCanvasEditor
if (!sm->m_updateReport.IsEmpty())
{
// currently, it is expected that there are no deleted old slots, those need manual correction
AZ_Error("ScriptCanvas", sm->m_updateReport.m_deletedOldSlots.empty(), "Graph upgrade path: If old slots are deleted, manual upgrading is required");
AZ_Error(ScriptCanvas::k_VersionExplorerWindow.data(), sm->m_updateReport.m_deletedOldSlots.empty(), "Graph upgrade path: If old slots are deleted, manual upgrading is required");
UpdateConnectionStatus(*graph, sm->m_updateReport);
}
}
@@ -690,6 +690,10 @@ namespace ScriptCanvasEditor
//////////////////////////////////////////////////////////////////////
// State Machine Internals
bool StateMachine::GetVerbose() const
{
return m_isVerbose;
}
void StateMachine::OnSystemTick()
{
@@ -743,7 +747,10 @@ namespace ScriptCanvasEditor
AZ::SystemTickBus::Handler::BusConnect();
}
}
void StateMachine::SetVerbose(bool isVerbose)
{
m_isVerbose = isVerbose;
}
}