Commit Graph
451 Commits
Author SHA1 Message Date
RobertBeekman 295038f338 Profile editor - Fix undo and editor service bugs found by the tests (#913)
* Profile editor - Fix undoing profile editor commands

- Undoing a change to an existing keyframe's value restores the value instead of deleting the keyframe
- Undoing "remove effect" puts the effect back in its place instead of below the next one
- Undoing "toggle keyframes" restores what it was before
- Undoing a brush change on a layer that had no brush removes the brush again, using the new Layer.RemoveLayerBrush
- Undoing "add element" disables the element again
- Undoing an event path change back to no path goes back to an event start node, like a new condition
- MoveProfileElement says "Move folder" for folders
- UpdateLayerProperty without a time no longer calls itself "Add ... keyframe"

* Profile editor - Fix auto-saving, failing commands, suspended editing and smaller editor issues

- A failed auto-save no longer stops auto-saving for the rest of the session
- A failing command is no longer also reported to ReactiveUI as unhandled, on top of the error dialog
- Resuming editing applies the editor's time again right away
- Nothing is focused while editing is suspended
- A layer created on another layer gets a name that isn't in use next to it
- CanUndo and CanRedo start out false, so new subscribers know the state right away
- An empty command scope doesn't add an undo step
- New subscribers to History get the current history once
- Expanding the keyframe selection with an already selected keyframe doesn't add it twice
- Snapping can snap to a snap time of zero
2026-10-24 16:17:05 +02:00
RobertBeekman 63186ee06d Core - Fix color gradient and utility bugs found by the tests (#914)
* Profile adaption - Fix arrow keys section including Page Down

- The arrow keys keyboard section now starts at Arrow Up instead of the key before it (Page Down)
- Updated the keyboard section test to expect only the four arrow keys

* Color quantizer - Let fully saturated colors be vibrant and grays be muted

- The saturation limits of the color types are now inclusive, so 100% saturated colors count as vibrant and 0% saturated colors count as muted
- The lightness limits stay exclusive so pure black and white are still left out
- Updated the quantizer tests to match

* Color gradients - Fix stop placement, seamless toggling and list events

- Stops on an occupied position now move down 0.001 instead of 0.002 (rounding error in the distance check)
- Flip, rotate, spread and interpolate move all stops together, so a stop can take a position another stop is leaving
- Spreading or randomizing a single stop puts it at 0 instead of NaN
- ToggleSeamless does nothing on an empty gradient and caps stretched stops at 1 instead of 100
- RemoveAt reports the removed stop and its index
- Insert links the stop like Add does and raises the add before the move
- Remove, RemoveAt, Clear and replacing a stop through the indexer unlink and stop listening to the actual removed stop
- Copying from a list of stops sorts them by position
- Obsolete GetPositionsArray no longer skips the seamless positions, obsolete GetColor picks the right colors after a repeat
- Updated the gradient tests to match

* Core - Fix small color, enum, string and type utility bugs

- Darken keeps the alpha of the color
- GetAllValuesAndDescriptions(Type) uses the [Description] attribute like the generic version
- UrlFriendly cuts titles at 80 characters instead of 81
- RemapInternationalCharToAscii knows both cases of r, l, d, thorn, sharp s, h and j with accents
- IsGenericType returns false instead of throwing when the base type is not generic
- IsCastableFrom also finds conversion operators declared on the target type
- GetDisplayName keeps the brackets of array types when humanizing
- Updated the utility tests to match
2026-10-24 15:53:52 +02:00
RobertBeekman 6df81b19b1 Core - Fix data model and event condition bugs found by the tests (#910)
* Core - Fix removing dynamic children and checking which properties are in use

- DataModel.RemoveDynamicChild compared the value of each child with the
  child that was passed in, so it never removed anything.
- IsPropertyInUse with includeChildren matched paths by their start, so
  a path to "Integers" made "Integer" count as in use. Children are now
  matched on what follows a dot.

* Core - Fix data model paths around saving, removed children and stored types

- The constructors saved the path before setting it up, while it was
  still invalid, so a new path stored nothing and didn't follow its data
  model leaving and returning to the store until it was saved.
- Removing the dynamic child a path points to left the path valid and
  reading a default value, it now becomes invalid like when the child
  was never there.
- The stored type of a path is now also looked up in all loaded
  assemblies, Type.GetType only found it in Artemis.Core and the .NET
  libraries, not in plugins or SkiaSharp.

* Core - Only let event conditions react to what happens after they start watching

- A trigger from before the condition watched its event, for example
  long before the profile was activated, counted as new and played the
  element once. Triggers now count from the moment the condition starts
  watching its path.
- A condition on a plain value treated the first value it saw as a
  change and played the element on the first frame. The first value is
  now taken as the starting value.
2026-10-20 13:46:06 +02:00
RobertBeekman a25d0f0c9c Core - Fix profile rendering and timeline bugs found by the tests (#909)
* Core - Keep the name of renamed layer effects when loading

BaseLayerEffect.Load checked HasBeenRenamed before reading it from the entity, so renamed effects always fell back to the descriptor's display name.

* Core - Apply layer effect filters once on layers

Layer.DelegateRendering composited the layer with the pre-processed paint and also handed that paint to the brush, so color and image filters of effects applied to the brush output and again when compositing. The brush now gets a copy of the paint without those filters, like folders which apply them once.

* Core - Disable folders that get suspended while enabled

Layer.Update disables a suspended layer but Folder.Update only disabled a folder once its timeline finished, so a folder suspended outside of the editor kept rendering its children.

* Core - Update device LEDs when rotating or scaling a device

The Rotation and Scale setters only updated the RGB.NET device, the Artemis LED rectangles and the device path kept their old positions and DeviceUpdated wasn't raised until X or Y was set.

* Core - Correct the docs of the Layer and Folder constructors

They claimed the new element adds itself to the child collection of the parent, it doesn't and callers rely on adding it themselves.

* Core - Apply layer opacity once for brushes that draw with the paint

Brushes drawing with a shader or image keep the alpha of the paint they are given, so the layer opacity and opacity effects applied to the brush output and again when compositing, 50% opacity rendered at 25%. The brush now gets an opaque paint, per-LED brushes already overrode the color. The solid color test brush now draws with a shader like the real solid brush so the opacity tests cover this.

* Tests - Describe expected faded colors by their opacity

Adds an AtOpacity helper so assertions read as red at 50% over black instead of a hand-computed 127, and uses it for layer opacity, opacity effects, folder fades, the profile fade and semi-transparent drawing.

* Core - Wrap timelines around by how far they went past the main segment

Repeating timelines wrapped around by the frame time rather than by how
far they went past the end of the main segment, so wrapping could be off
by up to a frame. A timeline that was already past the end, like the
finished timeline new layers start with, still starts the main segment
over.

* Tests - Mention the defaults the timeline wrap-around tests depend on
2026-10-20 13:30:04 +02:00
Robert 86f2426f37 Core - Remove API versioning, we have MinimumVersion to achieve the same thing 2025-12-19 23:11:27 +01:00
Robert 37f973b093 Core - Removed scripting providers
Meta - Updated packages
2024-11-14 14:09:51 +01:00
Robert d9a3a238af Merge branch 'development' 2024-05-03 21:08:48 +02:00
Robert 10ad1d6a58 Core - Remove DataModelPath equality override 2024-05-03 21:08:39 +02:00
Robert 4c2eca29cc Storage - Fix profile order not loading/saving 2024-03-15 23:41:00 +01:00
Robert 7e981a61d3 Storage - Fix new profile creation
UI - Fix a crash when dragging and dropping in the sidebar
2024-03-15 17:13:21 +01:00
RobertBeekman 551921db9f Storage - Replace LiteDB with SQLite + EF Core (#843)
Storage - Added LiteDB to SQLite migration
UI - Try to die a bit more gracefully
Core - Delay start watching plugins for hot reload after initializing
UI - Simplify category management logic
UI - Avoid crash during profile icon load
Storage - Fix entry metadata retrieval
2024-03-13 20:19:21 +01:00
RobertBeekman e5a5f10286 Profiles - Added IPluginFeatureDependent interface and implement throughout profiles (#842)
* Profiles - Added IPluginFeatureDependent interface and implement througout profiles
* Workshop - Include dependencies in profile upload request
2024-03-03 20:19:36 +01:00
RobertBeekman 28640f9502 Profiles - Avoid unnecessary OnBrokenStateChanged calls
Profiles - Fixed int range/float range deserialization
Profiles - Use Random.Shared where applicable
2024-03-02 17:38:20 +01:00
RobertBeekman a340f8822e Replace JSON.NET with System.Text.json (#840) 2024-02-28 19:31:38 +01:00
Robert 248d4c8e18 Storage - Use nullable reference types
Core - Fix build warnings
2024-02-23 17:35:06 +01:00
RobertBeekman 38a1318170 Account management - Final tweaks 2024-02-13 21:55:09 +01:00
RobertBeekman 3952a268d1 Debugger - Fixed current renderer always showing as Software
Render service - Log which renderer is used
Updating - Fixed release not loading when viewing it from the desktop notification
Core - Removed old unused code
Data model event cycle node - Fixed crash on shutdown
2024-02-02 09:45:18 +01:00
Robert 919199a8d0 Nodes - Avoid overriding paths pointing to unloaded plugins with empty values
Nodes  - Store the type of paths so that node connections can be restored even if the path their types are based on are unavailable
2023-09-25 20:21:00 +02:00
Robert d96581f11c Adaption hints - Added single LED adaption hint
Adaption hints - Added more sections to keyboard section adaption hint
2023-09-10 11:58:37 +02:00
Robert c69be2836e Workshop - Added installed entries and update profiles when reinstalling them 2023-09-06 20:39:43 +02:00
Robert d2b8123a30 Core - Reworked profile render override for the editor and new previewer 2023-08-10 11:54:37 +02:00
Robert 4726190355 ColorGradient - Fixed GetColor returning the first stop if position was after the last stop 2023-06-24 15:44:06 +02:00
Robert 3b04447ff7 Layers - Prevent brushes from going null when provider is missing
Layers - Set broken state when brush provider is missing
UI - Tweaked broken state visuals
2023-04-14 11:56:51 +02:00
Diogo Trindade b493e43c6e UI - Added debugger log tab (#753) 2023-02-01 19:46:37 +01:00
RobertBeekman b7e723b7e9 Core/UI - Move from Ninject to DryIoc (#754) 2023-01-30 21:00:10 +01:00
Diogo Trindade c8a3169688 Core - Apply opacity layer only when fading 2023-01-11 09:43:47 +00:00
Diogo Trindade 5877e4dd20 Cleaned up ProfileService render condition 2022-11-27 20:04:04 +00:00
Diogo Trindade b39dd14526 Core - Fixed when condition stops being true mid-fade 2022-11-27 19:59:09 +00:00
Diogo Trindade 7c2bab0f89 Core - Removed FadingStatus enum 2022-11-27 17:07:55 +00:00
Diogo Trindade 194780b25c Core - Added fading in and out of profiles 2022-11-27 15:20:17 +00:00
Robert f30cc31ead Profiles - Fixed folders not enabling after previous fix :) 2022-11-27 15:33:05 +01:00
Robert 6b6ea0f973 Profiles - Fixed elements updating while disabled 2022-11-26 22:59:24 +01:00
Diogo Trindade 761447b3d2 ColorGradient - fixed edgecase in GetColor 2022-11-14 10:33:27 +00:00
Robert 24cb397556 Layer effects - Fixed placeholder system 2022-11-12 22:32:04 +01:00
Robert 4b452eb0e6 Color gradient - Performance improvements 2022-11-12 22:28:31 +01:00
Robert 6ac3d00116 Layers - Fixed node scripts not loading on duplicated/pasted scripts 2022-10-31 22:47:31 +01:00
Robert cbf2cd1736 Nodes - Added color gradient easing node
Color ramp node - Fixed 1 and multiples of 1 being treated as 0
2022-10-30 18:13:47 +01:00
Robert d4bd44b504 Sidebar - Fixed removed categories not dissapearing
Sidebar - Fixed exception when creating a category with an already in use name
2022-10-12 21:20:39 +02:00
RobertBeekman b83f1f0102 Profiles - Fixed LEDs of devices that are missing being removed from layers (#733) 2022-10-01 11:40:09 +02:00
Robert 9c117d2773 Nodes - Added gradient nodes
Nodes - Added color gradient pin type
Data bindings - Changed color gradient data bindings to now take a color gradient
2022-09-23 21:41:08 +02:00
Robert b779a86d13 Event conditions - Fix start-node disconnecting
Input - Performance optimizations
2022-09-16 19:46:43 +02:00
Robert b19854ee47 Nodes - Added object output pins and a new list predicate node 2022-09-16 19:46:43 +02:00
Robert d2e0607622 Nodes - Fixed string format node not outputting numerics
Data model event node - Renamed to Data Model-Event Value Cycle
Data model event node - Added new data model event node that outputs the latest event data
Event conditions - Performance improvements
2022-08-23 20:35:25 +02:00
Robert 3efb97eedd Color picker - Avoid overlapping colors 2022-08-22 20:24:08 +02:00
Robert f6090dc296 Code style - Use file scoped namespaces
Code style - Ran code cleanup
2022-08-21 11:36:15 +02:00
Robert 3f52279305 Profile - Blending mode fixes
Nodes editor - Adhere to cable display settings
Profile - Added focus layer option
2022-08-14 10:18:17 +02:00
Robert b0c7dd4290 Layers - Fixed blend mode not being applied 2022-08-13 11:32:58 +02:00
Robert 19d47ec9f5 Profiles - Fixed resetting state and reset profiles after editing them 2022-08-13 11:18:24 +02:00
Robert e9566ca689 Storage - Added migration to clear the DB
Profile - Don't store empty visual scripts
Profile tree - Improved drag & drop
2022-08-04 23:01:27 +02:00
Robert b6e0c0fb66 Sidebar - Added category reordering
Sidebar - Fix disabled profiles not fading
Sidebar - Fix module missing when editing existing profile configs
Profile - Remove old undo/redo code
2022-08-01 20:42:56 +02:00