clean up open pipeline to render graph

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-11-03 19:15:44 -07:00
parent 6c130c7a86
commit b635e112fc
15 changed files with 616 additions and 569 deletions
@@ -190,12 +190,27 @@ namespace ScriptCanvas
namespace ScriptCanvasEditor
{
SourceHandle::SourceHandle(const SourceHandle& data, const AZ::Uuid& id, AZStd::string_view path)
: m_data(data.m_data)
, m_id(id)
, m_path(path)
{
}
SourceHandle::SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, AZStd::string_view path)
: m_data(graph)
, m_id(id)
, m_path(path)
{}
bool SourceHandle::AnyEquals(const SourceHandle& other) const
{
return m_data == other.m_data
|| m_id == other.m_id
|| m_path == other.m_path;
}
void SourceHandle::Clear()
{
m_data = nullptr;
@@ -326,8 +326,12 @@ namespace ScriptCanvasEditor
SourceHandle() = default;
SourceHandle(const SourceHandle& data, const AZ::Uuid& id, AZStd::string_view path);
SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, AZStd::string_view path);
bool AnyEquals(const SourceHandle& other) const;
void Clear();
GraphPtrConst Get() const;
@@ -391,11 +395,28 @@ namespace AZStd
{
using argument_type = ScriptCanvas::SlotId;
using result_type = AZStd::size_t;
AZ_FORCE_INLINE size_t operator()(const argument_type& ref) const
inline size_t operator()(const argument_type& ref) const
{
return AZStd::hash<AZ::Uuid>()(ref.m_id);
}
};
template<>
struct hash<ScriptCanvasEditor::SourceHandle>
{
using argument_type = ScriptCanvasEditor::SourceHandle;
using result_type = AZStd::size_t;
inline size_t operator()(const argument_type& handle) const
{
size_t h = 0;
hash_combine(h, handle.Id());
hash_combine(h, handle.Path());
hash_combine(h, handle.Get());
return h;
}
};
}
#define SCRIPT_CANVAS_INFINITE_LOOP_DETECTION_COUNT (2000000)