initial compile of detailed path of change to regular sc files

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-10-29 16:23:20 -07:00
committed by Chris Burel
parent c5cd854172
commit bc342df6b4
26 changed files with 388 additions and 367 deletions
@@ -82,30 +82,31 @@ namespace ScriptCanvasEditor
void ScriptCanvasAssetHolder::OpenEditor() const
{
AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas);
AZ::Outcome<int, AZStd::string> openOutcome = AZ::Failure(AZStd::string());
if (m_scriptCanvasAsset.IsReady())
{
GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_scriptCanvasAsset.GetId(), -1);
if (!openOutcome)
{
AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data());
}
}
else if (m_ownerId.first.IsValid())
{
AzToolsFramework::EntityIdList selectedEntityIds;
AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
// Going to bypass the multiple selected entities flow for right now.
if (selectedEntityIds.size() == 1)
{
GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, m_ownerId);
}
}
// #sc_editor_asset
// AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas);
//
// AZ::Outcome<int, AZStd::string> openOutcome = AZ::Failure(AZStd::string());
//
// if (m_scriptCanvasAsset.IsReady())
// {
// GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_scriptCanvasAsset.GetId(), -1);
//
// if (!openOutcome)
// {
// AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data());
// }
// }
// else if (m_ownerId.first.IsValid())
// {
// AzToolsFramework::EntityIdList selectedEntityIds;
// AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
//
// // Going to bypass the multiple selected entities flow for right now.
// if (selectedEntityIds.size() == 1)
// {
// GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, m_ownerId);
// }
// }
}
ScriptCanvas::ScriptCanvasId ScriptCanvasAssetHolder::GetScriptCanvasId() const