redcoding asset handler, holder, tracker, memory asset

Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
carlitosan
2021-12-13 14:14:31 -08:00
parent 4670003aaf
commit c5d370723e
40 changed files with 137 additions and 2626 deletions
@@ -38,7 +38,6 @@
#include <AzQtComponents/Utilities/DesktopUtilities.h>
#include <Editor/Assets/ScriptCanvasAssetHelpers.h>
#include <Editor/Components/IconComponent.h>
#include <Editor/GraphCanvas/GraphCanvasEditorNotificationBusId.h>
#include <Editor/GraphCanvas/GraphCanvasEditorNotificationBusId.h>
@@ -462,32 +461,35 @@ namespace ScriptCanvasEditor
return;
}
AZStd::string rootPath, absolutePath;
AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath);
AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), absolutePath);
AZStd::string normPath = absolutePath;
AzFramework::StringFunc::Path::Normalize(normPath);
AZStd::string watchFolder;
bool sourceInfoFound{};
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, normPath.c_str(), assetInfo, watchFolder);
if (!sourceInfoFound)
{
return;
}
CreateFunctionPaletteItem(asset, assetInfo);
treePaletteIter = m_globalFunctionTreeItems.find(asset->GetId());
if (treePaletteIter != m_globalFunctionTreeItems.end())
{
treePaletteIter->second->ClearError();
}
m_monitoredAssets.emplace(asset->GetId(), asset);
// #sc_editor_asset_redux THIS WHOLE THING NEEDS TO BE REDONE TO MAKE SURE THAT USER FUNCTIONS SHOW UP IN THE
// NODE PALETTE
//
// AZStd::string rootPath, absolutePath;
// AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath);
// AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), absolutePath);
//
// AZStd::string normPath = absolutePath;
// AzFramework::StringFunc::Path::Normalize(normPath);
//
// AZStd::string watchFolder;
// bool sourceInfoFound{};
// AzToolsFramework::AssetSystemRequestBus::BroadcastResult(sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, normPath.c_str(), assetInfo, watchFolder);
//
// if (!sourceInfoFound)
// {
// return;
// }
//
// CreateFunctionPaletteItem(asset, assetInfo);
//
// treePaletteIter = m_globalFunctionTreeItems.find(asset->GetId());
//
// if (treePaletteIter != m_globalFunctionTreeItems.end())
// {
// treePaletteIter->second->ClearError();
// }
//
// m_monitoredAssets.emplace(asset->GetId(), asset);
}
else
{