Skip to content

Feature/raster blend boolean#4

Closed
dunkeroni wants to merge 29 commits intomainfrom
feature/raster-blend-boolean
Closed

Feature/raster blend boolean#4
dunkeroni wants to merge 29 commits intomainfrom
feature/raster-blend-boolean

Conversation

@dunkeroni
Copy link
Owner

Summary

Adds two new features that expose utility of the globalCompositeOperation to the canvas raster layers.
Color Blend mode can be enabled on a layer via the right click menu, and will persistently update with layer changes as the user draws/edits. Merging, creating a raster layer out of the current view, or applying booleans will bake the composite view in.
Boolean operations are exposed via a submenu on right click. They are:

  • Intersection (keep current layer where it overlaps the next layer down)
  • Cut Out (keep lower layer where it overlaps current layer)
  • Cut Away (keep current layer where it does not overlap the next layer down)
  • Exclude (keep the merge of both layers where they do not overlap)

Related Issues / Discussions

QA Instructions

Merge Plan

…menu; support per-layer globalCompositeOperation in compositor; UI to toggle and select color blend modes (multiply, screen, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, hue, saturation, color, luminosity).
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for per-layer blend modes (global composite operations) to raster and control layers. Users can now apply different blending operations to individual layers and perform boolean operations between layers.

  • Adds a new globalCompositeOperation optional field to raster and control layer states
  • Implements UI components for selecting and managing blend modes
  • Adds boolean operation support (intersection, cutout, cut-away, exclude) using composite operations

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
compositeOperations.ts Defines available composite operations as a constant array and exports the CompositeOperation type
types.ts Adds globalCompositeOperation field to CanvasRasterLayerState schema using the new COMPOSITE_OPERATIONS enum
canvasSlice.ts Adds reducer action for updating the globalCompositeOperation field on raster layers
CanvasEntityAdapterRasterLayer.ts Implements syncing of composite operation to canvas element's mix-blend-mode CSS property for live preview
CanvasCompositorModule.ts Updates compositing logic to apply per-layer composite operations with proper priority handling
RasterLayerMenuItemsCompositeOperation.tsx New component for toggling blend mode on/off from layer menu
RasterLayerMenuItemsBooleanSubMenu.tsx New component providing boolean operations submenu using composite operations
RasterLayerCompositeOperationSettings.tsx New component for selecting specific blend mode from a dropdown
RasterLayer.tsx Integrates composite operation settings panel into layer UI
RasterLayerMenuItems.tsx Adds new menu items for composite operations and boolean operations
en.json Adds translation strings for blend mode and boolean operation UI labels

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dunkeroni dunkeroni requested a review from Copilot November 2, 2025 06:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Blend Modes are not right click menu options anymore. Instead they rest above the layer panel as they do in other art programs readily available for each layer.
- Blend Modes have been resorted to match the listings of other art programs so users can avail their muscle memory.
- Blend Mode now defaults to `Normal` for each layer as it should.
- The extra layer operations have now been moved down to the `Operations Bar` at the bottom of the layer stack. This is to increase familiarity again with other art programs and also to make space for us in the top action bar.
- The Operations Bars operations have been resorted in order of usage that makes sense.
@github-actions github-actions bot added the ci-cd label Jan 31, 2026
blessedcoolant and others added 9 commits January 31, 2026 09:38
* translationBot(ui): update translation (Italian)

Currently translated at 98.0% (2205 of 2250 strings)

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/it/
Translation: InvokeAI/Web UI

* translationBot(ui): update translation files

Updated by "Remove blank strings" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/
Translation: InvokeAI/Web UI

---------

Co-authored-by: Riccardo Giovanetti <riccardo.giovanetti@gmail.com>
)

* Adding gradient tool to canvas. Lineara and radial.

* Formatting again...

* Formatting again 2...

* Minor bug fix

* Some button design tweaking

* Fixed icorrect wording where Circular was used instead of Radial.

* Update invokeai/frontend/web/src/features/controlLayers/konva/CanvasObject/CanvasObjectGradient.ts

Co-authored-by: dunkeroni <dunkeroni@gmail.com>

* Update invokeai/frontend/web/src/features/controlLayers/components/Tool/ToolGradientButton.tsx

Co-authored-by: dunkeroni <dunkeroni@gmail.com>

* Update invokeai/frontend/web/src/features/controlLayers/components/Tool/ToolGradientButton.tsx

Co-authored-by: dunkeroni <dunkeroni@gmail.com>

* Update invokeai/frontend/web/src/features/controlLayers/components/Tool/ToolGradientButton.tsx

Co-authored-by: dunkeroni <dunkeroni@gmail.com>

* Autocommit fix on mouse leaving canvas area

* feature(canvas): move gradient mode controls to top toolbar; remove popover mode buttons and group clip+mode cluster

* (chore) prettier

* remove fixed icon size

---------

Co-authored-by: dunkeroni <dunkeroni@gmail.com>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
@dunkeroni dunkeroni closed this Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments