diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml
index 0522d3f3a..b6fe9fb50 100644
--- a/.github/workflows/nuget.yml
+++ b/.github/workflows/nuget.yml
@@ -10,7 +10,7 @@ jobs:
version:
runs-on: ubuntu-latest
outputs:
- version-suffix: ${{ steps.get-version.outputs.version-suffix }}
+ version-number: ${{ steps.get-version.outputs.version-number }}
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -22,9 +22,12 @@ jobs:
run: |
$MidnightUtc = [DateTime]::UtcNow.Date
$BranchName = "${{ github.ref_name }}".replace('/','-').replace('.','-')
+ $ApiVersion = (Select-Xml -Path 'src/Artemis.Core/Artemis.Core.csproj' -XPath '//PluginApiVersion').Node.InnerText
$NumberOfCommitsToday = (git log --after=$($MidnightUtc.ToString("o")) --oneline | Measure-Object -Line).Lines
- $VersionSuffix = "$BranchName.$($MidnightUtc.ToString("yyyyMMdd")).$NumberOfCommitsToday"
- Write-Output "::set-output name=version-suffix::$VersionSuffix"
+ $VersionNumber = "$ApiVersion.$($MidnightUtc.ToString("yyyy.MMdd")).$NumberOfCommitsToday"
+ # If we're not in master, add the branch name to the version so it counts as prerelease
+ if ($BranchName -ne "master") { $VersionNumber += "-$BranchName" }
+ Write-Output "::set-output name=version-number::$VersionNumber"
nuget:
name: Publish Nuget Packages
@@ -38,8 +41,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Pack Artemis.Core
- run: dotnet pack -c Release -p:VersionSuffix=${{ needs.version.outputs.version-suffix }} -p:BuildingNuget=True src/Artemis.Core/Artemis.Core.csproj
+ run: dotnet pack -c Release -p:Version=${{ needs.version.outputs.version-number }} -p:BuildingNuget=True src/Artemis.Core/Artemis.Core.csproj
- name: Pack Artemis.UI.Shared
- run: dotnet pack -c Release -p:VersionSuffix=${{ needs.version.outputs.version-suffix }} src/Artemis.UI.Shared/Artemis.UI.Shared.csproj
+ run: dotnet pack -c Release -p:Version=${{ needs.version.outputs.version-number }} src/Artemis.UI.Shared/Artemis.UI.Shared.csproj
- name: Push Nugets
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
\ No newline at end of file
diff --git a/src/Artemis.Core/Artemis.Core.csproj b/src/Artemis.Core/Artemis.Core.csproj
index 801bebb44..4a3d0f3b1 100644
--- a/src/Artemis.Core/Artemis.Core.csproj
+++ b/src/Artemis.Core/Artemis.Core.csproj
@@ -10,13 +10,18 @@
x64
true
ArtemisRGB.Core
-
- 1.0.0.0
+ 1
+ enable
-
-
+
+
+
+
+
+
+
diff --git a/src/Artemis.UI.Shared/Styles/TextBox.axaml b/src/Artemis.UI.Shared/Styles/TextBox.axaml
index 7497f7019..c6b950b6d 100644
--- a/src/Artemis.UI.Shared/Styles/TextBox.axaml
+++ b/src/Artemis.UI.Shared/Styles/TextBox.axaml
@@ -8,9 +8,10 @@
-
+ attached:TextBoxAssist.SuffixText="%">
+
@@ -30,80 +31,95 @@
-
diff --git a/src/Artemis.UI/Models/NodesClipboardModel.cs b/src/Artemis.UI/Models/NodesClipboardModel.cs
new file mode 100644
index 000000000..842d5348d
--- /dev/null
+++ b/src/Artemis.UI/Models/NodesClipboardModel.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Artemis.Core;
+using Artemis.Storage.Entities.Profile.Nodes;
+using FluentAvalonia.Core;
+
+namespace Artemis.UI.Models;
+
+public class NodesClipboardModel
+{
+ public NodesClipboardModel(NodeScript nodeScript, List nodes)
+ {
+ nodeScript.Save();
+
+ // Grab all entities belonging to provided nodes
+ Nodes = nodeScript.Entity.Nodes.Where(e => nodes.Any(n => n.Id == e.Id)).ToList();
+ // Grab all connections between provided nodes
+ Connections = nodeScript.Entity.Connections.Where(e => nodes.Any(n => n.Id == e.SourceNode) && nodes.Any(n => n.Id == e.TargetNode)).ToList();
+ }
+
+ public NodesClipboardModel()
+ {
+ Nodes = new List();
+ Connections = new List();
+ }
+
+ public List Nodes { get; set; }
+ public List Connections { get; set; }
+
+ public List Paste(NodeScript nodeScript, double x, double y)
+ {
+ if (!Nodes.Any())
+ return new List();
+
+ nodeScript.Save();
+
+ // Copy the entities, not messing with the originals
+ List nodes = Nodes.Select(n => new NodeEntity(n)).ToList();
+ List connections = Connections.Select(c => new NodeConnectionEntity(c)).ToList();
+
+ double xOffset = x - nodes.Min(n => n.X);
+ double yOffset = y - nodes.Min(n => n.Y);
+
+ foreach (NodeEntity node in nodes)
+ {
+ // Give each node a new GUID, updating any connections to it
+ Guid newGuid = Guid.NewGuid();
+ foreach (NodeConnectionEntity connection in connections)
+ {
+ if (connection.SourceNode == node.Id)
+ connection.SourceNode = newGuid;
+ else if (connection.TargetNode == node.Id)
+ connection.TargetNode = newGuid;
+
+ // Only add the connection if this is the first time we hit it
+ if (!nodeScript.Entity.Connections.Contains(connection))
+ nodeScript.Entity.Connections.Add(connection);
+ }
+
+ node.Id = newGuid;
+ node.X += xOffset;
+ node.Y += yOffset;
+ nodeScript.Entity.Nodes.Add(node);
+ }
+
+ nodeScript.Load();
+
+ // Return the newly created nodes
+ return nodeScript.Nodes.Where(n => nodes.Any(e => e.Id == n.Id)).ToList();
+ }
+}
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Sidebar/SidebarView.axaml b/src/Artemis.UI/Screens/Sidebar/SidebarView.axaml
index d717b99e9..5c617be53 100644
--- a/src/Artemis.UI/Screens/Sidebar/SidebarView.axaml
+++ b/src/Artemis.UI/Screens/Sidebar/SidebarView.axaml
@@ -11,7 +11,7 @@
-
+
@@ -53,6 +55,8 @@
Width="44"
Height="44"
ToolTip.Tip="View GitHub repository"
+ ToolTip.Placement="Top"
+ ToolTip.VerticalOffset="-5"
NavigateUri="https://github.com/Artemis-RGB/Artemis">
@@ -60,6 +64,8 @@
Width="44"
Height="44"
ToolTip.Tip="View Wiki"
+ ToolTip.Placement="Top"
+ ToolTip.VerticalOffset="-5"
NavigateUri="https://wiki.artemis-rgb.com">
@@ -67,6 +73,8 @@
Width="44"
Height="44"
ToolTip.Tip="Join our Discord"
+ ToolTip.Placement="Top"
+ ToolTip.VerticalOffset="-5"
NavigateUri="https://discord.gg/S3MVaC9">
@@ -74,6 +82,8 @@
Width="44"
Height="44"
ToolTip.Tip="View donation options"
+ ToolTip.Placement="Top"
+ ToolTip.VerticalOffset="-5"
NavigateUri="https://wiki.artemis-rgb.com/en/donating">
diff --git a/src/Artemis.UI/Screens/VisualScripting/CableView.axaml b/src/Artemis.UI/Screens/VisualScripting/CableView.axaml
index c1c7610d9..e18230f6f 100644
--- a/src/Artemis.UI/Screens/VisualScripting/CableView.axaml
+++ b/src/Artemis.UI/Screens/VisualScripting/CableView.axaml
@@ -24,11 +24,6 @@
Stroke="{CompiledBinding CableColor, Converter={StaticResource ColorToSolidColorBrushConverter}}"
StrokeThickness="4"
StrokeLineCap="Round">
-
-
-
-
-
@@ -47,8 +42,6 @@
BorderThickness="2"
CornerRadius="3"
Padding="4"
- Canvas.Left="{CompiledBinding ValuePoint.X}"
- Canvas.Top="{CompiledBinding ValuePoint.Y}"
IsVisible="{CompiledBinding DisplayValue}">
diff --git a/src/Artemis.UI/Screens/VisualScripting/CableView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/CableView.axaml.cs
index c4d032f88..1cd822bf3 100644
--- a/src/Artemis.UI/Screens/VisualScripting/CableView.axaml.cs
+++ b/src/Artemis.UI/Screens/VisualScripting/CableView.axaml.cs
@@ -8,6 +8,7 @@ using Avalonia.Input;
using Avalonia.Markup.Xaml;
using Avalonia.Media;
using Avalonia.ReactiveUI;
+using Avalonia.Rendering;
using ReactiveUI;
namespace Artemis.UI.Screens.VisualScripting;
@@ -29,9 +30,9 @@ public class CableView : ReactiveUserControl
{
_valueBorder.GetObservable(BoundsProperty).Subscribe(rect => _valueBorder.RenderTransform = new TranslateTransform(rect.Width / 2 * -1, rect.Height / 2 * -1)).DisposeWith(d);
- ViewModel.WhenAnyValue(vm => vm.FromPoint).Subscribe(_ => Update()).DisposeWith(d);
- ViewModel.WhenAnyValue(vm => vm.ToPoint).Subscribe(_ => Update()).DisposeWith(d);
- Update();
+ ViewModel.WhenAnyValue(vm => vm.FromPoint).Subscribe(_ => Update(true)).DisposeWith(d);
+ ViewModel.WhenAnyValue(vm => vm.ToPoint).Subscribe(_ => Update(false)).DisposeWith(d);
+ Update(true);
});
}
@@ -40,10 +41,12 @@ public class CableView : ReactiveUserControl
AvaloniaXamlLoader.Load(this);
}
- private void Update()
+ private void Update(bool from)
{
// Workaround for https://github.com/AvaloniaUI/Avalonia/issues/4748
- _cablePath.Margin = _cablePath.Margin != new Thickness(0, 0, 0, 0) ? new Thickness(0, 0, 0, 0) : new Thickness(1, 1, 0, 0);
+ _cablePath.Margin = new Thickness(_cablePath.Margin.Left + 1, _cablePath.Margin.Top + 1, 0, 0);
+ if (_cablePath.Margin.Left > 2)
+ _cablePath.Margin = new Thickness(0, 0, 0, 0);
PathFigure pathFigure = ((PathGeometry) _cablePath.Data).Figures.First();
BezierSegment segment = (BezierSegment) pathFigure.Segments!.First();
@@ -51,6 +54,11 @@ public class CableView : ReactiveUserControl
segment.Point1 = new Point(ViewModel.FromPoint.X + CABLE_OFFSET, ViewModel.FromPoint.Y);
segment.Point2 = new Point(ViewModel.ToPoint.X - CABLE_OFFSET, ViewModel.ToPoint.Y);
segment.Point3 = new Point(ViewModel.ToPoint.X, ViewModel.ToPoint.Y);
+
+ Canvas.SetLeft(_valueBorder, ViewModel.FromPoint.X + (ViewModel.ToPoint.X - ViewModel.FromPoint.X) / 2);
+ Canvas.SetTop(_valueBorder, ViewModel.FromPoint.Y + (ViewModel.ToPoint.Y - ViewModel.FromPoint.Y) / 2);
+
+ _cablePath.InvalidateVisual();
}
private void OnPointerEnter(object? sender, PointerEventArgs e)
diff --git a/src/Artemis.UI/Screens/VisualScripting/CableViewModel.cs b/src/Artemis.UI/Screens/VisualScripting/CableViewModel.cs
index 6d5db773c..1d44adecc 100644
--- a/src/Artemis.UI/Screens/VisualScripting/CableViewModel.cs
+++ b/src/Artemis.UI/Screens/VisualScripting/CableViewModel.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using Artemis.Core;
@@ -27,7 +28,6 @@ public class CableViewModel : ActivatableViewModelBase
private PinViewModel? _fromViewModel;
private ObservableAsPropertyHelper? _toPoint;
private PinViewModel? _toViewModel;
- private ObservableAsPropertyHelper? _valuePoint;
public CableViewModel(NodeScriptViewModel nodeScriptViewModel, IPin from, IPin to, ISettingsService settingsService)
{
@@ -63,12 +63,7 @@ public class CableViewModel : ActivatableViewModelBase
.Switch()
.ToProperty(this, vm => vm.ToPoint)
.DisposeWith(d);
- _valuePoint = this.WhenAnyValue(vm => vm.FromPoint, vm => vm.ToPoint).Select(tuple => new Point(
- tuple.Item1.X + (tuple.Item2.X - tuple.Item1.X) / 2,
- tuple.Item1.Y + (tuple.Item2.Y - tuple.Item1.Y) / 2
- )).ToProperty(this, vm => vm.ValuePoint)
- .DisposeWith(d);
-
+
// Not a perfect solution but this makes sure the cable never renders at 0,0 (can happen when the cable spawns before the pin ever rendered)
_connected = this.WhenAnyValue(vm => vm.FromPoint, vm => vm.ToPoint)
.Select(tuple => tuple.Item1 != new Point(0, 0) && tuple.Item2 != new Point(0, 0))
@@ -104,11 +99,10 @@ public class CableViewModel : ActivatableViewModelBase
}
public bool Connected => _connected?.Value ?? false;
- public bool IsFirst => _from.ConnectedTo[0] == _to;
+ public bool IsFirst => _from.ConnectedTo.FirstOrDefault() == _to;
public Point FromPoint => _fromPoint?.Value ?? new Point();
public Point ToPoint => _toPoint?.Value ?? new Point();
- public Point ValuePoint => _valuePoint?.Value ?? new Point();
public Color CableColor => _cableColor?.Value ?? new Color(255, 255, 255, 255);
public void UpdateDisplayValue(bool hoveringOver)
diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml b/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml
index b442e5e6f..3a8c99638 100644
--- a/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml
+++ b/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml
@@ -30,6 +30,8 @@
+
+
diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs b/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs
index 682f61bc0..92728f4d3 100644
--- a/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs
+++ b/src/Artemis.UI/Screens/VisualScripting/NodeScriptView.axaml.cs
@@ -14,6 +14,7 @@ using Avalonia.Markup.Xaml;
using Avalonia.Media;
using Avalonia.ReactiveUI;
using Avalonia.Threading;
+using Avalonia.VisualTree;
using DynamicData.Binding;
using ReactiveUI;
@@ -39,6 +40,8 @@ public class NodeScriptView : ReactiveUserControl
_zoomBorder.AddHandler(PointerReleasedEvent, CanvasOnPointerReleased, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true);
_zoomBorder.AddHandler(PointerWheelChangedEvent, ZoomOnPointerWheelChanged, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true);
+ _zoomBorder.AddHandler(PointerMovedEvent, ZoomOnPointerMoved, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true);
+
this.WhenActivated(d =>
{
ViewModel!.AutoFitRequested += ViewModelOnAutoFitRequested;
@@ -67,6 +70,12 @@ public class NodeScriptView : ReactiveUserControl
e.Handled = true;
}
+ private void ZoomOnPointerMoved(object? sender, PointerEventArgs e)
+ {
+ if (ViewModel != null)
+ ViewModel.PastePosition = e.GetPosition(_grid);
+ }
+
private void ShowPickerAt(Point point)
{
if (ViewModel == null)
diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeScriptViewModel.cs b/src/Artemis.UI/Screens/VisualScripting/NodeScriptViewModel.cs
index 8c0adc5b9..00ab99900 100644
--- a/src/Artemis.UI/Screens/VisualScripting/NodeScriptViewModel.cs
+++ b/src/Artemis.UI/Screens/VisualScripting/NodeScriptViewModel.cs
@@ -6,9 +6,12 @@ using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
+using System.Text;
+using System.Threading.Tasks;
using Artemis.Core;
using Artemis.Core.Events;
using Artemis.Core.Services;
+using Artemis.UI.Models;
using Artemis.UI.Ninject.Factories;
using Artemis.UI.Screens.VisualScripting.Pins;
using Artemis.UI.Shared;
@@ -16,6 +19,7 @@ using Artemis.UI.Shared.Services.NodeEditor;
using Artemis.UI.Shared.Services.NodeEditor.Commands;
using Avalonia;
using Avalonia.Controls.Mixins;
+using Avalonia.Input;
using DynamicData;
using DynamicData.Binding;
using ReactiveUI;
@@ -24,6 +28,8 @@ namespace Artemis.UI.Screens.VisualScripting;
public class NodeScriptViewModel : ActivatableViewModelBase
{
+ public const string CLIPBOARD_DATA_FORMAT = "Artemis.Nodes";
+
private readonly INodeEditorService _nodeEditorService;
private readonly INodeService _nodeService;
private readonly SourceList _nodeViewModels;
@@ -33,6 +39,7 @@ public class NodeScriptViewModel : ActivatableViewModelBase
private DragCableViewModel? _dragViewModel;
private List? _initialNodeSelection;
private Matrix _panMatrix;
+ private Point _pastePosition;
public NodeScriptViewModel(NodeScript nodeScript, bool isPreview, INodeVmFactory nodeVmFactory, INodeService nodeService, INodeEditorService nodeEditorService)
{
@@ -86,8 +93,8 @@ public class NodeScriptViewModel : ActivatableViewModelBase
ClearSelection = ReactiveCommand.Create(ExecuteClearSelection);
DeleteSelected = ReactiveCommand.Create(ExecuteDeleteSelected);
DuplicateSelected = ReactiveCommand.Create(ExecuteDuplicateSelected);
- CopySelected = ReactiveCommand.Create(ExecuteCopySelected);
- PasteSelected = ReactiveCommand.Create(ExecutePasteSelected);
+ CopySelected = ReactiveCommand.CreateFromTask(ExecuteCopySelected);
+ PasteSelected = ReactiveCommand.CreateFromTask(ExecutePasteSelected);
}
public NodeScript NodeScript { get; }
@@ -118,6 +125,12 @@ public class NodeScriptViewModel : ActivatableViewModelBase
set => RaiseAndSetIfChanged(ref _panMatrix, value);
}
+ public Point PastePosition
+ {
+ get => _pastePosition;
+ set => RaiseAndSetIfChanged(ref _pastePosition, value);
+ }
+
public void DeleteSelectedNodes()
{
List toRemove = NodeViewModels.Where(vm => vm.IsSelected && !vm.Node.IsDefaultNode && !vm.Node.IsExitNode).ToList();
@@ -279,11 +292,39 @@ public class NodeScriptViewModel : ActivatableViewModelBase
}
}
- private void ExecuteCopySelected()
+ private async Task ExecuteCopySelected()
{
+ if (Application.Current?.Clipboard == null)
+ return;
+
+ List nodes = NodeViewModels.Where(vm => vm.IsSelected).Select(vm => vm.Node).Where(n => !n.IsDefaultNode && !n.IsExitNode).ToList();
+ DataObject dataObject = new();
+ string copy = CoreJson.SerializeObject(new NodesClipboardModel(NodeScript, nodes), true);
+ dataObject.Set(CLIPBOARD_DATA_FORMAT, copy);
+ await Application.Current.Clipboard.SetDataObjectAsync(dataObject);
}
- private void ExecutePasteSelected()
+ private async Task ExecutePasteSelected()
{
+ if (Application.Current?.Clipboard == null)
+ return;
+
+ byte[]? bytes = (byte[]?) await Application.Current.Clipboard.GetDataAsync(CLIPBOARD_DATA_FORMAT);
+ if (bytes == null!)
+ return;
+
+ NodesClipboardModel? nodesClipboardModel = CoreJson.DeserializeObject(Encoding.Unicode.GetString(bytes), true);
+ if (nodesClipboardModel == null)
+ return;
+
+ List nodes = nodesClipboardModel.Paste(NodeScript, PastePosition.X, PastePosition.Y);
+
+ using NodeEditorCommandScope scope = _nodeEditorService.CreateCommandScope(NodeScript, "Paste nodes");
+ foreach (INode node in nodes)
+ _nodeEditorService.ExecuteCommand(NodeScript, new AddNode(NodeScript, node));
+
+ // Select only the new nodes
+ foreach (NodeViewModel nodeViewModel in NodeViewModels)
+ nodeViewModel.IsSelected = nodes.Contains(nodeViewModel.Node);
}
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml b/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml
index 7a26616ef..7adfdbbdf 100644
--- a/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml
+++ b/src/Artemis.UI/Screens/VisualScripting/NodeView.axaml
@@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:visualScripting="clr-namespace:Artemis.UI.Screens.VisualScripting"
+ xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
mc:Ignorable="d" d:DesignWidth="250" d:DesignHeight="150"
x:Class="Artemis.UI.Screens.VisualScripting.NodeView"
x:DataType="visualScripting:NodeViewModel">
@@ -37,7 +38,7 @@
ClipToBounds="True"
Background="{DynamicResource ContentDialogBackground}">
-
+
-
diff --git a/src/Artemis.VisualScripting/Nodes/Branching/BooleanBranchNode.cs b/src/Artemis.VisualScripting/Nodes/Branching/BooleanBranchNode.cs
index eda02463e..fdd7c5bcc 100644
--- a/src/Artemis.VisualScripting/Nodes/Branching/BooleanBranchNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Branching/BooleanBranchNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Branching;
[Node("Branch", "Forwards one of two values depending on an input boolean", "Branching", InputType = typeof(object), OutputType = typeof(object))]
public class BooleanBranchNode : Node
{
- public BooleanBranchNode() : base("Branch", "Forwards one of two values depending on an input boolean")
+ public BooleanBranchNode()
{
BooleanInput = CreateInputPin();
TrueInput = CreateInputPin(typeof(object), "True");
diff --git a/src/Artemis.VisualScripting/Nodes/Branching/EnumSwitchNode.cs b/src/Artemis.VisualScripting/Nodes/Branching/EnumSwitchNode.cs
index f94911661..e380c3446 100644
--- a/src/Artemis.VisualScripting/Nodes/Branching/EnumSwitchNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Branching/EnumSwitchNode.cs
@@ -9,7 +9,7 @@ public class EnumSwitchNode : Node
{
private readonly Dictionary _inputPins;
- public EnumSwitchNode() : base("Enum Branch", "desc")
+ public EnumSwitchNode()
{
_inputPins = new Dictionary();
diff --git a/src/Artemis.VisualScripting/Nodes/Color/BrightenSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/BrightenSKColorNode.cs
index 384d09d88..e5adaad4e 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/BrightenSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/BrightenSKColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("Brighten Color", "Brightens a color by a specified amount in percent", "Color", InputType = typeof(SKColor), OutputType = typeof(SKColor))]
public class BrightenSKColorNode : Node
{
- public BrightenSKColorNode() : base("Brighten Color", "Brightens a color by a specified amount in percent")
+ public BrightenSKColorNode()
{
Input = CreateInputPin("Color");
Percentage = CreateInputPin("%");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/ColorGradientFromPinsNode.cs b/src/Artemis.VisualScripting/Nodes/Color/ColorGradientFromPinsNode.cs
index 6c43f510c..5467aecb7 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/ColorGradientFromPinsNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/ColorGradientFromPinsNode.cs
@@ -11,7 +11,7 @@ public class ColorGradientFromPinsNode : Node
public InputPinCollection Colors { get; set; }
public InputPinCollection Positions { get; set; }
- public ColorGradientFromPinsNode() : base("Color Gradient", "Outputs a Color Gradient from colors and positions")
+ public ColorGradientFromPinsNode()
{
Colors = CreateInputPinCollection("Colors", 0);
Positions = CreateInputPinCollection("Positions", 0);
diff --git a/src/Artemis.VisualScripting/Nodes/Color/ColorGradientNode.cs b/src/Artemis.VisualScripting/Nodes/Color/ColorGradientNode.cs
index 8c4676818..18dc15f54 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/ColorGradientNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/ColorGradientNode.cs
@@ -10,7 +10,7 @@ public class ColorGradientNode : Node _inputPins;
- public ColorGradientNode() : base("Color Gradient", "Outputs a color gradient with the given colors")
+ public ColorGradientNode()
{
_inputPins = new List();
diff --git a/src/Artemis.VisualScripting/Nodes/Color/DarkenSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/DarkenSKColorNode.cs
index 8ba31d1d6..5b4983e40 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/DarkenSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/DarkenSKColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("Darken Color", "Darkens a color by a specified amount in percent", "Color", InputType = typeof(SKColor), OutputType = typeof(SKColor))]
public class DarkenSKColorNode : Node
{
- public DarkenSKColorNode() : base("Darken Color", "Darkens a color by a specified amount in percent")
+ public DarkenSKColorNode()
{
Input = CreateInputPin("Color");
Percentage = CreateInputPin("%");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/DesaturateSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/DesaturateSKColorNode.cs
index 818b77bb4..f02e9b6f6 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/DesaturateSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/DesaturateSKColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("Desaturate Color", "Desaturates a color by a specified amount in percent", "Color", InputType = typeof(SKColor), OutputType = typeof(SKColor))]
public class DesaturateSKColorNode : Node
{
- public DesaturateSKColorNode() : base("Desaturate Color", "Desaturates a color by a specified amount in percent")
+ public DesaturateSKColorNode()
{
Input = CreateInputPin("Color");
Percentage = CreateInputPin("%");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/HslSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/HslSKColorNode.cs
index 558041355..cba686c38 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/HslSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/HslSKColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("HSL Color", "Creates a color from hue, saturation and lightness values", "Color", InputType = typeof(Numeric), OutputType = typeof(SKColor))]
public class HslSKColorNode : Node
{
- public HslSKColorNode() : base("HSL Color", "Creates a color from hue, saturation and lightness values")
+ public HslSKColorNode()
{
H = CreateInputPin("H");
S = CreateInputPin("S");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/InvertSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/InvertSKColorNode.cs
index 5abf00994..b194b8a01 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/InvertSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/InvertSKColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("Invert Color", "Inverts a color by a specified amount in percent", "Color", InputType = typeof(SKColor), OutputType = typeof(SKColor))]
public class InvertSKColorNode : Node
{
- public InvertSKColorNode() : base("Invert Color", "Inverts a color")
+ public InvertSKColorNode()
{
Input = CreateInputPin();
Output = CreateOutputPin();
diff --git a/src/Artemis.VisualScripting/Nodes/Color/LerpSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/LerpSKColorNode.cs
index 0ca5125e0..7bf45e08d 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/LerpSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/LerpSKColorNode.cs
@@ -20,8 +20,8 @@ public class LerpSKColorNode : Node
#region Constructors
public LerpSKColorNode()
- : base("Lerp", "Interpolates linear between the two values A and B")
{
+ Name = "Lerp";
A = CreateInputPin("A");
B = CreateInputPin("B");
T = CreateInputPin("T");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/RampSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/RampSKColorNode.cs
index c0ff87d6f..b1cc9b183 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/RampSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/RampSKColorNode.cs
@@ -10,7 +10,6 @@ public class RampSKColorNode : Node();
Output = CreateOutputPin();
diff --git a/src/Artemis.VisualScripting/Nodes/Color/RgbSKColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/RgbSKColorNode.cs
index 338ab17da..7d3bd63b7 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/RgbSKColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/RgbSKColorNode.cs
@@ -18,7 +18,6 @@ public class RgbSKColorNode : Node
#region Constructors
public RgbSKColorNode()
- : base("RGB Color", "Creates a color from red, green and blue values")
{
R = CreateInputPin("R");
G = CreateInputPin("G");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/RotateHueSkColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/RotateHueSkColorNode.cs
index 22d16ef53..4325724b0 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/RotateHueSkColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/RotateHueSkColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("Rotate Color Hue", "Rotates the hue of a color by a specified amount in degrees", "Color", InputType = typeof(SKColor), OutputType = typeof(SKColor))]
public class RotateHueSKColorNode : Node
{
- public RotateHueSKColorNode() : base("Rotate Color Hue", "Rotates the hue of a color by a specified amount in degrees")
+ public RotateHueSKColorNode()
{
Input = CreateInputPin("Color");
Amount = CreateInputPin("Amount");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/SaturateSkColorNode.cs b/src/Artemis.VisualScripting/Nodes/Color/SaturateSkColorNode.cs
index 252db28dc..1c8922262 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/SaturateSkColorNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/SaturateSkColorNode.cs
@@ -6,7 +6,7 @@ namespace Artemis.VisualScripting.Nodes.Color;
[Node("Saturate Color", "Saturates a color by a specified amount in percent", "Color", InputType = typeof(SKColor), OutputType = typeof(SKColor))]
public class SaturateSKColorNode : Node
{
- public SaturateSKColorNode() : base("Saturate Color", "Saturates a color by a specified amount in percent")
+ public SaturateSKColorNode()
{
Input = CreateInputPin("Color");
Percentage = CreateInputPin("%");
diff --git a/src/Artemis.VisualScripting/Nodes/Color/SumSKColorsNode.cs b/src/Artemis.VisualScripting/Nodes/Color/SumSKColorsNode.cs
index a67a5238f..49b86ed14 100644
--- a/src/Artemis.VisualScripting/Nodes/Color/SumSKColorsNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Color/SumSKColorsNode.cs
@@ -9,8 +9,8 @@ public class SumSKColorsNode : Node
#region Constructors
public SumSKColorsNode()
- : base("Sum", "Sums the connected color values.")
{
+ Name = "Sum";
Values = CreateInputPinCollection("Values", 2);
Sum = CreateOutputPin("Sum");
}
diff --git a/src/Artemis.VisualScripting/Nodes/Conversion/ConvertToNumericNode.cs b/src/Artemis.VisualScripting/Nodes/Conversion/ConvertToNumericNode.cs
index b82a85f1f..8a4190098 100644
--- a/src/Artemis.VisualScripting/Nodes/Conversion/ConvertToNumericNode.cs
+++ b/src/Artemis.VisualScripting/Nodes/Conversion/ConvertToNumericNode.cs
@@ -8,7 +8,6 @@ public class ConvertToNumericNode : Node
#region Constructors
public ConvertToNumericNode()
- : base("To Numeric", "Converts the input to a numeric.")
{
Input = CreateInputPin