Skip to content

Commit

Permalink
GraphEditor - Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daethalus committed May 17, 2024
1 parent 2006cb8 commit a22283f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Editor/Source/Fyrion/Editor/Editor/GraphEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ namespace Fyrion
graphAsset.AddToSubObjectSet(ResourceGraphAsset::Nodes, nodeAsset);
graphAsset.Commit();

Repository::SetUUID(nodeAsset, UUID::RandomUUID());

AddNodeCache(nodeAsset);

m_assetTree.MarkDirty();
Expand All @@ -232,6 +234,8 @@ namespace Fyrion
graphAsset.AddToSubObjectSet(ResourceGraphAsset::Nodes, nodeAsset);
graphAsset.Commit();

Repository::SetUUID(nodeAsset, UUID::RandomUUID());

AddNodeCache(nodeAsset);

m_assetTree.MarkDirty();
Expand All @@ -258,9 +262,16 @@ namespace Fyrion
linkObject[GraphNodeLinkAsset::OutputPin] = output->name;
linkObject.Commit();

AddLinkCache(linkAsset);
ResourceObject graphAsset = Repository::Write(m_graph);
graphAsset.AddToSubObjectSet(ResourceGraphAsset::Links, linkAsset);
graphAsset.Commit();

Repository::SetUUID(linkAsset, UUID::RandomUUID());

m_assetTree.MarkDirty();

AddLinkCache(linkAsset);

}

bool GraphEditor::IsGraphLoaded() const
Expand Down

0 comments on commit a22283f

Please sign in to comment.