more aggressively release graph memory in version explorer

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-11-18 10:41:46 -08:00
committed by Chris Burel
parent 4342501804
commit 727d1b3815
10 changed files with 80 additions and 91 deletions
@@ -27,7 +27,7 @@
#define OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED
#define EDITOR_ASSET_SUPPORT_ENABLED
// #define EDITOR_ASSET_SUPPORT_ENABLED
namespace AZ
{
@@ -52,6 +52,7 @@ namespace GraphCpp
VariablePanelSymantics,
AddVersionData,
RemoveFunctionGraphMarker,
FixupVersionDataTypeId,
// label your version above
Current
};
@@ -71,13 +72,24 @@ namespace ScriptCanvas
componentElementNode.AddElementWithData(context, "m_assetType", azrtti_typeid<RuntimeAsset>());
}
if (componentElementNode.GetVersion() < GraphCpp::GraphVersion::RemoveFunctionGraphMarker)
if (componentElementNode.GetVersion() <= GraphCpp::GraphVersion::RemoveFunctionGraphMarker)
{
componentElementNode.RemoveElementByName(AZ_CRC_CE("isFunctionGraph"));
}
if (componentElementNode.GetVersion() < GraphCpp::GraphVersion::FixupVersionDataTypeId)
{
if (auto subElement = componentElementNode.FindSubElement(AZ_CRC_CE("versionData")))
{
if (subElement->GetId() == azrtti_typeid<SlotId>())
{
componentElementNode.RemoveElementByName(AZ_CRC_CE("versionData"));
}
}
}
return true;
}
}s
Graph::Graph(const ScriptCanvasId& scriptCanvasId)
: m_scriptCanvasId(scriptCanvasId)