Git MainWindow.cpp to point where it compiles, and reveals the radius of changes for everything to work without assets
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <AzCore/RTTI/ReflectContext.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h>
|
||||
|
||||
#include "Core.h"
|
||||
#include "Attributes.h"
|
||||
@@ -182,5 +183,55 @@ namespace ScriptCanvas
|
||||
|
||||
serializeContext->RegisterType(typeId, AZStd::move(classData), EventPlaceholderAnyCreator);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace ScriptCanvasEditor
|
||||
{
|
||||
SourceHandle::SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, AZStd::string_view path)
|
||||
: m_data(graph)
|
||||
, m_id(id)
|
||||
, m_path(path)
|
||||
{}
|
||||
|
||||
void SourceHandle::Clear()
|
||||
{
|
||||
m_data = nullptr;
|
||||
m_id = AZ::Uuid::CreateNull();
|
||||
m_path.clear();
|
||||
}
|
||||
|
||||
GraphPtrConst SourceHandle::Get() const
|
||||
{
|
||||
return m_data ? m_data->GetEditorGraph() : nullptr;
|
||||
}
|
||||
|
||||
const AZ::Uuid& SourceHandle::Id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
bool SourceHandle::IsValid() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
GraphPtr SourceHandle::Mod() const
|
||||
{
|
||||
return m_data ? m_data->ModEditorGraph() : nullptr;
|
||||
}
|
||||
|
||||
SourceHandle::operator bool() const
|
||||
{
|
||||
return m_data != nullptr;
|
||||
}
|
||||
|
||||
bool SourceHandle::operator!() const
|
||||
{
|
||||
return m_data == nullptr;
|
||||
}
|
||||
|
||||
const AZStd::string& SourceHandle::Path() const
|
||||
{
|
||||
return m_path;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <AzCore/std/hash.h>
|
||||
#include <AzCore/Component/EntityUtils.h>
|
||||
#include <AzCore/Component/NamedEntityId.h>
|
||||
|
||||
#include <AzCore/Math/Uuid.h>
|
||||
#include <Core/NamedId.h>
|
||||
#include <ScriptCanvas/Grammar/PrimitivesDeclarations.h>
|
||||
|
||||
@@ -318,7 +318,39 @@ namespace ScriptCanvasEditor
|
||||
using GraphPtr = Graph*;
|
||||
using GraphPtrConst = const Graph*;
|
||||
|
||||
class SourceHandle;
|
||||
class SourceHandle
|
||||
{
|
||||
public:
|
||||
AZ_TYPE_INFO(SourceHandle, "{65855A98-AE2F-427F-BFC8-69D45265E312}");
|
||||
AZ_CLASS_ALLOCATOR(SourceHandle, AZ::SystemAllocator, 0);
|
||||
|
||||
SourceHandle() = default;
|
||||
|
||||
SourceHandle(ScriptCanvas::DataPtr graph, const AZ::Uuid& id, AZStd::string_view path);
|
||||
|
||||
void Clear();
|
||||
|
||||
GraphPtrConst Get() const;
|
||||
|
||||
const AZ::Uuid& Id() const;
|
||||
|
||||
bool IsValid() const;
|
||||
|
||||
GraphPtr Mod() const;
|
||||
|
||||
operator bool() const;
|
||||
|
||||
bool operator!() const;
|
||||
|
||||
const AZStd::string& Path() const;
|
||||
|
||||
AZStd::string ToString() const;
|
||||
|
||||
private:
|
||||
ScriptCanvas::DataPtr m_data;
|
||||
AZ::Uuid m_id = AZ::Uuid::CreateNull();
|
||||
AZStd::string m_path;
|
||||
};
|
||||
}
|
||||
|
||||
namespace AZStd
|
||||
|
||||
Reference in New Issue
Block a user