source save asset-free WIP

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-11-08 10:00:45 -08:00
committed by Chris Burel
parent d40b9fc809
commit 1ea245e46c
9 changed files with 269 additions and 150 deletions
@@ -26,10 +26,12 @@ namespace ScriptCanvas
namespace ScriptCanvasEditor
{
AZ::Outcome<ScriptCanvasEditor::SourceHandle, AZStd::string> LoadFromFile(AZStd::string_view path);
AZ::Outcome<SourceHandle, AZStd::string> LoadFromFile(AZStd::string_view path);
AZ::Outcome<void, AZStd::string> LoadDataFromJson
( ScriptCanvas::ScriptCanvasData& dataTarget
, AZStd::string_view source
, AZ::SerializeContext& serializeContext);
}
AZ::Outcome<void, AZStd::string> SaveToStream(const SourceHandle& source, AZ::IO::GenericStream& stream);
}
@@ -309,6 +309,7 @@ namespace ScriptCanvasEditor
const GraphStatisticsHelper& GetNodeUsageStatistics() const;
void MarkOwnership(ScriptCanvas::ScriptCanvasData& owner);
ScriptCanvas::DataPtr GetOwnership() const;
// Finds and returns all nodes within the graph that are of the specified type
template <typename NodeType>
@@ -393,6 +394,7 @@ namespace ScriptCanvasEditor
bool m_saveFormatConverted = true;
ScriptCanvasEditor::SourceHandle m_assetId;
// #sc_editor_asset temporary step in cleaning up the graph / asset class structure. This reference is deliberately weak.
ScriptCanvas::ScriptCanvasData* m_owner;
};
}