Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/PixiParser/Models/Graph/Blackboard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Collections.Generic;
using MessagePack;

namespace PixiEditor.Parser.Graph;

[MessagePackObject]
public class Blackboard
{
[Key(0)]
public List<Variable> Variables { get; set; } = new();
}
3 changes: 2 additions & 1 deletion src/PixiParser/Models/Graph/NodeGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ namespace PixiEditor.Parser.Graph;
public class NodeGraph
{
[Key(0)] public List<Node> AllNodes { get; set; }
}
[Key(1)] public Blackboard Blackboard { get; set; }
}
25 changes: 25 additions & 0 deletions src/PixiParser/Models/Graph/Variable.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using MessagePack;

namespace PixiEditor.Parser.Graph;

[MessagePackObject]
public class Variable
{
[Key(0)]
public string Name { get; set; }

[Key(1)]
public object Value { get; set; }

[Key(2)]
public string? Unit { get; set; }

[Key(3)]
public double? Min { get; set; }

[Key(4)]
public double? Max { get; set; }
Comment on lines +17 to +21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these need to be doubles or can they be generic?

I could imagine some sort of min/max vector in the future or something


[Key(5)]
public bool IsExposed { get; set; } = true;
}