initial compile of detailed path of change to regular sc files
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -13,10 +13,13 @@
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <Editor/Include/ScriptCanvas/Assets/ScriptCanvasBaseAssetData.h>
|
||||
// #include <Editor/Include/ScriptCanvas/Components/EditorGraph.h>
|
||||
|
||||
#include "Core.h"
|
||||
#include "Attributes.h"
|
||||
|
||||
#include <Core/Graph.h>
|
||||
|
||||
namespace ScriptCanvas
|
||||
{
|
||||
ScopedAuxiliaryEntityHandler::ScopedAuxiliaryEntityHandler(AZ::Entity* buildEntity)
|
||||
@@ -234,4 +237,36 @@ namespace ScriptCanvasEditor
|
||||
{
|
||||
return m_path;
|
||||
}
|
||||
|
||||
AZStd::string SourceHandle::ToString() const
|
||||
{
|
||||
return AZStd::string::format
|
||||
( "%s, %s, %s"
|
||||
, IsValid() ? "O" : "X"
|
||||
, m_path.empty() ? m_path.c_str() : "<no name>"
|
||||
, m_id.IsNull() ? "<null id>" : m_id.ToString<AZStd::string>().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
namespace ScriptCanvas
|
||||
{
|
||||
const Graph* ScriptCanvasData::GetGraph() const
|
||||
{
|
||||
return AZ::EntityUtils::FindFirstDerivedComponent<ScriptCanvas::Graph>(m_scriptCanvasEntity.get());
|
||||
}
|
||||
|
||||
const ScriptCanvasEditor::Graph* ScriptCanvasData::GetEditorGraph() const
|
||||
{
|
||||
return reinterpret_cast<const ScriptCanvasEditor::Graph*>(GetGraph());
|
||||
}
|
||||
|
||||
Graph* ScriptCanvasData::ModGraph()
|
||||
{
|
||||
return AZ::EntityUtils::FindFirstDerivedComponent<ScriptCanvas::Graph>(m_scriptCanvasEntity.get());
|
||||
}
|
||||
|
||||
ScriptCanvasEditor::Graph* ScriptCanvasData::ModEditorGraph()
|
||||
{
|
||||
return reinterpret_cast<ScriptCanvasEditor::Graph*>(ModGraph());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,6 +353,37 @@ namespace ScriptCanvasEditor
|
||||
};
|
||||
}
|
||||
|
||||
namespace ScriptCanvas
|
||||
{
|
||||
class ScriptCanvasData
|
||||
{
|
||||
public:
|
||||
|
||||
AZ_RTTI(ScriptCanvasData, "{1072E894-0C67-4091-8B64-F7DB324AD13C}");
|
||||
AZ_CLASS_ALLOCATOR(ScriptCanvasData, AZ::SystemAllocator, 0);
|
||||
ScriptCanvasData() {}
|
||||
virtual ~ScriptCanvasData() {}
|
||||
ScriptCanvasData(ScriptCanvasData&& other);
|
||||
ScriptCanvasData& operator=(ScriptCanvasData&& other);
|
||||
|
||||
static void Reflect(AZ::ReflectContext* reflectContext);
|
||||
|
||||
AZ::Entity* GetScriptCanvasEntity() const { return m_scriptCanvasEntity.get(); }
|
||||
|
||||
const Graph* GetGraph() const;
|
||||
|
||||
const ScriptCanvasEditor::Graph* GetEditorGraph() const;
|
||||
|
||||
Graph* ModGraph();
|
||||
|
||||
ScriptCanvasEditor::Graph* ModEditorGraph();
|
||||
|
||||
AZStd::unique_ptr<AZ::Entity> m_scriptCanvasEntity;
|
||||
private:
|
||||
ScriptCanvasData(const ScriptCanvasData&) = delete;
|
||||
};
|
||||
}
|
||||
|
||||
namespace AZStd
|
||||
{
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user