Files
bluflame/intromat/Intromat/Nodes/Code/LiteralModelBase.cs
2026-04-18 22:31:51 +02:00

35 lines
865 B
C#

using System.Xml.Serialization;
using Intromat.Nodes.Textures;
using Intromat.PersistentModel;
namespace Intromat.Nodes.Code
{
public enum ERelativeSource
{
Custom,
Parent,
Input
}
[XmlInclude(typeof(IntLiteralModel))]
[XmlInclude(typeof(StringLiteralModel))]
[XmlInclude(typeof(FloatLiteralModel))]
[XmlInclude(typeof(BooleanLiteralModel))]
[XmlInclude(typeof(SamplerLiteralModel))]
public abstract class LiteralModelBase : NodeModelBase
{
public ERelativeSource RelativeSource { get; set; }
}
public class LiteralModelEntry
{
public string Key { get; set; } = null!;
public LiteralModelBase Literal { get; set; } = null!;
}
public abstract class LiteralModelBase<T> : LiteralModelBase
{
public T Value { get; set; } = default!;
}
}