diff --git a/ProjectObsidian.SourceGenerators/BindingGenerator.cs b/ProjectObsidian.SourceGenerators/BindingGenerator.cs index 4bfc162..4c57764 100644 --- a/ProjectObsidian.SourceGenerators/BindingGenerator.cs +++ b/ProjectObsidian.SourceGenerators/BindingGenerator.cs @@ -146,6 +146,7 @@ public string Result namespace {BindingPrefix}{_currentNameSpace}; +{_genericTypesAttribute} [Category(new string[] {{""ProtoFlux/Runtimes/Execution/Nodes/{_category}""}})] public partial class {_fullName} : global::FrooxEngine.ProtoFlux.Runtimes.Execution.{_baseType} {_constraints} {{ @@ -186,6 +187,7 @@ public override N Instantiate() private string _debug = ""; private bool _isValidGenericTypeMethod; private string _constraints = ""; + private string _genericTypesAttribute; private bool TypedFieldDetection(string type, string name, string targetTypeName, string declarationFormat, OrderedCount counter) { @@ -309,6 +311,8 @@ public override void VisitClassDeclaration(ClassDeclarationSyntax node) var find = node.AttributeLists.SelectMany(i => i.Attributes) .FirstOrDefault(i => i.Name.ToString() == "NodeCategory"); + _genericTypesAttribute = node.AttributeLists.FirstOrDefault(attrList => attrList.Attributes.Any(attr => attr.Name.ToString() == "GenericTypes"))?.ToString(); + if (find?.ArgumentList is null) { base.VisitClassDeclaration(node); diff --git a/ProjectObsidian/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/ProjectObsidian/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index ab74f9f..09d4fc0 100644 --- a/ProjectObsidian/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/ProjectObsidian/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -4,6 +4,7 @@ namespace Obsidian; +[DataModelType] public enum ArithmeticMode { Addition, diff --git a/ProjectObsidian/ProjectObsidian.csproj b/ProjectObsidian/ProjectObsidian.csproj index 339892e..f7b1f11 100644 --- a/ProjectObsidian/ProjectObsidian.csproj +++ b/ProjectObsidian/ProjectObsidian.csproj @@ -4,7 +4,7 @@ Project-Obsidian net48 11 - Copyright © 2023 + Copyright © 2024 Project-Obsidian diff --git a/ProjectObsidian/Properties/AssemblyInfo.cs b/ProjectObsidian/Properties/AssemblyInfo.cs index 43a28ed..28ef9af 100644 --- a/ProjectObsidian/Properties/AssemblyInfo.cs +++ b/ProjectObsidian/Properties/AssemblyInfo.cs @@ -10,9 +10,11 @@ using System; using System.ComponentModel; +using System.Net; using System.Reflection; using Elements.Core; +using Newtonsoft.Json.Linq; [assembly: System.Reflection.AssemblyCompanyAttribute("Project-Obsidian")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] @@ -27,3 +29,9 @@ //Mark as DataModelAssembly for the Plugin loading system to load this assembly [assembly: DataModelAssembly(DataModelAssemblyType.Core)] + +[assembly: ExternalDataModelType(typeof(Valve.VR.Imu_OffScaleFlags))] +[assembly: ExternalDataModelType(typeof(HttpStatusCode))] +//[assembly: ExternalDataModelType(typeof(JObject))] +//[assembly: ExternalDataModelType(typeof(JToken))] +//[assembly: ExternalDataModelType(typeof(JArray))] \ No newline at end of file diff --git a/ProjectObsidian/ProtoFlux/JSON/JsonInsertObjectToArrayNode.cs b/ProjectObsidian/ProtoFlux/JSON/JsonInsertObjectToArrayNode.cs index 237b8ef..679440e 100644 --- a/ProjectObsidian/ProtoFlux/JSON/JsonInsertObjectToArrayNode.cs +++ b/ProjectObsidian/ProtoFlux/JSON/JsonInsertObjectToArrayNode.cs @@ -17,7 +17,7 @@ public class JsonInsertObjectToArrayNode : ObjectFunctionNode Array; public readonly ObjectInput Object; - public readonly ObjectInput Index; + public readonly ValueInput Index; public static bool IsValidGenericType => JsonTypeHelper.ValidObjectSetTypes.Contains(typeof(T)); protected override JsonArray Compute(FrooxEngineContext context) { diff --git a/ProjectObsidian/ProtoFlux/JSON/JsonRemoveFromArrayNode.cs b/ProjectObsidian/ProtoFlux/JSON/JsonRemoveFromArrayNode.cs index 870d0f9..dd090f9 100644 --- a/ProjectObsidian/ProtoFlux/JSON/JsonRemoveFromArrayNode.cs +++ b/ProjectObsidian/ProtoFlux/JSON/JsonRemoveFromArrayNode.cs @@ -12,7 +12,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Json; public class JsonRemoveFromArrayNode : ObjectFunctionNode { public readonly ObjectInput Array; - public readonly ObjectInput Index; + public readonly ValueInput Index; protected override JsonArray Compute(FrooxEngineContext context) diff --git a/ProjectObsidian/ProtoFlux/Strings/HMAC.cs b/ProjectObsidian/ProtoFlux/Strings/HMAC.cs index 55f1200..49e6b79 100644 --- a/ProjectObsidian/ProtoFlux/Strings/HMAC.cs +++ b/ProjectObsidian/ProtoFlux/Strings/HMAC.cs @@ -9,6 +9,7 @@ namespace ProtoFlux.Runtimes.Execution.Nodes.Obsidian.Strings { + [DataModelType] public enum HashFunction { MD5,